ruTorrent Web Interface on Arch Linux
ruTorrent is a web interface for a rTorrent. The overall look and feel is comparable to uTorrent Server. It requires Apache Web Server, PHP and of course rTorrent to be installed.
Install ruTorrent
Install with packer from AUR.
packer -S rutorrent
Install mod_scgi from the AUR.
packer -S mod_scgi
Install optional dependencies.
sudo pacman -S mediainfo ffmpeg
When not installed mediainfo: Plugin will not work. rTorrent user can't access external program (mediainfo).
message will be printed in the log.
Configure ruTorrent
Change permissions of the installation directory.
sudo chown -R root:http /usr/share/webapps/rutorrent
By default permissions are set to root
user and group. This prevents apache web server from accessing the files. For security reasons the directory and files contained within should remain owned by root. Access to apache server should be granted via group permissions, in Arch Linux it is http
group.
Change the permissions of the download directories.
sudo chmod -R 771 /mnt/downloads/rtorrent
Execute permissions for Apache server user are important and will result in a rutracker_check: Plugin will not work. Webserver user must have execute access to the rtorrent session directory ().
warning in the web interface if not granted.
Configure Apache Web Server
Install Apache Web Server and if intending to use login credentials also configure Apache user passwords.
Open Apache server configuration file.
sudo nano /etc/httpd/conf/httpd.conf
Uncomment LoadModule scgi_module modules/mod_scgi.so
line to enable SCGI module.
Add the server configuration and save the file.
<IfModule alias_module> Alias /rutorrent /usr/share/webapps/rutorrent <Directory "/usr/share/webapps/rutorrent"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all Require all granted Satisfy Any </Directory> </IfModule>
Alternatively for more advanced setup a virtual host can be used instead as below.
Add the virtual host configuration and save the file.
<VirtualHost *:443> DocumentRoot "/usr/share/webapps/rutorrent" ServerName dominicm.com ServerAlias www.dominicm.com <Directory "/usr/share/webapps/rutorrent"> AllowOverride All AuthName "Any Valid Apache User" AuthType Basic AuthUserFile "/etc/htpasswd/.htpasswd" Require valid-user Order allow,deny Allow from 127.0.0.1 ::1 localhost Satisfy Any </Directory> SSLEngine on SSLCertificateFile "/etc/httpd/conf/dominicm.com.crt" SSLCertificateKeyFile "/etc/httpd/conf/dominicm.com.key" </VirtualHost>
Replace port 443
with 80
and set SSLEngine
to off
if not using SSL/TLS.
Configure rTorrent
Open the configuration file.
sudo nano /etc/rtorrent.conf
Add scgi_port = localhost:5000
line to allow communication between rTorrent and the web interface.
Use ruTorrent
Access ruTorrent on the IP address Apache server is running on for example 192.168.100/rutorrent or via the domain name set in the server directive.
Note that ruTorrent is unable to modify rTorrent configuration file regardless of ownership or permissions. Settings applied in the GUI will reset every time rTorrent is restarted.
Plugins are installed by placing the file in /usr/share/webapps/rutorrent/plugins
directory.