Setup
Heroku
Heroku forbids P2P services, so your account can be suspended (learn more)
Deploy to Heroku with one click, works with free tier!
Okteto
Okteto forbids P2P services, so your account can be suspended (learn more).
Deploy to Okteto with one click, works with free tier!
NPM package
The npm module can be installed with npm or yarn on a local machine, depending on your preference.
npm install -g torrent-stream-server
Once installed, you can always run torrent-stream-server --help
to see a list of available commands.
Run server
torrent-stream-server serve
Go to http://127.0.0.1:3000
Configuration
You can pass configuration file with -c
argument:
torrent-stream-server serve -c config.json
NPX
You can run using NPX:
npx torrent-stream-server serve
From source
git clone https://github.com/KiraLT/torrent-stream-server.git
cd torrent-stream-server
npm install
npm run build
npm run start
Go to http://127.0.0.1:3000
Docker
This will start a new instance with latest version listening on 3000
port (see all versions).
docker run -d --name torrent-stream-server ghcr.io/kiralt/torrent-stream-server:latest
Custom port
If you’d like to be able to access the instance from the host without the container’s IP, standard port mappings can be used:
docker run -d --name torrent-stream-server -p 80:3000 ghcr.io/kiralt/torrent-stream-server:latest
You’ll be able to access it on http://localhost
Kubernetes
Deploy with Helm3
# Add repository (add only once)
helm3 repo add torrent-stream-server https://kiralt.github.io/torrent-stream-server
helm3 repo update
# Install or update
helm3 upgrade --install torrent-stream-server torrent-stream-server/torrent-stream-server
Configuration
You can change configuration by providing values.yaml.
Examples
Add custom domain
helm3 upgrade --set ingress.host=domain.com --install torrent-stream-server torrent-stream-server/torrent-stream-server
Set ENV variables
helm3 upgrade --set env.API_KEY="my key" --install torrent-stream-server torrent-stream-server/torrent-stream-server
VPS
Cheapest way to host something is using VPS (Virtual private server). Check The safest countries to download torrents.
Setup
- When buying VPS choose latest ubuntu OS
- Connect to server via SSH (use PuTTY on Windows).
- Fetch latest packages info:
sudo apt update
- Update all packages:
sudo apt upgrade
- Add NodeJS package:
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
- Install NodeJS:
sudo apt-get install -y nodejs
- Install PM2 process manager:
sudo npm install pm2 -g
- Install Torrent Stream Server:
sudo npm install torrent-stream-server -g
- Start Torrent Stream Server on port 80 with process manager:
sudo PORT=80 pm2 --update-env start torrent-stream-server -- serve
Go to http://127.0.0.1 (replace
127.0.0.1
with your server IP). If you get unsafe warning - check how to bypass it on chrome.
SSL & custom domain
Easiest way to connect custom domain and SSL is using Cloudflare DNS. Forward your custom DNS to Cloudflare, then add an A
record with your server’s IP address. Cloudflare will automatically proxy all requests with that domain and free SSL certificate.