Transmission Multiple daemon instances

Transmission is a lightweight and stable BT client, it can keep thousands of torrents without crash, so I use it to keep seeding.

About Multiple-User in Transmission

Transmission has a daemon called “transmission-daemon”, it can support Multiple instances with Multiple-User. But in a Debian like system, the apt package will config with a unique user “debian-transmission”. It use the config file /var/lib/transmission-daemon/info/settings.json, this file also a symlink of /etc/transmission-daemon/settings.json.

Usually, transmission will start a transmission service with debian-transmission group. But we will hard to manage the data and service. So we can use Systemd to replace it.

Step1:

create a systemd config for it:

e.g. we create a service called “transmission”:

shutdown current sercice

 
systemctl stop transmission-daemon 

add systemd config:

 
cat >/etc/systemd/system/transmission@.service<<TSD
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=%I
Type=simple
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /home/%i/.config/transmission
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target
TSD 

Step2:

create a directory for config file:

 
mkdir -p /home/${username}/.config/transmission/blocklists
mkdir -p /home/${username}/.config/transmission/resume
mkdir -p /home/${username}/.config/transmission/torrents

we can copy a template config to finish configuration:

 
cp /etc/transmission-daemon/settings.json /home/${username}/.config/transmission/settings.json

modify the username, password and port:

"rpc-password": "${passwd}",
"rpc-username": "${username}",
"rpc-port": ${TRPORT},

add a whitelist to rpc, so that we can manage transmission from pubilc network.

Step3:

create a directory for download and setup permission

mkdir -p /home/${username}/transmission
chown -R ${u}.${u} /home/${username}/transmission
chown -R ${u}.${u} /home/${username}/.config/

Step4:

start service

systemctl stop transmission@${username}

Now, you can access your transmission webui via ip:${TRPORT}. You can also repeat step 2-4 to add more users, you will find the unique process for each user.

, , ,
Previous Post
QuickBox CE vs Pro: Which Is Better?
Next Post
Disable Deluge-Web Authorization

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Menu