When you press play in Stremio, two separate things are working: the player (the UI) and a streaming server β a background service that takes a torrent infohash from an addon, pulls the right bytes from the swarm, and serves them to the player as a normal video stream. The player is open. The streaming server is closed-source β and that's where the interesting limitations live.
I rebuilt that streaming server as an open component on top of libtorrent, bundled it with the web player in one container, and put it on GitHub. Here's what changed and why.
Problem 1: the stock server only reaches half the swarm
The closed server is effectively outbound-only β it dials out to peers but never listens for incoming connections. In a BitTorrent swarm, a large share of peers are themselves behind NAT and can only be reached if someone else initiates β so an outbound-only client silently never connects to them. On a healthy torrent you don't notice; on a thin one, you're starved for no good reason.
The open server listens for inbound peers (one forwarded port, 6881). Suddenly you can reach the connectable and the inbound-only half of the swarm. On sparse torrents that's the difference between buffering and playing.
Problem 2: it fetches bytes in the wrong order, and hides the levers
A general torrent client downloads to complete the file. A streaming server should download to feed the playhead β the bytes you're about to watch in the next few seconds, first. The closed server gives you little control here.
The open one is playhead-first: it sets piece deadlines around your current position, keeps a sliding read-ahead window, and re-focuses bandwidth the moment you seek. Baseline priority for everything else is low, so the swarm's bandwidth goes where your eyes are. Result: faster starts, fewer rebuffers.
The rest
Hardware transcoding (NVENC / VAAPI) for the occasional client that can't direct-play β and it starts fine with no GPU (a missing or broken driver never blocks startup).
Trusted HTTPS that TVs accept, generated automatically β no certificate wrangling.
One docker run brings up the engine and the web player on a single origin.
It's deliberately content-neutral
This is infrastructure, not a content source. It streams whatever infohash a Stremio addon hands it; it bundles, indexes, and scrapes nothing. What you point it at is your responsibility β same as any BitTorrent client.
Try it
docker run -d --name stremio --restart unless-stopped \
-e IPADDRESS=YOUR_SERVER_IP \
-p 8080:8080 -p 12470:12470 -p 6881:6881/tcp -p 6881:6881/udp \
-v stremio-data:/root/.stremio-server \
androshack/stremio-libtorrent-server
MIT-licensed, and not monetized β it's a contribution to people who want their own open, private streaming server.
Repo: https://github.com/andrewhack/stremio-libtorrent-server













