Transmission

Transmission is a light-weight and cross-platform BitTorrent client.

Installation

There are several packages available to install Transmission with:

Configuring the GUI version

Both GUI versions, transmission-gtk and transmission-qt, can function autonomously without a formal back-end daemon.

GUI versions are configured to work out-of-the-box, but the user may wish to change some of the settings. The default path to the GUI configuration files is ~/.config/transmission.

A guide to configuration options can be found on Transmission's Github.

Transmission daemon and CLI

The commands for transmission-cli are:

transmission-daemon: starts the daemon.
transmission-remote: invokes the CLI for the daemon, whether local or remote, followed by the command you want the daemon to execute.
transmission-show: returns information on a given torrent file.
transmission-create: creates a new torrent.
transmission-edit: add, delete, or replace a tracker's announce URL.
transmission-cli: (deprecated in favor of transmission-remote) starts a non-daemonized local instance of transmission, for manually downloading a torrent.
tremc: (requires tremc-gitAUR) starts the curses interface for the daemon, whether local or remote.

Starting and stopping the daemon

Transmission's daemon can be run:

  • As the user transmission, by starting/enabling transmission.service. The user can be changed as explained in #Choosing a user.
  • As your own user, by running under your user name:
$ transmission-daemon

Starting the daemon will create an initial configuration file. See #Configuring the daemon.

The daemon can then be stopped with:

$ pkill -3 transmission-daemon

An alternative option to stop Transmission is to use the transmission-remote command:

$ transmission-remote --exit

Reducing journal spam

Running transmission-daemon can lead to a lot of unwanted journal entries. Output can be filtered by starting it with a small wrapper script. The following example also provides some notifications:

Netctl

It may be desirable to run transmission only on certain networks. The following script checks that the connection is to a list of authorized networks and then proceeds to launch transmission-daemon.

Wicd

Create a start script in folder /etc/wicd/scripts/postconnect, and a stop script in folder /etc/wicd/scripts/predisconnect. Remember to make them executable. For example:

Choosing a user

Choose how you want to run :

  • As a separate user, by default (recommended for increased security).

By default, transmission creates a user and a group , with its home files at , and runs as this "user". This is a security precaution, so transmission, and its downloads, have no access to files outside of . Configuration, operation, and access to downloads needs to be done with "root" privileges (e.g. by using sudo).

  • Under your own user.

To set this up, override the provided service file and specify your username:

Configuring the daemon

Create an initial configuration file by starting the daemon.

  • If running Transmission under the username , the configuration file will be located at .
  • If running Transmission under your own username, the configuration file will be located at .

One can customize the daemon by using a Transmission client or using the included web interface accessible via http://localhost:9091 in a supported browser.

A guide to configuration options can be found on the Transmission web site: https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md

Note: Alternatively, the daemon can be instructed to reload its configuration with SIGHUP, by running kill -s SIGHUP $(pidof transmission-daemon).

A recommendation for those running under username is to create a shared download directory with the correct permissions to allow access to both the user and system users, and then to update the configuration file accordingly. For example:

# mkdir /mnt/data/torrents
# chown -R facade:transmission /mnt/data/torrents
# chmod -R 775 /mnt/data/torrents

Now will be accessible for the system user facade and for the group to which the user belongs. Making the target directory world read/writable is highly discouraged (i.e. do not chmod the directory to 777). Instead, give individual users/groups appropriate permissions to the appropriate directories.

An alternative is to add your user to the group () and then modify the permissions on the and directories to allow access by members of the group.

Host whitelist

If you plan to access the Transmission daemon over the network using the server's hostname, you need to add this hostname to in . Otherwise, you will get a "421 Misdirected Request" error when accessing the server.

If you connect to the daemon using the server's IP-address, this is not required.

Watch dir

If you want to Automatically add .torrent files from a folder, but you find that the watch-dir and options set in the configuration file do not work, you can start the transmission daemon with the flag .

If you are using systemd, edit the transmission.service unit as described in systemd#Editing provided units.

Enable IPv6

By default, the daemon only listens for IPv4 connections. To also listen for IPv6 connections, change the rpc-bind-address option to in .

CLI Examples

If you want to remove all finished torrents you can use the following command with your own username and password:

# transmission-remote -n 'username:password' -l | grep 100% | awk '{print $1}'| paste -d, -s | xargs -i transmission-remote -t {} -r

Seed a torrent which has already been downloaded:

# transmission-remote [HOST] --torrent=example.torrent -a example.torrent --verify --download-dir=/dir/to/folder --start

Web Interface

The GUI way

Once Transmission is installed, you can easily set up the web interface. All you need to do is click the edit menu and select preferences. Click the Remote tab and enable Allow remote access.

Here, you have the opportunity to change the default listening port from 9091.

Check the Use authentication and fill in a username and password so that authentication can be used.

To increase security, you can restrict access from any IP address by enabling Only allow these IP addresses.

Now you are ready to launch the web interface by either clicking on the Open web client, which makes your default web browser open it, or manually reaching with any supported web browser.

If you have not changed the listening port, the default one is 9091. In this case, the link is

The CLI way

You do not need a graphical interface to set up the web interface, the daemon offers the very same options. You can reach the web interface without specifing any flags. See #Starting and stopping the daemon

Nevertheless, you can specify everything that you see in the previous section:

is equivalent to 

Optional web UI theme

If the default user interface of the web app seems outdated and less fancy than expected, try using https://git.eigenlab.org/sbiego/transmission-web-soft-theme for a simple CSS theme.

https://github.com/ronggang/transmission-web-control also provides a full replacement that can coexist with the default UI.

Usage as makepkg DLAGENT

Transmission can be used as magnet download agent for makepkg with the transmission-dlagentAUR download agent.

Magnet URIs need their prefix to be changed from to .

Troubleshooting

Cannot access the daemon over the network

The daemon is started after was initialised. However, if you enable the service as opposed to the device-specific service, such as for example, it may happen that Transmission is started too early and cannot bind to the network interface. Thus, the web interface is unreachable. A possible solution is to add the Requires line to the unit's configuration file:

Web interface cannot be reached

Even if you use the graphical interface, you still need to install transmission-cli in order for web interface to work.

Failed to set send/receive buffer

Transmission might display either of these messages in the journal on startup:

UDP Failed to set receive buffer: requested 4194304, got 425984
UDP Failed to set send buffer: requested 1048576, got 425984

These can be fixed by setting and with sysctl.

gollark: > the blame for 9/11 lies in the hands of America’s own leadershipThe blame for 9/11 lies in the hands of the people who decided to hijack a plane or whatever.
gollark: I'm currently physically away from the osmarks.tk servers for a week, so hopefully nothing bad will happen which requires intervention!
gollark: ++delete <@319753218592866315> (bad)
gollark: You should unban the generic rust advocates.
gollark: !typerace 50

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.