Skip to content(if available)orjump to list(if available)

Show HN: I wrote a new BitTorrent tracker in Elixir

Show HN: I wrote a new BitTorrent tracker in Elixir

24 comments

·June 19, 2025

Hello everyone!

I'm currently in a journey to learn and improve my Elixir and Go skills (my daily job uses C++) and looking through my backlog for projects to take on I decided Elixir is the perfect language to write a highly-parallel BitTorrent tracker. So I have spent my free time these last 3 months writing one! Now I think it has enough features to present it to the world (and a docker image to give it a quick try).

I know some people see trackers as relics of the past now that DHT and PEX are common but I think they still serve a purpose in today's Internet (purely talking about public trackers). That said there is not a lot going on in terms of new developments since everyone just throws opentracker in a vps a calls it a day (honorable exceptions: aquatic and torrust).

I plan to continue development for the foreseeable future and add some (optional) esoteric features along the way so if anyone currently operates a tracker please give a try and enjoy the lack of crashes.

note: only swarm_printout.ex has been vibe coded, the rest has all been written by hand.

arthurcolle

Check out https://github.com/sergiotapia/magnetissimo it was a popular one like 7 years ago

KomoD

That's not a bittorrent tracker.

guywithahat

There's something about C++ developers that makes them love Go and Elixir (and I include myself in this demographic). I think it's something about the people who are attracted to C++ for performance are attracted to Go/Elixir for its multithreaded performance. Really cool project

abrookewood

Hey congrats on the launch! Can you provide any details on how it runs compared to opentracker? I'm really interested in the performance etc.

vivzkestrel

- how did you start - did you refer to other projects - how long did it take - how much functionality do you think works compared to say qbittorrent?

lionkor

it's a tracker, not a torrenting client.

nayuki

Similar to: https://news.ycombinator.com/item?id=44265851 "Show HN: I wrote a BitTorrent Client from scratch" [2025-06-13], https://github.com/piyushgupta53/go-torrent-client

lionkor

No that's a client

s-mon

Love Elixir so much, building a kick-ass notification engine with it now. Its so so good.

mikehostetler

nice, private or OSS? Elixir needs a better notification engine badly

rhgraysonii

What do you mean exactly? If you need a notification engine, reaching for a pubsub implementation is very easy with phoenix’s popularity and quite battle tested. I’ve implemented notifications at scale a few times in the ecosystem. What problems are you encountering that you don’t feel you have a tool in the shed to work with in this case?

rhgraysonii

And if you wanna buy over build, check out https://knock.app - also built in elixir

voicedYoda

Well done. Couple quick notes, move to a logger instead of using IO.puts. Also consider adding OTel.

solid_fuel

I'll second this, just using the built in Logger [0] and Telemetry [1] applications would be fine, opentelemetry or anything else can be added to the telemetry hooks easily to export the metrics later.

[0] https://hexdocs.pm/logger/1.18.4/Logger.html [1] https://hexdocs.pm/telemetry/readme.html

ai-christianson

What's your favorite otel sink?

KomoD

I tried it, couldn't get HTTPS to work.

Also my console gets spammed with:

04:43:20.160 [warning] invalid 'event' parameter: size: 6 value: "paused"

but it seems to work. I would've liked to see HTTP stats too but I guess UDP is fine (though I have it disabled)

quechimba

Nice! I'll check this out some point.

I wrote a basic tracker in Elixir a few years ago, here's the code: https://github.com/aalin/mr_torrent

jhgg

Really cool! You looking to write Elixir as your main job?

IlikeKitties

Now that's neat. The Beam VM sounds like a natural fit for a torrent tracker

bavell

Very cool! Is this suitable for using as a private tracker?