apt-get install rtorrent
apt install screen
adduser --disabled-password rtorrent
emacs /home/rtorrent/.rtorrent.rc
# Vitesse de téléchargement max up/down, en KiB. "0" équivaut à aucune limite.
download_rate = 0
upload_rate = 0
# Nombre maximal de téléchargements simultanés
max_downloads_global = 100
# Nombre maximal de peers par torrent
max_peers = 1000
# Nombre maximal de peers à upload par torrent
max_uploads = 200
# Répertoire qui contient les fichiers téléchargés.
directory = /home/rtorrent/downloads
# Répertoire où rTorrent stocke l'état de téléchargement des torrents.
session = /home/rtorrent/.session
# Ports utilisables par rTorrent. 2x la même valeur = 1 port
port_range = 49999-49999
port_random = no
# Vérification des données à la fin du téléchargement
check_hash = yes
# Activation de DHT pour les torrents sans trackers.
# À désactiver si vous utilisez des trackers privés
dht = auto
dht_port = 6881
peer_exchange = yes
# On préfère les échanges avec chiffrement
encryption = allow_incoming,try_outgoing,enable_retry
# On autorise les trackers UDP
use_udp_trackers = yes
# Port SCGI, on en a besoin pour communiquer avec ruTorrent
scgi_port = 127.0.0.1:5000
Puis on gère les droits
chown rtorrent:rtorrent /home/rtorrent/
On crée un service
emacs /etc/systemd/system/rtorrent.service
[Unit]
Description=rTorrent
After=network.target
[Service]
User=rtorrent
Type=forking
KillMode=none
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
WorkingDirectory=%h
[Install]
WantedBy=default.target
Et on le demarre
mkdir /home/rtorrent/downloads /home/rtorrent/.session
systemctl daemon-reload
systemctl enable rtorrent.service
systemctl start rtorrent.service
pour le lancer a la main :
su rtorrent
rtorrent
git clone https://github.com/jfurrow/flood.git /home/rtorrent/site
cp /home/rtorrent/site/config.template.js /home/rtorrent/site/config.js
emacs /home/rtorrent/site/config.js
npm install
npm run build
node server/bin/start.js
autostart on reboot
cd /home/rtorrent/site && /usr/local/bin/forever -a -l /home/rtorrent/site/log/forever.log -c /usr/local/bin/node start server/bin/start.js
autoupdate
0 0 * * * ( cd /home/rtorrent/site ; forever stop server/bin/start.js ; git pull ; npm install ; npm run build ; /usr/local/bin/forever -a -l /home/rtorrent/site/log/forever.log -c /usr/local/bin/node start serve\
r/bin/start.js ) > /home/rtorrent/cron.log 2>&1