Jellyfin, Gotify, cadyv2

1. Caddy version (caddy version): v2

2. How I run Caddy:

running caddy v2 on windows 10 with caddy file

a. System environment:

win 10

b. Command:


mysite.com
reverse_proxy 127.0.0.1:8096
reverse_proxy 192.168.0.70:8070
log {
	output file c:\caddyv2\access.log
}

c. Service/unit/compose file:

paste full file contents here

d. My complete Caddyfile or JSON config:

paste config here, replacing this text
DO NOT REDACT anything except credentials

3. The problem I’m having:

at the moment jellyfin and caddyv2 are hosted on the same win10 box you access jellyfin through https, all good, i’d like caddyv2 to be able to secure (https) gotify requests to a docker container running gotify but when i try to access https://mysite.com:8070 it doesn’t work - (ports are forwarded to the win10 box)

4. Error messages and/or full log output:

5. What I already tried:

6. Links to relevant resources:

I think you should read this wiki:

You can’t reverse-proxy to two different services without telling Caddy how to decide which requests go to which service. With that config, only one of them will work, and only on port 443.

You’ll need to either use a subdomain for each service, or use a path matcher to serve each service under their own paths.

For example, here’s a config to use separate subdomains for each service (recommended):

jellyfin.mysite.com {
	reverse_proxy 127.0.0.1:8096
}

gotify.mysite.com {
	reverse_proxy 192.168.0.70:8070
}

Or subpaths (trickier, requires configuring each service to understand they are behind subpaths, see the thread linked below):

mysite.com {
	handle_path /jellyfin* {
		reverse_proxy 127.0.0.1:8096
	}

	handle_path /gotify* {
		reverse_proxy 192.168.0.70:8070
	}
}

outstanding - thank you so much. also did some research but i can’t get it. lets say i have music.example.com and i need that to direct to https://music.example.com/airsonic/login can you help with this?

sorry i did read the wikis but i still can’t quite get my head around it.

Redirects can be issued via the redir directive. There’s a few examples on usage at the bottom of the page, but it’s pretty straightforward - sounds like you just want to redirect from / to /airsonic/login.

1 Like

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