linux:debian:seedbox:rtorrent_rutorrent

Diferències

Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.

Enllaç a la visualització de la comparació

Ambdós costats versió prèvia Revisió prèvia
Següent revisió
Revisió prèvia
linux:debian:seedbox:rtorrent_rutorrent [01/02/2020 14:17] matelinux:debian:seedbox:rtorrent_rutorrent [24/12/2020 01:50] (actual) – [instalacion rtorrent+rutorrent] mate
Línia 3: Línia 3:
   - crear estructura de directorios:<code bash>   - crear estructura de directorios:<code bash>
 mkdir -p data/downloads/completo mkdir -p data/downloads/completo
-mkdir -p data/root +mkdir -p data/config
-mkdir -p data/rutorrent+
 </code> </code>
-  - copiar ficheros de configuración contenedor en **/root** (sacados del propio contenedor y modificar los ficheros de configuración de nginx): +  - copiar ficheros de configuración (extraidos de propio contenedor y modificados a conveniencia): 
-    * añadir:<code properties+    * <code properties rutorrent-tls.nginx>
-location /completo { +
-        alias /downloads/completo; +
-        autoindex on; +
-+
-</code>  +
-  - copiar fichero **config.php** en **data/rutorrent** (para cambiar variable ''$forbidUserSettings = true;''+
-  crear enlaces simbólicos:<code bash> +
-# los enlaces funcionarán desde dentro del contenedor por el mapeo de volumen +
-ln -s /etc/letsencrypt/live/k0.vividumcodex.com/cert.pem nginx.crt +
-ln -s /etc/letsencrypt/live/k0.vividumcodex.com/privkey.pem nginx.pem +
-</code> +
-  - ejecutar:<code bash> +
-CERTBOT_PATH="/home/user/workspaces/nginx+certbot" +
- +
-docker run \ +
- -dt \ +
- --restart unless-stopped \ +
- --name rtorrent-rutorrent \ +
- -p 443:443 \ +
- -p 49160:49160/udp \ +
- -p 49161:49161 \ +
- -v ${PWD}/data/downloads:/downloads \ +
- -v ${PWD}/data/root:/root \ +
- -v ${PWD}/data/rutorrent/config.php:/var/www/rutorrent/conf/config.php \ +
- -v ${CERTBOT_PATH}/data/certbot/conf:/etc/letsencrypt \ +
- -v ${CERTBOT_PATH}/data/certbot/www:/var/www/certbot \ +
-diameter/rtorrent-rutorrent:latest +
-</code> +
- +
-== pasos básicos +
-  * montar estructura de carpetas +
-    * downloads : ubicación descargas +
-    * root : ubicación archivos configuración NGINX/RTORRENT/RUTORRENT modificados +
-  * ejecutar docker según script +
- +
-<code bash run.sh> +
-STORAGE_PATH=/home/user/storage/rtorrent+rutorrent +
- +
-docker run \ +
- -dt \ +
- --name rtorrent-rutorrent \ +
- --restart unless-stopped \ +
- -p 80:80 \ +
- -p 443:443 \ +
- -p 49160:49160/udp \ +
- -p 49161:49161 \ +
- -v ${STORAGE_PATH}/downloads:/downloads \ +
- -v ${STORAGE_PATH}/root:/root \ +
-diameter/rtorrent-rutorrent:latest +
-</code> +
-<code perl crypt.pl>#!/usr/bin/perl +
-use strict; +
- +
-chomp(my $filename=$ARGV[0]); +
-chomp(my $username=$ARGV[1]); +
-chomp(my $password=$ARGV[2]); +
- +
-if (!$filename || !$username || !$password) { +
-  print "USAGE: ./crypt.pl filename username password\n\n"; +
-} else { +
-  open my $fh, ">>", $filename or die $!; +
-  print $fh $username . ":" . crypt($password, $username) . "\n"; +
-  close $fh or die $!; +
-+
-</code> +
-<code ngnix.tls.conf> +
-# You may add here your +
-# server { +
-# ... +
-# } +
-# statements for each of your virtual hosts to this file +
- +
-## +
-# You should look at the following URL's in order to grasp a solid understanding +
-# of Nginx configuration files in order to fully unleash the power of Nginx. +
-# http://wiki.nginx.org/Pitfalls +
-# http://wiki.nginx.org/QuickStart +
-# http://wiki.nginx.org/Configuration +
-+
-# Generally, you will want to move this file somewhere, and start with a clean +
-# file but keep this around for reference. Or just disable in sites-enabled. +
-+
-# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. +
-## +
 server { server {
  listen 443 ssl;  listen 443 ssl;
Línia 113: Línia 27:
  server_name localhost;  server_name localhost;
  
-# location / {+ location / {
  # First attempt to serve request as file, then  # First attempt to serve request as file, then
  # as directory, then fall back to displaying a 404.  # as directory, then fall back to displaying a 404.
Línia 119: Línia 33:
  # Uncomment to enable naxsi on this location  # Uncomment to enable naxsi on this location
  # include /etc/nginx/naxsi.rules  # include /etc/nginx/naxsi.rules
-                auth_basic "Privat";+                auth_basic "Restricted";
                 auth_basic_user_file /var/www/rutorrent/.htpasswd;                 auth_basic_user_file /var/www/rutorrent/.htpasswd;
-# }+ }
  
  # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests  # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
Línia 146: Línia 60:
  # fastcgi_pass 127.0.0.1:9000;  # fastcgi_pass 127.0.0.1:9000;
  # # With php5-fpm:  # # With php5-fpm:
- fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;+ fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  fastcgi_index index.php;  fastcgi_index index.php;
  include fastcgi_params;  include fastcgi_params;
Línia 166: Línia 80:
  }  }
  
- location /completo { +        location /completo {
-#        try_files $uri $uri/ =404; +
-# Auth_basic "Restricted Complete"; +
-#        auth_basic_user_file /var/www/rutorrent/.htpasswd; +
- alias /downloads/complete; +
- autoindex on; +
- }+
  
-        location /well-known { + try_files $uri $uri/ =404; 
-                auth_basic "off"; + # Uncomment to enable naxsi on this location 
-                alias /well-known;+ # include /etc/nginx/naxsi.rules 
 +                auth_basic "Restricted"; 
 +                auth_basic_user_file /var/www/rutorrent/.htpasswd; 
 + 
 +                alias /downloads/completo; 
 +                autoindex on;
         }         }
 +
 } }
 +</code> 
 +    * copiar fichero **config.php** en **data/config** (para cambiar variable ''$forbidUserSettings = true;'' - originalmente en ''false'', evita creación de perfiles por usuario .htaccess)
 +  - crear enlaces simbólicos:<code bash>
 +# los enlaces funcionarán desde dentro del contenedor por el mapeo de volumen
 +ln -s /etc/letsencrypt/live/k1.vividumcodex.com/cert.pem nginx.crt
 +ln -s /etc/letsencrypt/live/k1.vividumcodex.com/privkey.pem nginx.pem
 </code> </code>
-<code md help.md+  - crear fichero **.htaccess** en **data/downloads** 
-# rtorrent + rutorrent +  - ejecutar:<code bash
-[dockerhub] (https://hub.docker.com/r/diameter/rtorrent-rutorrent/) +docker run \ 
- + -dt \ 
-## notas de run + --name rtorrent-rutorrent \ 
-Web UI ports80 and 443 (can be remapped in 'docker run') + -p 443:443 \ 
-DHT UDP port: 49160 (can be remapped) + -p 49160:49160/udp \ 
-Incoming connections port: 49161 (can be remapped) + -p 49161:49161 \ 
-Downloads volume: /downloads + -v $PWD/data/downloads:/downloads \ 
-rtorrent scratch files (.rtorrent/{watch|session} will be created automatically): /downloads + -/etc/letsencrypt:/etc/letsencrypt \ 
-- autodl-irssi config files are created automatically: /downloads/.autodl + -v $PWD/data/config/config.php:/var/www/rutorrent/conf/config.php \ 
-external rtorrent config (.rtorrent/.rtorrent.rc): /downloads + -v $PWD/data/config/rutorrent-tls.nginx:/root/rutorrent-tls.nginx 
-- external ruTorrent ui config (config will be created automatically): /downloads/.rutorrent +diameter/rtorrent-rutorrent:latest 
-- external nginx and rtorrent logs: /downloads/.log/ +
-- rtorrent uid and gid: USR_ID and GRP_ID env vars, default is 1000:1000 +
-php-fpm memory limit: PHP_MEM env var, default is 256M +
-disable IPv6 binding in nginx: set env var NOIPV6=1, default is not set +
-- alternative webroot: WEBROOT env var, defailt is / +
- +
-## htpasswd +
-Put .htpasswd into your /downloads volume root, the container will re-read .htpasswd each time it starts. To remote auth, simply remove .htpasswd and restart your container. +
-### generate +
-- `printf "John:$(openssl passwd -crypt V3Ry)\n" >> .htpasswd # this example uses crypt encryption` +
-- `printf "Mary:$(openssl passwd -apr1 SEcRe7)\n" >> .htpasswd # this example uses apr1 (Apache MD5) encryption` +
-`printf "Jane:$(openssl passwd -1 V3RySEcRe7)\n" >> .htpasswd # this example uses MD5 encryption` +
-- ```(PASSWORD="SEcRe7PwD";SALT="$(openssl rand -base64 3)";SHA1=$(printf "$PASSWORD$SALT" | openssl dgst -binary -sha1 | xxd -ps | sed 's#$#'"`echo -n $SALT | xxd -ps`"'#' | xxd -r -ps | base64);printf "Jim:{SSHA}$SHA1\n" >> .htpasswd) # this example uses SSHA encryption``` +
-- script *crypt.pl* +
- +
-## TLS +
-Put your keyfile (shall be named nginx.key) and your certificate (nginx.crt) into /dowloads volume root, the container looks for these files each time it starts. +
 </code> </code>
 +    * [[https://hub.docker.com/r/diameter/rtorrent-rutorrent]]
 +    * [[https://github.com/diameter/rtorrent-rutorrent/tree/master]]
 +== old
 +  * [[linux:debiean:seebox:rtorrent_rutorrent:old1]]
 +  * [[linux:debiean:seebox:rtorrent_rutorrent:old2]]
 +
 == + info == + info
   * [[https://www.rapidseedbox.com/kb/beginners-guide-to-rutorrent]]   * [[https://www.rapidseedbox.com/kb/beginners-guide-to-rutorrent]]
   * [[https://github.com/Novik/ruTorrent/wiki/Config]]   * [[https://github.com/Novik/ruTorrent/wiki/Config]]
  
  • linux/debian/seedbox/rtorrent_rutorrent.1580595457.txt.gz
  • Darrera modificació: 01/02/2020 14:17
  • per mate