1. Caddy version:
caddy:latest (v2.6.7)
2. How I installed, and run Caddy:
Using Docker composer.yaml, build and run through GUI.
a. System environment:
Synology DSM 7.2.1-69057 Update 3
Docker version(Container Manager) - 20.10.2.3
a. Docker composer.yaml:
version: "3.7"
networks:
proxy-network:
name: proxy-network
services:
caddy:
image: caddy:latest
restart: unless-stopped
container_name: caddy
networks:
- proxy-network
hostname: caddy
depends_on:
- tailscale
ports:
- "8080:80"
- "8443:443"
- "8443:443/udp"
volumes:
- /volume1/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- /volume1/docker/caddy/data:/data
- /volume1/docker/caddy/config:/config
- /volume1/docker/tailscale/tmp/tailscaled.sock:/var/run/tailscale/tailscaled.sock
tailscale:
container_name: tailscaled
image: tailscale/tailscale
network_mode: host
cap_add:
- NET_ADMIN
- NET_RAW
volumes:
- /volume1/docker/tailscale/varlib:/var/lib
- /volume1/docker/tailscale/tmp:/tmp
environment:
- TS_STATE_DIR=/var/lib/tailscale
- TS_AUTH_KEY=MY_TAILSCALE_AUTH_KEY
d. My complete Caddy config:
mytailscaledomain.ts.net {
tls {
get_certificate tailscale
}
handle_path /teslamate {
reverse_proxy teslamate-app:1000 <<"teslamate-app" is the project name. The underlying container names are "teslamate-grafana-1". Tried both, neither worked>>
}
handle_path /immich {
reverse_proxy immich-app:1001
}
}
3. The problem I’m having:
Followed the above steps and tried reverse proxy setup on my Synology NAS.
After setting up everything and hit the URL: https://mytailscaledomain.ts.net/teslamate.
It’s defaulting to https://mytailscaledomain.ts.net:<DSM_HOME_HTTPS_PORT>/teslamate, and throwing the error - “Sorry, the page you are looking for is not found.”
Am i missing any other configurations on my NAS or Tailscale settings?
Please help. I’m pulling my hairs on this. Below are my docker and caddy file details.
5. What I already tried:
Tried following caddy documentation and couple of other online similar posts, I don’t have much expereince with caddy to try beyond this.
6. Links to relevant resources:
https://caddy.community/t/taiscale-synology-https-to-docker-services/18834
https://www.reddit.com/r/Tailscale/comments/104y6nq/docker_tailscale_and_caddy_with_https_a_love_story/