rTorrent with nginx proxy not working

Also having some trouble with this. Running ruTorrent as a reverse proxy with nginx, accessible through https://mydomain/rutorrent and this is my Sonarr rTorrent configuration:

  • Host: localhost
  • Port: 80
  • Url Base: rutorrent/plugins/rpc/rpc.php
  • Use SSL: No
  • Username: none
  • Password: none

I’m getting the following error “Unknown exception: Unauthorized”. Don’t have a password set in the application (rtorrent) itself, but I have enabled authentication at server level. Is that causing the authorization issue? If so, how can I bypass it without compromising my security?

This is how my nginx looks like:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    return 301 https://$host$request_uri;
    
    location /RPC2 {
            include scgi_params;
            scgi_pass 127.0.0.1:5000;
    }
}

server {
    listen 443 default ssl;
    server_name mydomain.com;

    include /etc/nginx/conf.d/ssl.conf;
    root /var/www;   

    location /rutorrent {
    include /etc/nginx/conf.d/auth-basic.conf;
    }
}

And this is what I have in my .rtorrent.rc file:

scgi_port = 127.0.0.1:5000

Yes, Sonarr tries to connect and your server asks for a username and password, since one wasn’t set in Sonarr (Username and Password are blank), Sonarr is unable to authenticate and is Unauthorized, its the same as you attempting to connect, being prompted for a username and password and either cancelling. submitting no credentials or submitting the wrong credentials.

You don’t want to bypass it, assuming you’re using basic auth (it looks like you are), you should be able to just add the the username and password you use to access rutorrent to Sonarr so it can authenticate.

Hi Markus, thanks for the quick reply and feedback. So I added my authentication credentials, but now I’m getting a new error: “Unknown exception: Error getting response stream (ReadDone2): ReceiveFailure”.


Haha, never mind… it works. Forgot I had to change the port because rutorrent is behind SSL listening to 443.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.