Managing the Daemon
The easiest way to run the daemon is just to leave a terminal open after running the following command:
cross-seed daemon
However, that's not very sustainable.
- If you run
cross-seed
on a server that you usessh
to log into, thencross-seed
will stop whenever yourssh
session closes. - If the server restarts, then you'll have to start
cross-seed
manually.
Below are a few ways you can set up cross-seed daemon
to run on its own:
Docker
You can use Docker Compose.
Create or open your existing docker-compose.yml
file and add the cross-seed
service:n
version: "2.1"
services:
cross-seed:
image: ghcr.io/cross-seed/cross-seed:6
container_name: cross-seed
user: 1000:1000 # optional but recommended
ports:
- "2468:2468"
volumes:
- /path/to/config/folder:/config
- # You will need at least one extra volume for your media drive if using https://www.cross-seed.org/docs/tutorials/linking
command: daemon
restart: unless-stopped
After that, you can use the following commands to control it:
docker-compose pull # Update the container to the latest version of cross-seed
docker-compose up -d # Create/start the container
docker start cross-seed # Start the daemon
docker stop cross-seed # Stop the daemon
docker restart cross-seed # Restart the daemon
docker logs cross-seed # view the logs
Unraid
If you are running cross-seed
on Unraid you should have installed the
"Community App" from ambipro's repository, this is our official container.
Be default, the container runs in daemon mode and no changes are needed.
We recommend you head over to the Unraid Tutorial for specifics and documentation for the container.
systemd
(Linux)
If you want to use systemd
to run cross-seed daemon
continuously, you can
create a unit file in /etc/systemd/system
.
touch /etc/systemd/system/cross-seed.service
Open the file in your favorite editor, and paste the following code in. You'll want to customize the following variables and ensure proper permissions are set to allow this user/group to read/write/execute appropriately:
User
: your user, or another user if you want to create a separate user forcross-seed
Group
: your group, or another group if you want to create a separate group forcross-seed
Get your user and group by running the following command:
echo -e "User=$(id -un)\nGroup=$(id -gn)"
[Unit]
Description=cross-seed daemon
[Service]
User=MyUserHere
Group=MyGroupHere
Restart=always
Type=simple
ExecStart=cross-seed daemon
[Install]
WantedBy=multi-user.target
You can also try ExecStart=npx cross-seed daemon
if the one above doesn't
work.
Depending on how you installed cross-seed, you may need to specify absolute
paths to node
and/or cross-seed
.
After installing the unit file, you can use these commands to control the daemon:
sudo systemctl daemon-reload # tell systemd to reindex to discover the unit file you just created
sudo systemctl enable cross-seed # enable it to run on restart
sudo systemctl start cross-seed # start the service
sudo systemctl stop cross-seed # stop the service
sudo systemctl restart cross-seed # restart the service
sudo journalctl -u cross-seed # view the logs
screen
screen
is a terminal multiplexer.
A Terminal multiplexer is a program that can be used to multiplex login sessions inside the Terminal. This allows users to have multiple sessions inside a single Terminal window. One of the important features of the Terminal multiplexer is that users can attach and detach these sessions.
Running a long-lived cross-seed daemon
process in screen
is very easy.
screen -S cross-seed -d -m cross-seed daemon
The above command will start a screen
instance named cross-seed
in
detached
mode, running the cross-seed daemon
command at launch.
To attach to the screen
, run the following command:
screen -r cross-seed
Once attached, you can detach with ctrl-A, D
.
Windows
cross-seed
AND YOUR TORRENT CLIENT MUST BE ON THE SAME OS TO USE LINKING
(DOCKER ALWAYS RUNS ON LINUX, EVEN ON WINDOWS)
You can still use cross-seed
without linking, but the features will be
limited.
If you are using Windows 11, you can use the built-in Task Scheduler to run
cross-seed daemon
after logging in to your user account.
(These instructions should apply to all versions of Windows after Vista).
-
Launch "Task Scheduler" from the Start Menu
-
Right-click on "Task Scheduler Library" and select "Create Basic Task"
-
Enter "Cross Seed" as the name and click "Next"
-
Select "When I log on" as the trigger and click "Next"
-
Select "Start a program" as the action and click "Next"
-
Configure the launch command:
a. After you've installed cross-seed, you can locate the executable that is used to launch it by using the command
where cross-seed
from a command prompt/terminal. Simply paste the path in the "Program/script" box.b. In the "Add arguments" box, enter
daemon
c. Click "Next"
-
Check the box to select "Open the Properties dialog for this task when I click Finish", then click "Finish"
-
Select the option for "Run whether user is logged on or not", then click "OK"
-
You may want to explore the rest of the advanced options to fine-tune the behavior.
-
Finally, test that this works by restarting your PC and checking the cross-seed logs for activity