Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
| Següent revisió | Revisió prèvia | ||
| linux:debian:seedbox:rtorrent_rutorrent [01/02/2020 14:14] – creat mate | linux:debian:seedbox:rtorrent_rutorrent [24/12/2020 01:50] (actual) – [instalacion rtorrent+rutorrent] mate | ||
|---|---|---|---|
| Línia 1: | Línia 1: | ||
| = rtorrent+rutorrent en contenedor | = rtorrent+rutorrent en contenedor | ||
| - | == pasos básicos | + | == instalacion rtorrent+rutorrent | 
| - |  | + |  | 
| - | * downloads | + | mkdir -p data/downloads/completo | 
| - | * root : ubicación archivos configuración NGINX/ | + | mkdir -p data/config | 
| - | * ejecutar docker según script | + | |
| - | + | ||
| - | <code bash run.sh> | + | |
| - | STORAGE_PATH=/ | + | |
| - | + | ||
| - | docker run \ | + | |
| - | -dt \ | + | |
| - | --name rtorrent-rutorrent \ | + | |
| - | --restart unless-stopped \ | + | |
| - | -p 80:80 \ | + | |
| - | -p 443:443 \ | + | |
| - | -p 49160: | + | |
| - | -p 49161:49161 \ | + | |
| - | -v ${STORAGE_PATH}/downloads:/downloads \ | + | |
| - | -v ${STORAGE_PATH}/root:/root \ | + | |
| - | diameter/ | + | |
| </ | </ | ||
| - | <code perl crypt.pl># | + | - copiar ficheros de configuración | 
| - | 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, ">>", | + | |
| - | print $fh $username . ":" | + | |
| - | 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:// | + | |
| - | # http:// | + | |
| - | # http:// | + | |
| - | # | + | |
| - | # 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 / | + | |
| - | ## | + | |
| server { | server { | ||
| listen 443 ssl; | listen 443 ssl; | ||
| Línia 76: | 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 82: | Línia 33: | ||
| # Uncomment to enable naxsi on this location | # Uncomment to enable naxsi on this location | ||
| # include / | # include / | ||
| - | auth_basic "Privat"; | + | auth_basic "Restricted"; | 
| auth_basic_user_file / | auth_basic_user_file / | ||
| - | # } | + | } | 
| # 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 109: | Línia 60: | ||
| # | # | ||
| # # With php5-fpm: | # # With php5-fpm: | ||
| - | fastcgi_pass unix:/ | + | fastcgi_pass unix:/ | 
| fastcgi_index index.php; | fastcgi_index index.php; | ||
| include fastcgi_params; | include fastcgi_params; | ||
| Línia 129: | Línia 80: | ||
| } | } | ||
| - | location /completo { | + |  | 
| - | # | + | |
| - | #		Auth_basic | + | try_files $uri $uri/ =404; | 
| - | # | + | # Uncomment to enable naxsi on this location | 
| - | alias / | + | # include / | 
| - | autoindex on; | + | auth_basic | 
| - | } | + | auth_basic_user_file / | 
| - | location | + | alias /downloads/ | 
| - | auth_basic " | + |  | 
| - |  | + | |
| } | } | ||
| + | |||
| } | } | ||
| + | </ | ||
| + | * copiar fichero **config.php** en **data/ | ||
| + | - crear enlaces simbólicos:< | ||
| + | # los enlaces funcionarán desde dentro del contenedor por el mapeo de volumen | ||
| + | ln -s / | ||
| + | ln -s / | ||
| </ | </ | ||
| - | < | + | - crear fichero **.htaccess** en **data/ | 
| - | # rtorrent + rutorrent | + | - ejecutar:< | 
| - | [dockerhub] (https:// | + | docker run \ | 
| - | + | -dt \ | |
| - | ## notas de run | + | --name | 
| - | - Web UI ports: 80 and 443 (can be remapped in ' | + | -p 443:443 \ | 
| - | - DHT UDP port: 49160 (can be remapped) | + | -p 49160:49160/udp \ | 
| - | - Incoming connections port: 49161 (can be remapped) | + | -p 49161: | 
| - | - Downloads volume: / | + | -v $PWD/ | 
| - | - rtorrent scratch files (.rtorrent/{watch|session} will be created automatically): | + | -v /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): | + | -v $PWD/data/config/ | 
| - | - external ruTorrent ui config | + | diameter/ | 
| - | - 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 | + | |
| - | - `printf " | + | |
| - | - `printf "Jane:$(openssl passwd -1 V3RySEcRe7)\n" | + | |
| - | - ```(PASSWORD=" | + | |
| - | - 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. | + | |
| </ | </ | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | == old | ||
| + | * [[linux: | ||
| + | * [[linux: | ||
| + | |||
| == + info | == + info | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||