Before installing new software it is always good to make sure the system is up to date, for that follow the instructions in page Update Raspberry Pi OS System.

Install the transmission torrent daemon:

    $ sudo apt-get install transmission-daemon

Create two folders, one for in progress downloads and another one for complete downloads, for example:

    $ sudo mkdir -p /media/USBHDD1/torrent-inprogress
    $ sudo mkdir -p /media/USBHDD1/torrent-complete

Edit the transmission configuration file to add some settings:

    $ sudo nano /etc/transmission-daemon/settings.json

Set the in progress downloads directory:

"incomplete-dir": "/media/NASHDD1/torrent-inprogress",

Set the complete downloads directory:

"download-dir": "/media/NASHDD1/torrent-complete",

Enable using an in progress downloads directory:

"incomplete-dir-enabled": true,

Set a paswword for transmission. Once it the daemon has been loaded the password will be replaced by its hash:

"rpc-password": "Your_Password",

Set the user name, by default it’s “transmission”:

"rpc-username": "transmission",

Set the servers that can connecto to transmission:

"rpc-whitelist": "192.168.*.*",

Now edit the transmission daemon startup script to change the user:

    $ sudo nano /etc/init.d/transmission-daemon

Set the user name to “pi”:

USER=pi

Now edit the daemon service configuration file:

sudo nano /etc/systemd/system/multi-user.target.wants/transmission-daemon.service

Set the user name to “pi” as well:

USER=pi

Now reload the daemon

    $ sudo systemctl daemon-reload

Change the owner and group of the transmission directory:

    $ sudo chown -R pi:pi /etc/transmission-daemon

Next create a link to the settings file in the home diretory of the “pi” user:

    $ sudo mkdir -p /home/pi/.config/transmission-daemon/
    $ sudo ln -s /etc/transmission-daemon/settings.json /home/pi/.config/transmission-daemon/
    $ sudo chown -R pi:pi /home/pi/.config/transmission-daemon/

And last, start the transmission daemon:

    $ sudo systemctl start transmission-daemon

You should now be able to connect to transmission using http://“IP address”:9091/transmission/web/