Difference between revisions of "Transmission"

From ArchWiki
Jump to: navigation, search
m (format)
m (Without Using the Systemd Service: transmission-daemon can also be run as standard user.)
(10 intermediate revisions by 7 users not shown)
Line 6: Line 6:
  
 
== Installation ==
 
== Installation ==
 
 
There are several options in [[official repositories]]:
 
There are several options in [[official repositories]]:
 +
* {{Pkg|transmission-cli}} - CLI tools, daemon, and web client.
 +
* {{Pkg|transmission-gtk}} - GTK+ GUI.
 +
* {{Pkg|transmission-qt}} - Qt GUI.
 +
* {{Pkg|transmission-remote-cli}} - Curses interface for the daemon.
  
* {{Pkg|transmission-cli}} - includes CLI tools, daemon and web client
+
{{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.}}
  
* {{Pkg|transmission-gtk}} - GTK+ GUI
+
At a minimum, the -cli package is required.  See note above when choosing between the -gtk and -qt packages.
 
+
* {{Pkg|transmission-qt}} - Qt GUI
+
  
 
== Configuration ==
 
== Configuration ==
 +
Users need to make a decision regarding how transmission is to run on the system:
 +
# As the transmission user daemonized (recommended for increased security).
 +
# As their user without a daemon.
  
For transmission-gtk and transmission-qt, the default path of configuration files is {{ic|~/.config/transmission}}.
+
=== Using the Systemd Service (Recommended) ===
 
+
Start the {{ic|transmission}} daemon [[systemd#Using units|using systemd]]. Customize the options using a transmission client or using the included webinterface accessible via http://localhost:9091 in a supported browser.  Alternatively, the options can be modified using a text editor. The package default location is {{ic|/var/lib/transmission/.config/transmission-daemon/settings.json}} which should be edited while the daemon is not running.
For transmission-cli, default configuration path is {{ic|~/.config/transmission-daemon}}.
+
 
+
=== Run as a daemon ===
+
 
+
Start the ''transmission'' [[daemon]].
+
 
+
Navigate to http://127.0.0.1:9091 in your web browser to see the web client.
+
 
+
You can edit the main configuration file {{ic|~/.config/transmission-daemon/settings.json}} to fit your preference. '''You need to stop the daemon''' before editing configuration files, or your edits '''will not be saved'''.
+
By default, the daemon will run as the user ''transmission'', whose home directory is {{ic|/var/lib/transmission/}}. This means the default location for the configuration file is {{ic|/var/lib/transmission/.config/transmission-daemon/settings.json}}.
+
 
+
{{Note|If you cannot find the {{ic|~/.config/transmission-daemon}} folder, run {{ic|transmission-daemon}} once to create it.}}
+
 
+
If you change your download location, make sure the ''transmission'' user has read/write privileges to your download directory.
+
 
+
==== Changing daemon user ====
+
 
+
If you use systemd, you have to override the user in both the service file ({{ic|/usr/lib/systemd/system/transmission.service}}) and the tmpfile ({{ic|/usr/lib/tmpfiles.d/transmission.conf}}). To do so, copy both files to the appropriate directory in {{ic|/etc}}:
+
# cp /usr/lib/systemd/system/transmission.service /etc/systemd/system/
+
# cp /usr/lib/tmpfiles.d/transmission.conf /etc/tmpfiles.d/
+
 
+
Create a new group named for example, {{ic|transmission}}:
+
# groupadd transmission
+
  
Add your custom user to the newly created {{ic|1=[group]}} ie. {{ic|transmission}}:
+
{{Note|The above is not created until the daemon is run initially.}}
# gpasswd -a [user] [group]
+
  
Then change {{ic|1=User=}} to your custom user in the service file and edit the tmpfile to the following:
+
A recommendation for those running daemonized is to create a shared directory with the correct permissions to allow access to both the transmission user, and system users.  For example:
{{hc|/etc/tmpfiles.d/transmission.conf|
+
# mkdir /mnt/data/torrents
d /run/transmission - [user] [group] -}}
+
# chown -R facade:transmission /mnt/data/torrents
Then run {{ic|systemd-tmpfiles --create transmission.conf}} and restart the transmission service.
+
# chmod -R 775 /mnt/data/torrents
  
You may need to reload service files after editing:
+
Now {{ic|/mnt/data/torrents}} is accessible for the system user '''facade''' and for the '''transmission''' group to which the '''transmission''' user belongs. Using chmod to make the target directory world read/writible is highly discouraged (i.e. do not chmod the dir to 777).  There are multiple way to allow a directory to be used by several users/groups.  Consult google for additional options.
  # systemctl daemon-reload
+
  
Don't forget to change permissions to '''777''' on folder '/run/transmission'.
+
=== Without Using the Systemd Service ===
 +
Both transmission-gtk and transmission-qt can function autonomously without a formal backend daemon.  The default path of configuration files is under this scenario is {{ic|~/.config/transmission}}.
  
If you would use Transmission daemon with its own group, you have to give the writing permission to transmission group in your download's directory. For this you need to run:
+
When run with standard user rights, transmission-daemon configuration files are saved under {{ic|~/.config/transmission-daemon}}. By default the download location is set to {{ic|~/Downloads}}.
# chgrp transmission /path/to/download
+
# chmod g+w /path/to/download
+
  
== See also ==
+
== See Also ==
  
 
*[https://trac.transmissionbt.com/wiki Transmission wiki]
 
*[https://trac.transmissionbt.com/wiki Transmission wiki]
 
*[https://trac.transmissionbt.com/wiki/HeadlessUsage/General HeadlessUsage]
 
*[https://trac.transmissionbt.com/wiki/HeadlessUsage/General HeadlessUsage]

Revision as of 13:44, 4 January 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.

At a minimum, the -cli package is required. See note above when choosing between the -gtk and -qt packages.

Configuration

Users need to make a decision regarding how transmission is to run on the system:

  1. As the transmission user daemonized (recommended for increased security).
  2. As their user without a daemon.

Using the Systemd Service (Recommended)

Start the transmission daemon using systemd. Customize the options using a transmission client or using the included webinterface accessible via http://localhost:9091 in a supported browser. Alternatively, the options can be modified using a text editor. The package default location is /var/lib/transmission/.config/transmission-daemon/settings.json which should be edited while the daemon is not running.

Note: The above is not created until the daemon is run initially.

A recommendation for those running daemonized is to create a shared directory with the correct permissions to allow access to both the transmission user, and system users. For example:

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

Now /mnt/data/torrents is accessible for the system user facade and for the transmission group to which the transmission user belongs. Using chmod to make the target directory world read/writible is highly discouraged (i.e. do not chmod the dir to 777). There are multiple way to allow a directory to be used by several users/groups. Consult google for additional options.

Without Using the Systemd Service

Both transmission-gtk and transmission-qt can function autonomously without a formal backend daemon. The default path of configuration files is under this scenario is ~/.config/transmission.

When run with standard user rights, transmission-daemon configuration files are saved under ~/.config/transmission-daemon. By default the download location is set to ~/Downloads.

See Also