Wiki > cross-seed
cross-seed finds torrents on your other trackers that match data you already have, and adds them to your torrent client so they seed straight away with nothing to download. Check each tracker's rules before cross-seeding. 17402 was randomly generated for this article; you may use any 5-digit port between 10000 and 32767.
Installation
- Connect to your slot via SSH.
- Install cross-seed with the server's Node.js:
npm install --prefix ~/cross-seed cross-seed@6npm warns thatbetter-sqlite3has install scripts not covered byallowScripts; the warning can be ignored. - Make the
cross-seedcommand available (skip thePATHline if you've already done it for another program):mkdir -p ~/bin && ln -sf ~/cross-seed/node_modules/.bin/cross-seed ~/bin/cross-seedecho "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc - Generate the configuration file:
cross-seed gen-config - Set the port and listen on the server only:
sed -i -e 's/port: 2468,/port: 17402,/' -e 's/host: "0.0.0.0",/host: "127.0.0.1",/' ~/.cross-seed/config.js
Configuration
Open the configuration file with nano ~/.cross-seed/config.js. Each option has a comment explaining it; the options reference has more detail. Don't delete options you aren't using. cross-seed won't start until the following are set:
- torznab: one URL per indexer, each ending in
/apiand including the API key.- Prowlarr: on the Indexers page, click an indexer and copy its Torznab URL, then add
?apikey=and the API key from Settings > General, for example"https://app.example.box.ca/1/api?apikey=YOUR_KEY". - Jackett: use Copy Torznab Feed on an indexer, then add
api?apikey=and the API key shown at the top of the page, for example"https://app.example.box.ca/api/v2.0/indexers/INDEXER/results/torznab/api?apikey=YOUR_KEY".
- Prowlarr: on the Indexers page, click an indexer and copy its Torznab URL, then add
- torrentClients: the client cross-seed adds torrents to. Replace
PASSWORDwith the client's password.- rTorrent:
["rtorrent:https://user:PASSWORD@server.whatbox.ca/xmlrpc"] - qBittorrent:
["qbittorrent:http://user:PASSWORD@localhost:WEBUI_PORT"], whereWEBUI_PORTis the port under Tools > Options > WebUI in qBittorrent. - Deluge and Transmission formats are listed in the options reference.
- rTorrent:
- linkDirs: a folder inside
~/filesfor the hardlinks cross-seed makes, for example["/home/user/files/cross-seed"]. Hardlinks take no extra space. This is required unless you setmatchMode: "strict",. See the linking guide formatchModeandlinkType.
Save with Ctrl + S and exit with Ctrl + X.
Starting cross-seed
- Start the daemon:
screen -dmS cross-seed node /home/user/cross-seed/node_modules/cross-seed/dist/cmd.js daemon - Check that it's running:
screen -lsshould listcross-seed. If it doesn't, runcross-seed daemonto see the configuration errors, fix them in the config file, pressCtrl+Cand repeat step 1. - Show your API key, which other apps need to talk to cross-seed:
cross-seed api-key
You can watch cross-seed's output with screen -r cross-seed, and detach again with Ctrl+A, then D.
Search on download completion (optional)
cross-seed searches your indexers on its own schedule (searchCadence, rssCadence). To also search as soon as a torrent finishes, have the client call cross-seed's webhook. Replace YOUR_API_KEY with the key from cross-seed api-key.
- qBittorrent: Tools > Options > Downloads, tick Run external program on torrent finished and enter:
curl -XPOST http://localhost:17402/api/webhook?apikey=YOUR_API_KEY --data-urlencode "infoHash=%I" - autobrr: follow the announce guide, using
http://localhost:17402/api/announce?apikey=YOUR_API_KEYas the endpoint.
Automatically Restart (optional)
- Create a script:
touch ~/cross-seed_restart.cron && nano -w ~/cross-seed_restart.cron - Paste in:
#!/bin/bash
if pgrep -fx "node /home/user/cross-seed/node_modules/cross-seed/dist/cmd.js daemon" > /dev/null
then
echo "cross-seed is running."
else
echo "cross-seed is not running, starting cross-seed"
screen -dmS cross-seed node /home/user/cross-seed/node_modules/cross-seed/dist/cmd.js daemon
fi
exit
- Save and exit, then make it executable:
chmod +x ~/cross-seed_restart.cron - Open your crontab with
EDITOR=nano crontab -eand add:
@reboot /home/user/cross-seed_restart.cron >/dev/null 2>&1
*/5 * * * * /home/user/cross-seed_restart.cron >/dev/null 2>&1
HTTPS via Managed Links (optional)
Only needed if something outside your slot, such as autobrr on another machine, sends announces or webhooks to cross-seed. Add a custom app on the Manage Links page named cross-seed with port 17402, then use https://cross-seed.example.box.ca in place of http://localhost:17402. Every request still needs the API key.
Updating
- Comment out the cron lines with
EDITOR=nano crontab -eif you set them up. - Stop cross-seed:
pkill -fx "node /home/user/cross-seed/node_modules/cross-seed/dist/cmd.js daemon" - Update:
npm install --prefix ~/cross-seed cross-seed@6 - Start it again with step 1 of Starting cross-seed, and uncomment the cron lines.
Moving from the yarn install
Earlier versions of this article installed cross-seed with nvm and yarn. Your configuration in ~/.cross-seed works as it is.
- Stop the old daemon:
screen -S cross-seed -X quit - Remove the yarn install:
yarn global remove cross-seed node-gyp - Remove the line
PATH=$HOME/.yarn/bin:$PATHfrom~/.bashrcwithnano ~/.bashrc, then runsource ~/.bashrc. - Follow Installation steps 2 and 3, then Starting cross-seed. If you used the old restart command in your crontab, replace it with the script above.
nvm can stay; if nothing else uses it, remove ~/.nvm and the nvm lines at the end of ~/.bashrc.
Uninstalling
- Stop cross-seed and remove the cron lines, as in Updating.
- Remove the program and its data:
rm -r ~/cross-seed ~/.cross-seed ~/bin/cross-seed ~/cross-seed_restart.cron - Torrents cross-seed added stay in your client. Remove them there before deleting your
linkDirsfolder.
Troubleshooting
cross-seed: command not found: runsource ~/.bashrc, or redo Installation step 3.invalid XMLor401for an indexer: the Torznab URL is wrong or missing its API key. Use the per-indexer URL ending in/api, not the indexer manager's base address.RangeError: WebAssembly.instantiate(): Out of memory: putNODE_OPTIONS=--disable-wasm-trap-handlerin front ofscreenin the start command and the restart script.- cross-seed stops straight after starting: the configuration is invalid. Run
cross-seed daemonto see why; each error names the option to fix.