Points
63
Solutions
0
@Torrent Support How to install rtorrent and rutorrent on ubuntu linux
How to install rtorrent and rutorrent on ubuntu linux
sudo apt update
sudo apt install rtorrent screen nginx php-fpm php-cli php-curl php-xml php-zip php-mbstring php-json unzip git
sudo apt install mediainfo ffmpeg unrar-free
sudo adduser --disabled-password --gecos "" rtorrent
sudo -u rtorrent mkdir -p /home/rtorrent/{downloads,watch,.session}
rtorrent user:sudo -u rtorrent -s
nano /home/rtorrent/.rtorrent.rc
directory = /home/rtorrent/downloads
session = /home/rtorrent/.session
schedule = watch_directory,5,5,load_start=/home/rtorrent/watch/*.torrent
# Network / ports
port_range = 51413-51413
port_random = no
# Encryption
encryption = allow_incoming,try_outgoing,enable_retry
# DHT / PEX
dht = auto
dht_port = 6881
peer_exchange = yes
# SCGI for ruTorrent
scgi_port = 127.0.0.1:5000
# UI tweaks
use_udp_trackers = yes
check_hash = yes
sudo nano /etc/systemd/system/rtorrent.service
[Unit]
Description=rTorrent
After=network.target
[Service]
Type=simple
User=rtorrent
Group=rtorrent
WorkingDirectory=/home/rtorrent
ExecStart=/usr/bin/screen -DmS rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w rtorrent
Restart=on-failure
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable rtorrent
sudo systemctl start rtorrent
sudo systemctl status rtorrent
sudo -u rtorrent screen -r rtorrent.)/var/www/rutorrent):cd /var/www
sudo git clone https://github.com/Novik/ruTorrent.git rutorrent
sudo chown -R www-data:www-data /var/www/rutorrent
sudo nano /var/www/rutorrent/conf/config.php
.rtorrent.rc:<?php
$scgi_port = 5000;
$scgi_host = "127.0.0.1";
$XMLRPCMountPoint = "/RPC2";
sudo nano /etc/nginx/sites-available/rutorrent
server {
listen 80;
server_name yourdomain.com;
root /var/www/rutorrent;
index index.php index.html;
access_log /var/log/nginx/rutorrent_access.log;
error_log /var/log/nginx/rutorrent_error.log;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php-fpm.sock; # adjust if your socket path differs
}
# SCGI proxy to rTorrent
location /RPC2 {
include scgi_params;
scgi_pass 127.0.0.1:5000;
}
}
sudo ln -s /etc/nginx/sites-available/rutorrent /etc/nginx/sites-enabled/rutorrent
sudo nginx -t
sudo systemctl reload nginx
sudo usermod -a -G rtorrent www-data
sudo chown -R rtorrent:rtorrent /home/rtorrent
sudo chmod -R 775 /home/rtorrent
http://yourdomain.com/ or http://server_ip/scgi_port + scgi_host in .rtorrent.rc/RPC2 location + scgi_pass in nginx configrtorrent service is running