Solved How to install transmission server? (Solved, my guide)

Hello, guys

Finally I got it to work correctly and smoothly. Let me recall my steps.

Step 1 - Install transmission packages to FreeBSD, including transmission-cli, transmission-daemon, and transmission-web

sudo pkg install transmission-cli transmission-daemon transmission-web

The transmission-cli is the command line version of transmission, and you could add torrents by

transmission-cli path/of/torrent -w path/to/save/the/downloaded/file

The terminal would display the downloading and uploading rates, the number of seeds, and the number of peers.

My example:

Code:
[admin@Toms-Server /data/Softwares/games]$ transmission-cli ~/hacksaw_ridge.9.84GB.torrent -w /data/

transmission-cli 2.92 (14714)

[2018-02-03 12:15:00.795] Transmission 2.92 (14714) started

[2018-02-03 12:15:00.821] RPC Server: Adding address to whitelist: 127.0.0.1

[2018-02-03 12:15:00.822] UDP: Failed to set receive buffer: No buffer space available

[2018-02-03 12:15:00.822] UDP: Failed to set receive buffer: requested 4194304, got 42080

[2018-02-03 12:15:00.822] DHT: Generating new id

[2018-02-03 12:15:00.848] Saved "/home/admin/.config/transmission/torrents/Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg].5fe475d22cfd7e98.torrent"

[2018-02-03 12:15:00.848] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Pausing

[2018-02-03 12:15:00.848] Changed open file limit from 116937 to 1024

[2018-02-03 12:15:00.849] Saved "/home/admin/.config/transmission/resume/Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg].5fe475d22cfd7e98.resume"

[2018-02-03 12:15:00.849] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Queued for verification

[2018-02-03 12:15:00.849] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Verifying torrent

[2018-02-03 12:15:01.129] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)

[2018-02-03 12:15:01.129] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)

[2018-02-03 12:15:03.233] Port Forwarding (UPnP): Found Internet Gateway Device "http://192.168.1.1:1900/ctl/IPConn"

[2018-02-03 12:15:03.233] Port Forwarding (UPnP): Local Address is "192.168.1.230"

[2018-02-03 12:15:03.274] Port Forwarding (UPnP): Port forwarding through "http://192.168.1.1:1900/ctl/IPConn", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address: 192.168.1.230:51413)

[2018-02-03 12:15:03.274] Port Forwarding (UPnP): Port forwarding successful!

[2018-02-03 12:15:03.274] Port Forwarding: Forwarded

Progress: 0.0%, dl from 0 of 11 peers (0 kB/s[2018-02-03 12:15:18.000] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Starting IPv4 DHT announce (poor, 12 nodes)

Progress: 0.0%, dl from 6 of 22 peers (205 kB/s), ul to [2018-02-03 12:15:38.003] DHT: Attempting bootstrap from dht.transmissionbt.com

Progress: 0.4%, dl from 11 of 24 peers (1.01 MB/s), ul to 2 (0 kB/s) [0.00]   [2018-02-03 12:16:19.360] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Tracker gave HTTP response code 307 (Temporary Redirect)

[2018-02-03 12:16:19.360] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Retrying announce in 20 seconds.

Progre[2018-02-03 12:17:54.967] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Could not connect to tracker

[2018-02-03 12:17:54.967] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Retrying announce in 338 seconds.

Progress: 1.6%, d[2018-02-03 12:18:10.938] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Scrape error: Could not connect to tracker

[2018-02-03 12:18:10.939] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Retrying scrape in 941 seconds.

Progress: 1.8%, dl from 23 of 35 peers (1.23 MB/s), ul to 4 (16[2018-02-03 12:18:25.988] Hacksaw.Ridge.2016.1080p.BluRay.x264-SPARKS[rarbg]: Scrape error: Could not connect to tracker

Step 2 - To configure the transmission-daemon

The file that stores the configurations information of transmission-daemon locates at /usr/local/etc/transmission/home and is called settings.json. At completion of the pkg install, the directory is empty by default until the service of transmission has been start by syntax. Of note is that the owner of the home directory is the user called transmission. You might need sudo privileges to access the home directory.

PS: When you install the transmission-daemon package, the user of transmission is simultaneously created.

Step 3 - To start the transmission service

Add the following code into the /etc/rc.conf file

Code:
transmission_enable="YES"

After that you are able to start transmission service by

sudo service transmission start

Note, its not like the other guys wrote on the Internet. The following command would result errors.

sudo service transmission-daemon start

Compare the two syntax to start the transmission service.

Code:
[admin@Toms-Server /usr/local/etc/transmission]$ sudo service transmission-daemon start

transmission-daemon does not exist in /etc/rc.d or the local startup

directories (/usr/local/etc/rc.d), or is not executable

[admin@Toms-Server /usr/local/etc/transmission]$ sudo service transmission start

Starting transmission.

Final, after the transmission service has been started. The home directory would be look like

Code:
[admin@Toms-Server /usr/local/etc/transmission]$ sudo ls -li home

Password:

total 150

34621 drwxr-xr-x  2 transmission  transmission     2 Feb  3 13:50 Downloads

34624 drwxr-xr-x  2 transmission  transmission     2 Feb  3 13:50 blocklists

34622 drwxr-xr-x  2 transmission  transmission    13 Feb  3 22:22 resume

34654 -rw-------  1 transmission  transmission  2435 Feb  3 14:34 settings.json

34971 -rw-------  1 transmission  transmission   150 Feb  3 22:22 stats.json

34623 drwxr-xr-x  2 transmission  transmission    13 Feb  3 20:43 torrents

[admin@Toms-Server /usr/local/etc/transmission]$

You may want to know the content of the settings.json file and here is mine.

Code:
[admin@Toms-Server /data/transmission/downloads]$ sudo more /usr/local/etc/transmission/home/settings.json

{

    "alt-speed-down": 50,

    "alt-speed-enabled": false,

    "alt-speed-time-begin": 540,

    "alt-speed-time-day": 127,

    "alt-speed-time-enabled": false,

    "alt-speed-time-end": 1020,

    "alt-speed-up": 50,

    "bind-address-ipv4": "0.0.0.0",

    "bind-address-ipv6": "::",

    "blocklist-enabled": false,

    "blocklist-url": "http://www.example.com/blocklist",

    "cache-size-mb": 4,

    "dht-enabled": false,

    "download-dir": "/usr/local/etc/transmission/home/Downloads",

    "download-limit": 100,

    "download-limit-enabled": 0,

    "download-queue-enabled": true,

    "download-queue-size": 5,

    "encryption": 2,

    "idle-seeding-limit": 30,

    "idle-seeding-limit-enabled": false,

    "incomplete-dir": "/data/transmission/downloads",

    "incomplete-dir-enabled": false,

    "lpd-enabled": false,

    "max-peers-global": 200,

    "message-level": 2,

    "peer-congestion-algorithm": "",

    "peer-id-ttl-hours": 6,

    "peer-limit-global": 200,

    "peer-limit-per-torrent": 50,

    "peer-port": 51413,

    "peer-port-random-high": 65535,

    "peer-port-random-low": 49152,

    "peer-port-random-on-start": false,

    "peer-socket-tos": "default",

    "pex-enabled": true,

    "pidfile": "/var/run/transmission/daemon.pid",

    "port-forwarding-enabled": true,

    "preallocation": 1,

    "prefetch-enabled": true,

    "queue-stalled-enabled": true,

    "queue-stalled-minutes": 30,

    "ratio-limit": 2,

    "ratio-limit-enabled": false,

    "rename-partial-files": true,

    "rpc-authentication-required": true,

    "rpc-bind-address": "0.0.0.0",

    "rpc-enabled": true,

    "rpc-host-whitelist": "",

    "rpc-host-whitelist-enabled": true,

    "rpc-password": "XXXXXXXXXXXXXXXXX",

    "rpc-port": 9091,

    "rpc-url": "/transmission/",

    "rpc-username": "transmission",

    "rpc-whitelist": "127.0.0.1",

    "rpc-whitelist-enabled": false,

    "scrape-paused-torrents-enabled": true,

    "script-torrent-done-enabled": false,

    "script-torrent-done-filename": "",

    "seed-queue-enabled": false,

    "seed-queue-size": 10,

    "speed-limit-down": 100,

    "speed-limit-down-enabled": false,

    "speed-limit-up": 100,

    "speed-limit-up-enabled": false,

    "start-added-torrents": true,

    "trash-original-torrent-files": false,

    "umask": 18,

    "upload-limit": 100,

    "upload-limit-enabled": 0,

    "upload-slots-per-torrent": 14,

    "utp-enabled": true

}

PS: Some settings like the default download directory would be reset every time transmission service restarts, I don't know how to fix this. But you can manage your transmission server via remote tool like Transmission Remote GUI (the Transmission Remote GUI project locates at https://github.com/transmission-remote-gui).

At last, I am enjoying my server downloading free movies!

724661c7gy1fo3n4xhknlj21kw128kbn.jpg
 
Thanks for the post thinking about setting this up and it helps.

One thing about the settings.json file is that it will reset if the service is running but if you stop if before making changes it will keep the settings.

Hope this helps

Rob
 
To make the download directory persistent, check documentation in
/usr/local/etc/rc.d/transmission

Spoiler: Add to rc.conf:
transmission_download_dir
 
Hi mates!
How to enable logging in transmission? Is there rc string for that or another solution?

The options are documented in "/usr/local/etc/rc.d/transmission" as mentioned in the post above yours. The bits that are probably specific to your needs are quoted below:

Code:
# transmission_log:          Use alternate log file for transmission.
#                            If not specified, it sends log to rsyslog.
# transmission_log_level:    Set to 'critical', 'error', 'warn', 'info',
#                            'debug' or 'trace' to configure log verbosity.
 
Back
Top