Jump to content

Help needed to get Caddy working in Docker with Emby server in Docker


Recommended Posts

Posted

I am running Emby in Docker and also Caddy in Docker on a Raspberry PI.

Here is my Caddy docker-compose:
 

services:
  caddy:
    image: caddy:latest
    restart: unless-stopped
    network_mode: "bridge"
    ports:
      - "1888:80"
      - "1443:443"
    volumes:
      - /configs/caddy/caddyfile:/etc/caddy/Caddyfile
      - /configs/caddy/site:/srv
      - /configs/caddy/data:/data
      - /configs/caddy/conf:/config
      - /configs/caddy/cert:/root/.caddy


I have setup my SSL with LetsEncrpyt and the connection works perfectly fine when port forwarding directly to my Emby container and setting up SSL in the Network section of Emby.

In my router I am forwarding 443 to 1443 and 80 to 1888 to the server Caddy is running on.

I have setup Emby Secure Connection mode to "Handled by reverse proxy"

My caddy file looks like this:
 

emby.xxxx.org {
    reverse_proxy / 172.17.0.3:8096
}

Where 172.17.0.3 is the IP address of the Emby container.

I have tried using 192.168.0.2 (the server IP) but this doesn't work either.

When I navigate in the web browser to my domain it is forwarding to "/web/index.html" so it kind of seems to be working.

When I check the browser console there are some errors:

 
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. index.html
Error: Promised response from onMessage listener went out of scope

Any ideas what I am doing wrong?
Posted

Ok, i figured it out. The problem was the \ after "reverse-proxy". I had used the old format from Caddy 1 with Caddy 2 and then just replaced the keyword when it complained about using "proxy" in the caddy file.

Posted

Thanks for following up.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...