Difference between revisions of "Transmission"

From ArchWiki
Jump to: navigation, search
(Choosing a user: clarify)
m (Use .conf file instead of .service file for setting RequiresMountsFor)
Line 89: Line 89:
 
Now {{ic|/mnt/data/torrents}} will be accessible for the system user '''facade''' and for the '''transmission''' group to which the '''transmission''' user belongs.  Making the target directory world read/writible is highly discouraged (i.e. do not chmod the dir to 777). Instead give individual users/groups appropriate permissions to the appropriate folders.
 
Now {{ic|/mnt/data/torrents}} will be accessible for the system user '''facade''' and for the '''transmission''' group to which the '''transmission''' user belongs.  Making the target directory world read/writible is highly discouraged (i.e. do not chmod the dir to 777). Instead give individual users/groups appropriate permissions to the appropriate folders.
  
{{Note|If {{ic|/mnt/data/torrents}} is located on a removable device, e.g. with an {{ic|/etc/fstab}} entry with the option {{ic|nofail}}, Transmission will complain it cannot find your files. To remedy this, you can add {{ic|1=RequiresMountsFor=/mnt/data/torrents}} to your {{ic|/etc/systemd/system/transmission.service}} unit file (copy it from {{ic|/usr/lib/systemd/system/transmission.service}} if it does not already exist.}}
+
{{Note|If {{ic|/mnt/data/torrents}} is located on a removable device, e.g. with an {{ic|/etc/fstab}} entry with the option {{ic|nofail}}, Transmission will complain it cannot find your files. To remedy this, you can add {{ic|1=RequiresMountsFor=/mnt/data/torrents}} to {{ic|/etc/systemd/system/transmission.service.d/transmission.conf}}.}}
  
 
== See Also ==
 
== See Also ==

Revision as of 11:32, 17 February 2014

Transmission is a light-weight and cross-platform BitTorrent client. It is the default BitTorrent client in many Linux distributions.

Installation

There are several options in official repositories:

Note: The gtk client cannot connect to the daemon, so user wishing to use the daemon will need to consider using the qt package for a gui or the remote-cli package for a curses gui.

Setup

GUI versions

Both GUI versions, transmission-gtk and transmission-qt, can function autonomously without a formal backend daemon. Under this scenario, the default path to the configuration files is ~/.config/transmission.

A guide to configuration options can be found on the transmission website: https://trac.transmissionbt.com/wiki/EditConfigFiles#Options.

Transmission-daemon through Systemd (Recommended)

Enble the transmission daemon to run at system start, using systemd.

$ sudo systemctl enable transmission

To make sure that systemd starts transmission in the right order, create and edit a new file under /etc/systemd/system/transmission.service.d. You can give the file any name you like - in this example it's called "transmission.conf"

$ sudo nano /etc/systemd/system/transmission.service.d/transmission.conf

and put in it:

[Unit]
After=network.target

Choosing a user

Choose how you want to run transmission:

  • As the user transmission (recommended for increased security).

By default, transmission creates a user and a group transmission, with its home files at /var/lib/transmission/, and runs as this "user". This is a security precaution, so transmission, and its downloads, have no access to files outside of /var/lib/transmission/. Configuration, operation, and access to downloads is done as "root", or with sudo privileges.

  • Under the user's own user name.

To set this up, again create or edit the file in /etc/systemd/system/transmission.service.d. This can be the same file you created before, or a new one with a new name:

$ sudo nano /etc/systemd/system/transmission.service.d/transmission.conf

and put in it:

[Service]
User=admin

and reload systemd make it take effect:

$ sudo systemctl daemon-reload

Configuring transmission

Create an initial transmission configuration file by starting the daemon

$ sudo systemctl start transmission
or 
$ transmission-daemon (if running under your own user name)
Note: The command to start or kill the daemon manually, from the command line or from a script, is transmission-daemon, not just transmission.
  • If running transmission under the username transmission, the configuration file will be located at /var/lib/transmission/.config/transmission-daemon/settings.json
  • If running transmission under your own user name, the configuration file will be located at ~/.config/transmission-daemon/settings.json

Customize the options using a transmission client or using the included webinterface accessible via http://localhost:9091 in a supported browser.

The daemon will overwrite its configuration file when it closes, so if you want to edit it manually, you will need to stop it first:

$ sudo systemctl stop transmission
or
$ killall transmission-daemon (if running under your own user name)

A guide to configuration options can be found on the transmission website : https://trac.transmissionbt.com/wiki/EditConfigFiles#Options

A recommendation for those running under user name transmission is to create a shared download directory with the correct permissions to allow access to both the transmission user and system users, and 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 /mnt/data/torrents will be accessible for the system user facade and for the transmission group to which the transmission user belongs. Making the target directory world read/writible is highly discouraged (i.e. do not chmod the dir to 777). Instead give individual users/groups appropriate permissions to the appropriate folders.

Note: If /mnt/data/torrents is located on a removable device, e.g. with an /etc/fstab entry with the option nofail, Transmission will complain it cannot find your files. To remedy this, you can add RequiresMountsFor=/mnt/data/torrents to /etc/systemd/system/transmission.service.d/transmission.conf.

See Also