Install rTorrent & ruTorrent with nginx on Debian 9

Here it comes the Update to the glorious Debian 8 – How to install rTorrent & ruTorrent with nginx.

Today we’ll be taking a minimal Debian 9 (stretch) system and set up a seedbox all from scratch, using rTorrent/libTorrent, ruTorrent and Nginx.

Install dependencies

without some packages we can’t start here….

Create User

We need a user to run rTorrent. You can name it whatever you want, but if you chose something different, remember to adjust the configs in the rest of this article.

 

Install XMLRPC-C

These is needed for the communication between nginx and rTorrent.

 

Install libtorrent

 

Install rTorrent

Clone and compile. We need to make sure we configure –with-xmlrpc-c.

 

Install and configure ruTorrent

This one is easy. We just need to clone the git repo into /var/www

now edit the conf/config.php

the curl and the stat settings are need to set otherwise RSS wouldn’t work.

 

Configure Nginx

now we create a Site configuration for ruTorrent.
just create and edit this file: /etc/nginx/sites-enabled/rutorrent

We also want it password-protected or you want the world to see all your “linux iso’s”?

now delete the default settings and restart nginx and php5-fpm

 

Configure rTorrent

now we need to configure rTorrent here is a sample ~/.rtorrent.rc you can modify it but don’t delete the SCGI Socket line.

After that we need to create the .session directory.

 

Configure rTorrent autostart

Many people will tell you to write an init script for this, but IMHO that’s overkill. I prefer to use /etc/rc.local

 

NOTE: In this setup is no ffmpeg installed so ruTorrent always complaining about it i don’t need it if you want it you can install it with the DebianMultimedia Repo.