UDPT is a lightweight torrent tracker that uses the UDP protocol for tracking and fully implements BEP-15. This project was developed with security & simplicity in mind, so it shouldn't be difficult to get a server started.

Unlike most HTTP torrent-trackers, you can save about 50% bandwidth using a UDP tracker.


  • UDP tracking protocol
  • Simple TOML configuration
  • Logging
  • Choice to run in static or dynamic modes
  • Blacklist torrents using the REST API
  • Can be built/run on many platforms
  • (Re)written in Rust


UDPT available under the MIT license.


Originally written in C++ by @naim94a in 2012 for fun.

Building UDPT

If you're reading this, you're probably interested in using UDPT - so first, thanks for your interest!

UDPT used to be harder to build, especially on Windows due to it's dependencies. Thanks to Rust, it's much simpler now.

Required tools

  • Git - Version Control
  • Rust - Compiler toolchain & Package Manager (cargo)

Getting the sources

git clone https://github.com/naim94a/udpt.git

If you prefer to just download the code, you can get the latest codebase here.


This step will download all required dependencies (from crates.io) and build them as well.

Building should always be done with the latest Rust compiler.

cd udpt
cargo build --release

Once cargo is done building, udpt will be built at target/release/udpt.

Running Tests

UDPT comes with unit tests, they can be run with the following command:

cargo test

If a build or test fails, please submit Issues to UDPT's issue tracker.

Configuring UDPT

UDPT's configuration is a simple TOML file.


At the root level, the following options are configurable: mode - Specifies which mode the tracker will operate in. Values can be static, dynamic or private.

Root Level

  • mode - Required. Possbile Values: private, static or dynamic.
  • log_level - Default: info. Possible Values: off, error, warning, info, debug, trace.
  • db_path - Database path. If not set, database will be volatile.
  • cleanup_interval - Default: 600. Interval to run cleanup in seconds. Cleanup also saves the Database.

[udp] section

This section must exist.

  • bind_address - Required. This is where the UDP port will bind to. Example:
  • announce_interval - Required. Sets the announce_interval that will be sent to peers (in seconds).

[http] section

This section is optional.

  • bind_address - Required (if section exists). The HTTP REST API will be bound to this address. It's best not to expose this address publically. Example:

[http.access_tokens] section

Section is required if [http] section exists.

In this section you can make up keys that would be user ids, and values that would be their access token. If this section is empty, the REST API will not be very useful.

Sample Configuration

mode = "dynamic"
db_path = "database.json.bz2"

announce_interval = 120         # Two minutes
bind_address = ""

bind_address = ""

someone = "MyAccessToken"

Tracking Modes

UDPT currently supports Static & Dynamic tracking modes. Private tracking is planned, but isn't yet completely implemented.

Dynamic Mode

In this mode a tracker allows any torrent, even if unknown to be tracked. Trackers that run in this mode usually don't know about the contents of the tracked torrent. In addition, trackers don't usually know anything about the peers.

UDPT supports dynamic mode, and allows blacklisting torrents to avoid copyright infringement. Torrents can be blacklisted (or "flagged") using the REST API.

Static Mode

In static mode, anyone can use the tracker like in dynamic mode. Except that torrents must be registered ahead of time.

UDPT supports static mode, and torrents can be added or removed using the REST API.

Private Mode

Private tracking requires all peers to be authenticated. Some implementations require torrents to be registered, and some do not. This mode can be either static or dynamic with peer authentication.

UDPT doesn't currently implement private mode, although there are plans to implement private tracking in the future.


At the moment, udpt doesn't have many options. Once you've modified the configuration file, you could start udpt:

udpt -c configuration.toml 


The REST API can help you manage UDPT with your own scripts.

Notice: The API should only be used in trusted networks. APIs should not be exposed directly to the internet, they are intended for internal use only.


All Endpoints require a authorization token which must be set in the configuration before running the tracker.

GET/tlist all tracked torrents. Possible query parameters are:
offset - The offset in the db where to start listing torrents from.
limit - Maximum amount of records to retrieve (max. 1000).
GET/t/infohashget information about a specific torrent: connected peers & stats
DELETE/t/infohashdrop a torrent from the database.
POST/t/infohashadd/flag/unflag torrent

The payload expected for adding a torrent can be empty, flagging or unflagging a torrent has the following payload:

    "is_flagged": false


Listing all tracked torrents

$ curl

Getting information for a specific torrent

$ curl

Adding a torrent (non-dynamic trackers) or Unflagging a torrent:

$ curl -X POST -d "{\"is_flagged\": false}" -H "Content-Type: application/json"

Removing a torrent:

$ curl -X DELETE

Flagging a torrent:

$ curl -X POST -d "{\"is_flagged\": true}" -H "Content-Type: application/json"