Host a bittorrent tracker

Hello everyone,

I recently decided to host my own bittorrent tracker so I can share files with
my mum without using anyone else’s service.

I successfully installed opentracker and I wanted to share the info in case some
of you wanted to do the same. After a ssh on the server, here is what I did :

Install opentracker :

cd /home/admin
git clone git://
cd opentracker
sudo apt install libowfat-dev zlib1g-dev # necessary to compile opentracker

Open the port in the firewall :

sudo yunohost firewall allow Both 6969

In my case, my server is behind a router, I also forwarded port 6969 from WAN to
the server.

As of now, it is possible to test if it works properly :

On the server, run opentracker :

On a computer, create a torrent file and set its tracker to
“udp://” (replace “” with your
Share it with a friend, transfer will work as expected.

Now, if you stop opentracker on the server, you won’t be available to share your
files anymore. So, use systemd to run opentracker at startup by writing a file
(make sure to add an & at the end of the ExecStart command, otherwise the server
will never complete the boot sequence) :

sudo vim /etc/systemd/system/opentracker.service


ExecStart=/home/admin/opentracker/opentracker &


Then enable the service and start it:

sudo systemctl enable opentracker.service
sudo systemctl start  opentracker.service

That’s it. Your bittorrent tracker is now functioning.
Hope this helps.


Ps: feel free to tell me if I missed anything.



Looking at the output of ldd.

ldd opentracker (0x00007fff19988000) => /usr/lib/ (0x00007f164fb99000) => /lib/x86_64-linux-gnu/ (0x00007f164f97b000) => /lib/x86_64-linux-gnu/ (0x00007f164f75d000) => /lib/x86_64-linux-gnu/ (0x00007f164f3a3000)
/lib64/ (0x00007f164ffe9000)

opentracker also depends on, libz aka zlib1g as a debian package.




HI alb1,

I am working on a project on a network that blocks the use of udp. so does opentracker also supports http: ?

Will this work : http://my-server-ip:6969

I am using virtualbox to generate that environment 1) One FreeBSD image with opentracker on one machine and 2) One ubuntu image with bittorrent client to create and include the tracker. 3) Another ubuntu image with same client to download the file.

All three machines are on bridged mode with my home router (NAT Network is not working idk why?).

Hello Vaibhavsaharan,

To use opentracker with TCP, just open port 6969 for TCP instead of Both:
sudo yunohost firewall allow TCP 6969

And when you create your torrent file, use http instead of udp with the announce keyword:
(replace “” with your domain)

That should do the trick.

Thanks! Worked like a charm <3