Rutorrent + reverse proxy

1. Caddy version (caddy version):

v2.1.1 h1:X9k1+ehZPYYrSqBvf/ocUgdLSRIuiNiMo7CvyGUQKeA=

2. How I run Caddy:

Docker (compose)

a. System environment:

Docker on Ubuntu 20.04.1
Docker: 19.03.12 (API: 1.40)

b. Command:

n/a - docker compose

c. Service/unit/compose file:

    caddy:
        image: caddy
        container_name: caddy
        restart: unless-stopped
        volumes:
            - $CONFIG/caddy:/config
            - /home/user/Caddyfile:/etc/caddy/Caddyfile
            - caddy_data:/data
        networks:
            - web
        ports:
            - "80:80"
            - "443:443"

    rutorrent:
        image: linuxserver/rutorrent
        container_name: rutorrent
        restart: unless-stopped
        depends_on:
            - mergerfs
        volumes:
            - $CONFIG/rutorrent:/config
            - $DOWNLOADS:/downloads
        environment:
            - PUID=1000
            - PGID=1000
        networks:
            - web
        ports:
            - "8888:80"

d. My complete Caddyfile or JSON config:

my.web.site

rewrite /torrent /torrent/
reverse_proxy /torrent/* rutorrent:80

3. The problem I’m having:

Upon visiting my.web.site/torrent I am presented with a nginx 404 error, so it is connecting to the contained successfully but assume there is additional config in the caddyfile required. Extensive googling has come up dry!

4. Error messages and/or full log output:

404 Not Found
nginx/1.18.0

5. What I already tried:

Unsure what other config I can add to the caddyfile to get this working, any help appreciated!

I think you might be running into this:

It’s possible that rutorrent doesn’t allow for being served in a subfolder.

I recommend using a subdomain instead typically, it avoids most of the issues described in that article.

Right you are, subdomain worked like a charm - appreciate it!

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.