What's new
PGBlitz.com

Register Now! Find useful tips, Interact /w Community Members and join the part the Best Community on the Internet!

Password Protect Rutorrent

kalyway

Junior Member
Donor
[Back To Main Wiki Homepage]

How to password protect rutorrent

Rutorrent is fairly easy to password protect. The docker instance we use is already runs nginx, so it is already setup to allow authentications via .htpasswd
I will also assume that you are root or have root access.​

Prior to these steps you must first install apache2-utils
Code:
apt-get install apache2-utils
1) First, we will go to the nginx directory in rutorrent and edit the nginx.conf file to allow authentication.
Bash:
cd /opt/appdata/rutorrent/nginx
nano nginx.conf
2) Next we will add auth_basic and auth_basic_user_file to allow authentication. These lines can be added below Basic Settings.
NGINX:
      ##
      # Basic Settings
      ##

      auth_basic             "Restricted Access!";
      auth_basic_user_file    /opt/appdata/rutorrent/config/nginx/.htpasswd;
3) This creates the file that apache tools can utilize to add the username and password to later. Where it says PLACE USERNAME HERE you will replace that with a username of your choice. It will then ask you for a new password and then retype your password.
Code:
htpasswd -c /opt/appdata/rutorrent/nginx/.htpasswd PLACE USERNAME HERE
4) Restart your docker rutorrent container.

Congratulations! You have now password protected rutorrent.
That wasn't so hard was it? ;)

[Back To Main Wiki Homepage]
 
Last edited:

Drobo10

Respected Member
[Back To Main Wiki Homepage]

How to password protect rutorrent

Rutorrent is fairly easy to password protect. The docker instance we use is already runs nginx, so it is already setup to allow authentications via .htpasswd
I will also assume that you are root or have root access.​

Prior to these steps you must first install apache2-utils
Code:
apt-get install apache2-utils
1) First, we will go to the nginx directory in rutorrent and edit the nginx.conf file to allow authentication.
Bash:
cd /opt/appdata/rutorrent/nginx
nano nginx.conf
2) Next we will add auth_basic and auth_basic_user_file to allow authentication. These lines can be added below Basic Settings.
NGINX:
      ##
      # Basic Settings
      ##

      auth_basic             "Restricted Access!";
      auth_basic_user_file    /opt/appdata/rutorrent/config/nginx/.htpasswd;
3) This creates the file that apache tools can utilize to add the username and password to later. Where it says PLACE USERNAME HERE you will replace that with a username of your choice. It will then ask you for a new password and then retype your password.
Code:
htpasswd -c /opt/appdata/rutorrent/nginx/.htpasswd PLACE USERNAME HERE
4) Restart your docker rutorrent container.

Congratulations! You have now password protected rutorrent.
That wasn't so hard was it? ;)

[Back To Main Wiki Homepage]
Thank you!
 

boltn

Full Member
Staff
Just to share for Traefik/Portainer users, I found this recently that you can also use - add it under Labels. The password still needs to be generated from htpasswd.

Code:
traefik.frontend.auth.basic=user:password
As far as I can tell, however, this only applies when using the sub-domain and will not work when accessing by IP address/port directly.
 

beemotherobobro

Junior Member
This didn't work for me. I get a 403 Forbidden error if I enter the correct password. The value of auth_basic_user_file is '/opt/appdata/rutorrent/config/nginx/.htpasswd' but the htpasswd command points to '/opt/appdata/rutorrent/nginx/.htpasswd'. Is that supposed to be this way?
 

gocartman

Junior Member
This didn't work for me. I get a 403 Forbidden error if I enter the correct password. The value of auth_basic_user_file is '/opt/appdata/rutorrent/config/nginx/.htpasswd' but the htpasswd command points to '/opt/appdata/rutorrent/nginx/.htpasswd'. Is that supposed to be this way?
I get the same error!
 

stayupthetree

Junior Member
I've repeated these steps multiple times, even removing /config/ from the one line as it doesn't mesh with the rest. All I get is "403 FOrbidden"
 

Admin9705

Administrator
Project Manager
I've repeated these steps multiple times, even removing /config/ from the one line as it doesn't mesh with the rest. All I get is "403 FOrbidden"
I've done many scripting updates, going to focus more on the wiki, code cleanup and fixing of programs.
 

Tkeck

Junior Member
Donor
For those having issues with the 403 Forbidden area change the line:

auth_basic_user_file /opt/appdata/rutorrent/config/nginx/.htpasswd;

to

auth_basic_user_file .htpasswd;

Hope that helps!
 

Admin9705

Administrator
Project Manager
For those having issues with the 403 Forbidden area change the line:

auth_basic_user_file /opt/appdata/rutorrent/config/nginx/.htpasswd;

to

auth_basic_user_file .htpasswd;

Hope that helps!
That's great info. This is all on my to do list :D
 

plexer

Junior Member
Donor
Once you have done this, what would you put into Radarr/Sonarr so that it can connect to rtorrent?
 
Assists Greatly with Development Costs

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Development Donations

 

Top NZB NewsGroups!

Members - Up To a 58% Discount!

Trending

Online statistics

Members online
11
Guests online
93
Total visitors
104
Top