Skip to content

transmission package

negan07 edited this page May 2, 2021 · 32 revisions

opkg update && opkg install transmission

Dependencies: zlib, openssl, curl ( >= 7.76.0 ), libiconv, libevent, ancistrus-core ( >= 1.6.0 )

Binaries included: transmission-daemon

Config files: /usr/transmission/settings.json (copied into usb shared device /mnt/shares/U|T|R|S/.Transmission/ config dir at first run or on settings reset only)

GUI section: Storage

Web Server: default included (no QT, no GTK)

Docs:

TRANSMISSION

TRANSMISSION Wiki

Usage:

rc_transmission < mount remount kmount init reconfig start restart startforced restartforced reloadconf umount kumount stop info fwup fwdown showlog clearlog reset > (<debug>)

rc_transmission start|restart|mount|remount|kmount|init|reconfig - Stop, create environmental vars, dirs & files and start transmission-daemon if enabled.

rc_transmission startforced|restartforced - Stop and start transmission anyway without checking transmission_enable nvram setting.

rc_transmission reloadconf - Used to reload settings.json config file (after making modifications) while running transmission-daemon.

rc_transmission umount|kumount|stop - Stop transmission-daemon.

rc_transmission info - Internal purpose usage only (do nothing).

rc_transmission fwup - (Re)create peer port (tcp/udp) forward & inbound firewall nat rules.

rc_transmission fwdown - Delete peer port (tcp/udp) forward & inbound firewall nat rules.

rc_transmission showlog - Show transmission log events file.

rc_transmission clearlog - Clear transmission log events file.

rc_transmission reset - Stop transmission-daemon & restore the default nvram variables & settings.

Note that some recipes are related to rc_usb_service caller script.

rc_usb_service [mount|umount|remount|kmount|kumount|init|reconfig|stop|info] .

Debug

rc_transmission start debug

Run transmission-daemon in foreground mode showing all pedantic messages on console screen for debug purpose usage. Press Ctrl+C to terminate.

Web GUI Buttons

Click Cancel to discard changes.

Click Reset to stop daemon & restore the default settings (rc transmission reset).

Click Open GUI to open the main transmission webpage GUI server used to add/remove torrents, setup bandwidths, stats, peers connected and so on.

Click Show Log to show transmission log events file (rc transmission showlog).

Click Delete Log to clear transmission log events file (rc transmission clearlog).

Click Apply to save settings, apply changes & restart transmission-daemon. (rc transmission start)

Nvram variables:

transmission_enable = 0|1 (0)

transmission_nocert 0|1 (0)

transmission_rpc_port = <1-65534> (9091)

transmission_volumedir = (/mnt/shares/U|T|R|S)

transmission_dldir = (/mnt/shares/U|T|R|S/Download)

transmission_incdldir_enable = 0|1 (0)

transmission_watchdir_enable = 0|1 (0)

Transmission Daemon

Transmission is a BitTorrent client, suitable to be used with embedded device router systems.

It requires a mandatory storage device connected and correctly mounted through a router USB port, otherwise this service cannot be enabled.

Transmission

GUI

To enable and run Transmission daemon tick/untick Enable Transmission Daemon then click Apply .

CONSOLE

To Enable service type:

nvram set transmission_enable=1

Then restart daemon typing:

rc transmission start

To Disable service type:

nvram set transmission_enable=0

rc transmission stop

Skip SSL Certificate Verification

Set this to avoid SSL Certificate Verification when connecting to torrent trackers through https (curl).

Generally there's no need to skip SSL certs check and this option can be left disabled (unchecked).

Note that if no bundle cert file ca-bundle.crt (provided by curl package) is available on the router, the skip will be automatically set even if this option has not been selected (https trackers will be connected in unsecure mode).

GUI

To enable/disable Skip SSL Certificate Verification tick/untick Skip SSL Certificate Verification then click Apply .

CONSOLE

To skip SSL cert verification type:

nvram set transmission_nocert=1

To mantain SSL cert verification active type:

nvram set transmission_nocert=0

Apply modifications, typing:

rc transmission start

Web Server Port

TCP Port used for the internal RPC Transmission Web Server.

Note that this port number differs from port-forwarded TCP/UDP peer-port used for peer incoming connections.

The peer-port (random) number can be set on Transmission related JSON config file only (see later).

GUI

Enter the Web Server Port then click: Apply .

CONSOLE

To change the web server port type:

nvram set transmission_rpc_port=<1-65534>

Apply modifications, typing:

rc transmission start

Revert to default typing:

nvram unset transmission_rpc_port

Apply modifications, typing:

rc transmission start

Edit Config File

All the transmission settings are included into JSON setting.json format file, located into the main transmission config dir .Transmission, in turn located into the shared device volume root dir (e.g. /mnt/shares/U/.Transmission/ )

This setting file can be modified but cannot be moved, and its related default one is located in /usr/transmission/ router dir. It is copied into the shared device volume root dir when clicking Reset ( rc_transmission reset ).

There are many settings. The exhaustive list and descriptions are present on the Transmission WIKI board guide itself:

Config Options

GUI

Click Edit Config to edit settings.json config file content on the opening web page.

Make the desired configuration taking care of Transmission Config Options descriptions above: in particular, take care of data types, brackets, quotes and spacing to avoid failures.

Click Save to save settings and return to previous Transmission GUI page or Cancel to discard modifications.

Click Reload Conf to apply settings on the fly during Transmission Daemon execution without losing actual peer connections and ul/dl sessions.

Note that in this case Transmission Web Server page must be reloaded or closed/reopened to apply related changes on the GUI.

Note also that if Transmission Daemon is not running, Transmission Web server is not running too.

Click Apply , instead, to completely restart Transmission Daemon.

CONSOLE

Type:

vi $(anc nvram drget transmission_volumedir /mnt/shares/U)/.Transmission/settings.json

Type: i and make the modification needed, then press < ESC > and: :wq to save settings, :q! to discard them.

Apply modifications on running daemon typing:

rc_transmission reloadconf

Restart daemon typing:

rc_transmission restart

Revert to default typing:

rc_transmission reset

Select Home Dir Path

Select the desired storage device Volume path where Transmission will create its own config dirs and files.

The Transmission config dir will be located into the device root mount point and named .Transmission and cannot be changed until a new Volume Letter Path is set.

(e.g. /mnt/shares/U/.Transmission )

GUI

The list of the available volumes (U, T, R, S) is dynamically created when loading the web page.

Select the desired Storage Device Volume Letter Path from the list then click: Apply .

Note that changing the Storage Device Volume Letter Path, next Download Dir must be changed accordingly.

CONSOLE

Enter the desired volume path typing:

nvram set transmission_volumedir=/mnt/shares/U|T|R|S

Apply modifications, typing:

rc transmission start

Revert to default (the first volume available from the list) typing:

nvram unset transmission_volumedir

Apply modifications, typing:

rc transmission start

Download Dir

Select the desired storage device Download Dir where Transmission will download all the torrent files.

The Transmission download dir must be an absolute dir name and it must be located into the same device of Transmission Home Dir and can be named freely.

(e.g. /mnt/shares/U/Download )

GUI

Enter the desired Download Dir into the box then click: Apply .

Note that modifying the above Home Dir Path, the Download Dir must be changed accordingly.

CONSOLE

Enter the desired download dir typing:

nvram set transmission_dldir=/mnt/shares/U|T|R|S/<ANYNAME>

Apply modifications, typing:

rc transmission start

Revert to default typing:

nvram unset transmission_dldir

Apply modifications, typing:

rc transmission start

Incomplete Dir

Set this to enable/disable the directory to keep files in until related torrent is complete.

The directory is located in: /mnt/shares/U|T|R|S/.Transmission/incomplete/ and cannot be changed.

GUI

To enable/disable Incomplete Torrent Dir tick/untick Enable Incomplete Torrent Dir then click Apply .

CONSOLE

To Enable service type:

nvram set transmission_incdldir_enable=1

To Disable service type:

nvram set transmission_incdldir_enable=0

Apply modifications, typing:

rc transmission start

Watch Dir

Set this to enable/disable the directory watching for torrent files addition adding them to transmission.

The directory is located in: /mnt/shares/U|T|R|S/.Transmission/watch/ and cannot be changed.

GUI

To enable/disable Watch Torrent Dir tick/untick Enable Watch Torrent Dir then click Apply .

CONSOLE

To Enable service type:

nvram set transmission_watchdir_enable=1

To Disable service type:

nvram set transmission_watchdir_enable=0

Apply modifications, typing:

rc transmission start

Torrent Finished Script

Transmission can invoke a shell script when finished a torrent download: here it's possible to create and edit it.

The script is located in: /mnt/shares/U|T|R|S/.Transmission/transm_done.sh and cannot be moved.

To enable script invocation the related Config file option: "script-torrent-done-enabled" must be set to true (see above Modify Transmission Daemon Configuration).

Fore more infos & support:

On Torrent Completion

Here's a possible template example script:

#!/bin/sh
mv -f "${TR_TORRENT_DIR}/${TR_TORRENT_NAME}" /mnt/shares/U/Finished
exit 0

GUI

Click Create/Edit Script to edit torrent-finished-script file content bash compatible (type: busybox for the available commands list).

Click Save to save script file and return to previous Transmission GUI page or Cancel to discard modifications.

To enable script invocation click Edit Config and setup:

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

to change Transmission settings (see above Modify Transmission Daemon Configuration).

Click Reload Conf to apply settings on the fly while running daemon or click Apply to completely restart Transmission Daemon.

CONSOLE

Type:

vi $(anc nvram drget transmission_volumedir /mnt/shares/U)/.Transmission/transm_done.sh

Type: i and make the modification needed, then press < ESC > and: :wq to save settings, :q! to discard them.

Then, to enable script invocation from Transmission settings: vi $(anc nvram drget transmission_volumedir /mnt/shares/U)/.Transmission/settings.json

Type: i, fetch script-torrent-done-enabled line, edit it as follows:

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

Then press < ESC > and: :wq to save settings, :q! to discard them.

Apply modifications on running daemon typing:

rc_transmission reloadconf

Restart daemon typing:

rc_transmission restart

Install a Blocklist

A Blocklist is a list of peer addresses to block.

The blocklist is located in: /mnt/shares/U|T|R|S/.Transmission/blocklists/ dir and cannot be moved.

To enable blocklists usage, the related Config file option: "blocklist-enabled" must be set to true (see above Modify Transmission Daemon Configuration).

Fore more infos & support:

Blocklists

GUI

Select the blocklist and click: Install .

To enable blocklist usage, click Edit Config and setup:

"blocklist-enabled": true,

to change Transmission settings (see above Modify Transmission Daemon Configuration).

Click Reload Conf to apply settings on the fly while running daemon or click Apply to completely restart Transmission Daemon.

CONSOLE

Copy the blocklist file into: /mnt/shares/U|T|R|S/.Transmission/blocklists/ dir in any way, (e.g. through samba sharing or scp ).

Then, to enable script invocation from Transmission settings: vi $(anc nvram drget transmission_volumedir /mnt/shares/U)/.Transmission/settings.json

Type: i, fetch script-torrent-done-enabled line, edit it as follows:

"blocklist-enabled": true,

Then press < ESC > and: :wq to save settings, :q! to discard them.

Apply modifications on running daemon typing:

rc_transmission reloadconf

Restart daemon typing:

rc_transmission restart