• S'enregistrer
  • Login
  • Forum   
  • Malice Fansub
    Visite guidée Projets futurs Dramas Films & SP Animes Clips + TV + Bonus Avancement La team Nous rejoindre Nous contacter
  • Sub'friends
    Byaoiline Drama Jinso Fansub Hana Miyabi Fansub Kumo no Toile Mangas-Arigatou Fansub misterdred Miyou Fansub Niwatori Subs The king Sejong
  • Médiathèque
    J-Dramas J-Films/SP Anime OST J-Dramas OST Films OST Animes
  • S'enregistrer
  • Login
  • Home
  • Members
  • Help
  • Search
Otarigato Machine à café Informatique Seedbox à la maison

Messages globaux
Dernière niouze
Nouveaux messages

Derniers messages
Kirinenko
Les séries de la semaine

Dernier : Kirinenko
30-06-2026, 05:38
Forum : TV/Cinéma/Séries télé
36 - 23,479
Kirinenko
One Piece

Dernier : Kirinenko
24-06-2026, 21:12
Forum : Un peu de tout, un peu sur tout :D
46 - 59,178
Kirinenko
Gachiakuta

Dernier : Kirinenko
24-06-2026, 19:09
Forum : Un peu de tout, un peu sur tout :D
1 - 168
CatherineClaire
High-end crush

Dernier : CatherineClaire
14-06-2026, 06:57
Forum : Dramas
156 - 17,977
Domino
Donten ni warau (Laughing...

Dernier : Domino
03-06-2026, 11:15
Forum : Films & SP
22 - 340
ladydauvrecy
[Licencié] The three musk...

Dernier : ladydauvrecy
21-05-2026, 22:02
Forum : Dramas
213 - 17,865
ladydauvrecy
King's daughter Soo Baek ...

Dernier : ladydauvrecy
21-05-2026, 21:51
Forum : Dramas
293 - 30,757
vulcan1989
Kimi to 100 kaime no koi ...

Dernier : vulcan1989
22-04-2026, 07:55
Forum : Films & SP
55 - 1,491
vulcan1989
Guilty : Akuma to keiyaku...

Dernier : vulcan1989
18-04-2026, 01:48
Forum : J-Dramas
11 - 8,575
MissLilouw
[Licencié] Good luck !!

Dernier : MissLilouw
11-04-2026, 17:13
Forum : Dramas
48 - 5,925

Utilisateurs en ligne
Applebot, Baidu, Bing, Google
Total : 195 (0 Membre(s) | 191 Visiteur(s))

Statistiques du Forum
Sujets du forum : 4475
Messages du forum : 33487
Membres : 2303
Dernier membre : Robertenusy
Seedbox à la maison
 
  • Moyenne : 0 (0 vote(s))
Description du topic
rtorrent, rutorrent sous debian 9
Kirinenko (Hors ligne)

Grumeau des Alpes
Otarie Team
Sub’friends
Arrivée : Oct 2011
Sujets : 339
Messages : 4,292
J'aime reçus : 516
#7
03-02-2019, 16:21 (Modification du message : 29-04-2019, 18:41 par Kirinenko.)
8. Installation du client torrent avec son interface web :

Je me sers de ce tuto :
https://terminal28.com/how-to-install-an...9-stretch/ [https://archive.fo/4C45V] Screenshot_Archive_49
https://github.com/Novik/ruTorrent/wiki/Plugins

On se logue sous notre utilisateur en ssh, pas le root mais celui qui a les droits.
J'ai monté mon deuxième disque dur par la précédente méthode sous /home/utilisateur/second_disque, je vais me servir de cet espace pour les fichiers en partage seulement de l'utilisateur rtorrent.

On est bien dans une version de debian > 9.5 :
Code :
lsb_release -a
nous renvoie :
Code :
No LSB modules are available. Distributor ID: Debian Description:    Debian GNU/Linux 9.8 (stretch) Release:    9.8 Codename:   stretch

On crée un nouvel utilisateur "rtorrent" et on lui assigne un dossier ("/home/rtorrent") comme home :
Code :
sudo adduser --system --home /home/rtorrent --disabled-password --disabled-login --group rtorrent

On vérifie les mise à jour dispo sur les paquets :
Code :
sudo apt-get update sudo apt-get upgrade

On installe des dépendances (il y en a surement que l'on a déjà installé) :
Code :
sudo apt-get -y install php php-geoip php7.0-cli php7.0-json php7.0-curl php7.0-cgi php7.0-mbstring libapache2-mod-php libapache2-mod-scgi libapache2-mod-xsendfile apache2 unrar unzip libav-tools ffmpeg mediainfo curl screen sqlite3 git net-tools sox

On installe rtorrent :
Code :
sudo apt-get -y install rtorrent libtorrent19 libxmlrpc-core-c3

On crée les dossiers utiles à rtorrent :
Code :
sudo mkdir -p /home/rtorrent/{session,watch,download} sudo chmod 777 -R /home/rtorrent/{session,watch,download} sudo chown rtorrent:rtorrent -R /home/rtorrent/{session,watch,download}

On crée le fichier de configuration de notre utilisateur rtorrent :
Code :
sudo nano /home/rtorrent/.rtorrent.rc

Il doit contenir (modifier comme il faut) :
Code :
# Port SCGI scgi_port = 127.0.0.1:5000 # This is an example resource file for rTorrent. Copy to # ~/.rtorrent.rc and enable/modify the options as needed. Remember to # uncomment the options you wish to enable. # Maximum and minimum number of peers to connect to per torrent. # throttle.min_peers.normal.set = 40 throttle.max_peers.normal.set = 100 # Same as above but for seeding completed torrents (-1 = same as downloading) # throttle.min_peers.seed.set = 10 throttle.max_peers.seed.set = 100 # Maximum number of simultanious uploads per torrent. # throttle.max_uploads.set = 15 # Global upload and download rate in KiB. "0" for unlimited. # throttle.global_down.max_rate.set_kb = 0 throttle.global_up.max_rate.set_kb = 0 # Default directory to save the downloaded torrents. # directory.default.set = /home/rtorrent/download # Default session directory. Make sure you don't run multiple instance # of rtorrent using the same session directory. Perhaps using a # relative path? # session.path.set = /home/rtorrent/session # Watch a directory for new torrents, and stop those that have been # deleted. # schedule2 = watch_directory,5,5,load_start=/home/rtorrent/session/*.torrent schedule2 = untied_directory,5,5,stop_untied= # Close torrents when diskspace is low. # schedule2 = low_diskspace,5,60,close_low_diskspace=2000M # The ip address reported to the tracker. # #network.local_address.set = 127.0.0.1 #network.local_address.set = rakshasa.no # The ip address the listening socket and outgoing connections is # bound to. # #network.bind_address.set = 127.0.0.1 #network.bind_address.set = rakshasa.no # Port range to use for listening. # network.port_range.set = 6890-6890 # Start opening ports at a random position within the port range. # network.port_random.set = no # Check hash for finished torrents. Might be usefull until the bug is # fixed that causes lack of diskspace not to be properly reported. # pieces.hash.on_completion.set = no # Set whether the client should try to connect to UDP trackers. # trackers.use_udp.set = yes # Alternative calls to bind and ip that should handle dynamic ip's. # #schedule2 = ip_tick,0,1800,ip=rakshasa #schedule2 = bind_tick,0,1800,bind=rakshasa # Encryption options, set to none (default) or any combination of the following: # allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext # # The example value allows incoming encrypted connections, starts unencrypted # outgoing connections but retries with encryption if they fail, preferring # plaintext to RC4 encryption after the encrypted handshake # protocol.encryption.set = allow_incoming,enable_retry,prefer_plaintext # Enable DHT support for trackerless torrents or when all trackers are down. # May be set to "disable" (completely disable DHT), "off" (do not start DHT), # "auto" (start and stop DHT as needed), or "on" (start DHT immediately). # The default is "off". For DHT to work, a session directory must be defined. # dht.mode.set = auto # UDP port to use for DHT. # dht.port.set = 6881 # Enable peer exchange (for torrents not marked private) # protocol.pex.set = yes # Set downlad list layout style. ("full", "compact") # #ui.torrent_list.layout.set = "full"

Note : Les liens magnets peuvent ne pas fonctionner si le chiffrement n'est pas activé :
Code :
protocol.encryption.set = require,require_RC4

Et on lui donne les bons droits :
Code :
sudo chmod 777 /home/rtorrent/.rtorrent.rc

En passant, on va ouvrir ces ports dans iptables :
Code :
sudo nano /etc/init.d/iptablesrules

Et avant la dernière ligne, on ajoute :
Code :
#Autorisation p2p iptables -t filter -A INPUT -p tcp --dport 6890 -j ACCEPT iptables -t filter -A INPUT -p udp --dport 6881 -j ACCEPT

On peut aussi réaliser une redirection de ports dans l'administration de sa box internet :
Administration > Réseaux > NAT/PAT > Règles personnalisées
nom:TCPmachine port_entrant:6890 port_sortant:6890 type:tcp machine:My_computer
nom:UDPmachine port_entrant:6881 port_sortant:6881 type:tcp machine:My_computer

On installe maintenant l'interface rutorrent :
Code :
sudo git clone https://github.com/Novik/ruTorrent.git /var/www/rutorrent/ sudo chown -R www-data:www-data /var/www/rutorrent

On édite la config de rutorrent pour refléter le fichier de téléchargement de l'utilisateur rtorrent :
Code :
sudo nano /var/www/rutorrent/conf/config.php

On modifie la ligne :
Code :
$topDirectory = '/home/rtorrent/download'; // Upper available directory. Absolute path with trail slash.

Vous pouvez aussi vérifier quelques chemins avec la commande "whereis", example :
Code :
whereis curl
qui donne :
Code :
curl: /usr/bin/curl /usr/share/man/man1/curl.1.gz
On ne prends que le premier chemin à chaque fois.

On peut modifier la partie suivante :
Code :
$pathToExternals = array(    "php"   => '/usr/bin/php',                      // Something like /usr/bin/php. If empty, will be found in PATH.    "curl"  => '/usr/bin/curl',                     // Something like /usr/bin/curl. If empty, will be found in PATH.    "gzip"  => '/bin/gzip',                 // Something like /usr/bin/gzip. If empty, will be found in PATH.    "id"    => '/usr/bin/id',                       // Something like /usr/bin/id. If empty, will be found in PATH.    "stat"  => '/usr/bin/stat',                     // Something like /usr/bin/stat. If empty, will be found in PATH. );

On crée un utilisateur avec son mot de passe pour accéder à l'interface web :
Code :
cd /var/www/rutorrent sudo htpasswd -c /var/www/rutorrent/.htpasswd nouveau_utilisateur

On édite le .htaccess de rutorrent :
Code :
sudo nano /var/www/rutorrent/.htaccess

Et on ajoute :
Code :
AuthUserFile /var/www/rutorrent/.htpasswd AuthName "Accéder à la source :" AuthType Basic require valid-user

On crée la conf d'apache pour mettre en place rutorrent :
Code :
sudo nano /etc/apache2/sites-available/rutorrent.conf

On ajoute :
Code :
# ruTorrent #=============================== <IfModule alias_module> Alias /rutorrent        /var/www/rutorrent/        <Directory /var/www/rutorrent/>                Options +Indexes +Includes +FollowSymLinks +MultiViews                AllowOverride all                Require all granted        </Directory> </IfModule> #===============================

On active l'interface web de rutorrent :
Code :
sudo ln -s /etc/apache2/sites-available/rutorrent.conf /etc/apache2/sites-enabled/rutorrent.conf

On active certains modules d'apache :
Code :
sudo a2enmod auth_digest sudo a2enmod authn_file sudo a2enmod xsendfile sudo a2enmod scgi

On redémare apache :
Code :
sudo systemctl restart apache2

Note :
Vous pouvez avoir le message d'erreur suivant :
Code :
Failed to restart apache2.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files See system logs and 'systemctl status apache2.service' for details.
Il nous manque un paquet :
Code :
sudo apt install policykit-1

On va sécuriser le dossier scgi(/rpc2), pour cela on commence par créer un répertoire pour avoir des mots de passes pour apache2 :
Code :
sudo mkdir -p /etc/apache2/passwords-{available,enabled}

On va dans le dossier des mots de passe disponibles et on en crée un pour un utilisateur :
Code :
cd /etc/apache2/passwords-available sudo htpasswd -c rtorrentscgi scgi_utilisateur

On fait le lien entre le fichier crée et la partie active :
Code :
sudo ln -s /etc/apache2/passwords-available/rtorrentscgi /etc/apache2/passwords-enabled/rtorrentscgi

On édite le fichier de conf pour scgi de rutorrent :
Code :
sudo nano /etc/apache2/sites-available/rtorrentscgi.conf

On ajoute cela :
Code :
#rTorrent SCGI Password Location #===============================        <LocationMatch "/RPC2">                AuthType        Basic                AuthName        "rtorrentscgi"                AuthUserFile    /etc/apache2/passwords-enabled/rtorrentscgi                Require         valid-user                BrowserMatch    "MSIE"  AuthDigestEnableQueryStringHack=On                Require ip 127.0.0.1        </LocationMatch> #=============================== # SCGI PORT #=============================== #LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so SCGIMount /RPC2 127.0.0.1:5000 #===============================

On active cette config :
Code :
sudo ln -s /etc/apache2/sites-available/rtorrentscgi.conf /etc/apache2/sites-enabled/rtorrentscgi.conf

On redémarre apache :
Code :
sudo service apache2 restart

On fini par mettre en place le démarrage automatique de rtorrent avec la machine à l'aide de systemd :
Code :
sudo nano /etc/systemd/system/rtorrent.service

Dedans, on mets :
Code :
[Unit] Description=rTorrent After=network.target [Service] UMask=002 Type=forking RemainAfterExit=yes KillMode=none User=rtorrent ExecStartPre=-/bin/rm -f /home/rtorrent/session/rtorrent.lock ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent WorkingDirectory=/home/rtorrent/ [Install] WantedBy=multi-user.target

On active cela :
Code :
sudo systemctl enable rtorrent.service

On pourra utiliser les commandes suivantes :
Code :
sudo systemctl start rtorrent sudo systemctl stop rtorrent sudo systemctl restart rtorrent

Pouvez alors voir que ça fonctionne bien avec les commandes :
Code :
sudo service rtorrent start sudo netstat -npl | grep rtorrent

Vous avez accès à l'interface web via l'url "https://ip.de.la.machin/rutorrent/" et en utilisant le compte créé.

En ajoutant un torrent (par exemple : https://peach.blender.org/download/ ou en dessous debian si pas de sources :( ), on obtient les activations avec udp :
Code :
tcp        0      0 0.0.0.0:6890            0.0.0.0:*               LISTEN      9808/rtorrent       tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN      9808/rtorrent       udp        0      0 0.0.0.0:6881            0.0.0.0:*                           9808/rtorrent

On essaie en éteignant et redémarrant la machine.
Code :
sudo shutdown

Pour moi on dirait que c'est bon, on peut tester des téléchargement d'ubuntu :
https://www.ubuntu.com/download/alternative-downloads

Note :
On peut avoir une erreur :
Citation :JS error: [https://ip_server/rutorrent/js/content.js : 72] SecurityError: Permission denied to access property "document" on cross-origin object
Cela vient de notre config ssl, on peut modifier ainsi :
Code :
sudo nano /etc/apache2/conf-available/ssl-params.conf

Et :
Header always set X-Frame-Options DENY
devient :
# Header always set X-Frame-Options DENY

On redémarre apache :
Code :
sudo systemctl restart apache2

On peut voir si ça lance bien au démarrage en relancant la machine :
Code :
sudo reboot


On apprécie :
[Image: Tour_Image_Part7_01.jpg]


Note :
Pour la création de nouveaux torrents, vous pouvez avoir un soucis avec un listing non disponible via le plugin. Cela vient de ce fichier :
Code :
sudo nano /etc/apache2/conf-available/ssl-params.conf
Il faut passer
Code :
Header always set X-Frame-Options DENY
en
Code :
Header always set X-Frame-Options SAMEORIGIN

Il faut redemarrer apache :
Code :
systemctl restart apache2

Source : https://github.com/Novik/ruTorrent/issues/1647
Kirinenko a écrit :Je m'autoquote si je veux, d'abord.
Nyanyanyanyan . . . . . . . . . . . . . . . [Image: chat-moche-27c1d17.gif]
[Image: 4yi3an10-3858b7.gif]
Répondre

  •
 J'aime Citer
  Nouvelle réponse
« Sujet précédent | Sujet suivant »

Utilisateur(s) parcourant ce sujet : 1 visiteur(s)



Messages dans ce sujet
Seedbox à la maison - par Kirinenko - 03-02-2019, 16:20
RE: Seedbox à la maison - par Kirinenko - 03-02-2019, 16:20
RE: Seedbox à la maison - par Kirinenko - 03-02-2019, 16:20
RE: Seedbox à la maison - par Kirinenko - 03-02-2019, 16:21
RE: Seedbox à la maison - par Kirinenko - 03-02-2019, 16:21
RE: Seedbox à la maison - par Kirinenko - 03-02-2019, 16:21
RE: Seedbox à la maison - par Kirinenko - 03-02-2019, 16:21
RE: Seedbox à la maison - par Kirinenko - 03-02-2019, 16:21
RE: Seedbox à la maison - par Kirinenko - 19-03-2019, 19:42
RE: Seedbox à la maison - par Kirinenko - 05-04-2019, 17:37
RE: Seedbox à la maison - par Kirinenko - 05-04-2019, 19:03

  • S’abonner au sujet
  Discord

Malice Fansub
Avat6
Avancement
Fiche Dogaru
Page Facebook

Dernières sorties
La team est désormais fermée.

Mama gogo
Épisodes 1 à 12 FIN
Mama

Todome no kiss
Todome no parallel
Épisodes 8 à 10 FIN
Todome

Kieta hatsukoi - SP
Kieta

Bokura wa koi
Ep 7 FIN
BokuraW

Tokyo revengers
LICENCIÉ
TokyoR

Mogura no uta
v2 - 1080p
Mogura

Mogura no uta 2
Mogura2

Sakamichi no Apollon
Sakamichi


Partenaires
partenaire logo

Choisissez Firefox
obtenir firefox

© Propulsé par MyBB et basé sur un design de D&D

Contact
Affichage linéaire
Affichage hiérarchique