Diferències
Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
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] – mate | linux:debian:seedbox:rtorrent_rutorrent [24/12/2020 01:50] (actual) – [instalacion rtorrent+rutorrent] mate | ||
---|---|---|---|
Línia 3: | Línia 3: | ||
- crear estructura de directorios:< | - crear estructura de directorios:< | ||
mkdir -p data/ | mkdir -p data/ | ||
- | mkdir -p data/root | + | mkdir -p data/config |
- | mkdir -p data/ | + | |
</ | </ | ||
- | - copiar ficheros de configuración | + | - 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 / | + | |
- | autoindex on; | + | |
- | } | + | |
- | </ | + | |
- | - copiar fichero **config.php** en **data/rutorrent** (para cambiar variable '' | + | |
- | | + | |
- | # los enlaces funcionarán desde dentro del contenedor por el mapeo de volumen | + | |
- | ln -s / | + | |
- | ln -s / | + | |
- | </code> | + | |
- | - ejecutar:< | + | |
- | CERTBOT_PATH="/ | + | |
- | + | ||
- | docker run \ | + | |
- | -dt \ | + | |
- | --restart unless-stopped \ | + | |
- | --name rtorrent-rutorrent \ | + | |
- | -p 443:443 \ | + | |
- | -p 49160: | + | |
- | -p 49161:49161 \ | + | |
- | -v ${PWD}/ | + | |
- | -v ${PWD}/ | + | |
- | -v ${PWD}/ | + | |
- | -v ${CERTBOT_PATH}/ | + | |
- | -v ${CERTBOT_PATH}/ | + | |
- | diameter/ | + | |
- | </ | + | |
- | + | ||
- | == pasos básicos | + | |
- | * montar estructura de carpetas | + | |
- | * downloads : ubicación descargas | + | |
- | * root : ubicación archivos configuración NGINX/ | + | |
- | * 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}/ | + | |
- | -v ${STORAGE_PATH}/ | + | |
- | diameter/ | + | |
- | </ | + | |
- | <code perl crypt.pl># | + | |
- | use strict; | + | |
- | + | ||
- | chomp(my $filename=$ARGV[0]); | + | |
- | chomp(my $username=$ARGV[1]); | + | |
- | chomp(my $password=$ARGV[2]); | + | |
- | + | ||
- | if (!$filename || !$username || !$password) { | + | |
- | print " | + | |
- | } else { | + | |
- | open my $fh, ">>", | + | |
- | print $fh $username . ":" | + | |
- | close $fh or die $!; | + | |
- | } | + | |
- | </ | + | |
- | <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 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 / | # 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 146: | 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 166: | Línia 80: | ||
} | } | ||
- | location /completo { | + | |
- | # try_files $uri $uri/ =404; | + | |
- | # | + | |
- | # auth_basic_user_file / | + | |
- | alias / | + | |
- | autoindex on; | + | |
- | } | + | |
- | | + | try_files $uri $uri/ =404; |
- | auth_basic "off"; | + | # Uncomment to enable naxsi on this location |
- | alias /well-known; | + | # include |
+ | auth_basic "Restricted"; | ||
+ | auth_basic_user_file / | ||
+ | |||
+ | alias /downloads/ | ||
+ | autoindex on; | ||
} | } | ||
+ | |||
} | } | ||
+ | </ | ||
+ | * 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:// | ||