Difference between revisions of "Transmission"

From ArchWiki
Jump to: navigation, search
m (Changing daemon user: ic directory reference)
m (Installation: Added note about requiring transmission-cli for web-client)
(3 intermediate revisions by 3 users not shown)
Line 14: Line 14:
  
 
* {{Pkg|transmission-qt}} - Qt GUI
 
* {{Pkg|transmission-qt}} - Qt GUI
 +
 +
If you install {{Pkg|transmission-gtk}} or {{Pkg|transmission-qt}} and you want to use the remote web client then you must also install {{Pkg|transmission-cli}} as that is where the {{ic|/usr/share/transmission/web/}} files are packaged.
  
 
== Configuration ==
 
== Configuration ==
Line 23: Line 25:
 
=== Run as a daemon ===
 
=== Run as a daemon ===
  
Start the ''transmission'' [[daemon]].
+
Start the {{ic|transmission}} daemon [[systemd#Using units|using systemd]].
  
Navigate to http://127.0.0.1:9091 in your web browser to see the web client.
+
Navigate to http://localhost: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'''.
 
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'''.
Line 35: Line 37:
  
 
==== Changing daemon user ====
 
==== Changing daemon user ====
 
+
To change the user the daemon is running as, simply override {{ic|1=User=}} in the service file with a drop-in config (see [[systemd#Editing provided unit files]]):
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}}:
+
{{hc|/etc/systemd/system/transmission.service.d/user.conf|2=<nowiki>
# cp /usr/lib/systemd/system/transmission.service /etc/systemd/system/
+
[Service]
# cp /usr/lib/tmpfiles.d/transmission.conf /etc/tmpfiles.d/
+
User=<custom user></nowiki>}}
 
+
Then run the following to reload the service file:
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}}:
+
# gpasswd -a [user] [group]
+
 
+
Then change {{ic|1=User=}} to your custom user in the service file and edit the tmpfile to the following:
+
{{hc|/etc/tmpfiles.d/transmission.conf|
+
d /run/transmission - [user] [group] -}}
+
Then run {{ic|systemd-tmpfiles --create transmission.conf}} and restart the transmission service.
+
 
+
You may need to reload service files after editing:
+
 
  # systemctl daemon-reload
 
  # systemctl daemon-reload
 
+
When the daemon is started, it will create its settings in {{ic|~/.config/transmission-daemon/}}.
Don't forget to change permissions to '''777''' on directory {{ic|/run/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:
+
# chgrp transmission /path/to/download
+
# chmod g+w /path/to/download
+
  
 
== See also ==
 
== See also ==

Revision as of 23:42, 18 November 2013

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:

If you install transmission-gtk or transmission-qt and you want to use the remote web client then you must also install transmission-cli as that is where the /usr/share/transmission/web/ files are packaged.

Configuration

For transmission-gtk and transmission-qt, the default path of configuration files is ~/.config/transmission.

For transmission-cli, default configuration path is ~/.config/transmission-daemon.

Run as a daemon

Start the transmission daemon using systemd.

Navigate to http://localhost:9091/ in your web browser to see the web client.

You can edit the main configuration file ~/.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 /var/lib/transmission/. This means the default location for the configuration file is /var/lib/transmission/.config/transmission-daemon/settings.json.

Note: If you cannot find the ~/.config/transmission-daemon folder, run 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

To change the user the daemon is running as, simply override User= in the service file with a drop-in config (see systemd#Editing provided unit files):

/etc/systemd/system/transmission.service.d/user.conf
[Service]
User=<custom user>

Then run the following to reload the service file:

# systemctl daemon-reload

When the daemon is started, it will create its settings in ~/.config/transmission-daemon/.

See also