Immich Reverse Proxy with Caddy: HTTPS on a Subdomain
On this page
Pinned version: Immich v3.4.2 (GitHub release, published 2026-11-19 05:14 JST). Caddy v2.11.9 (GitHub release, published 2026-11-05). Last checked: 2026-11-23.
Put Immich behind Caddy so clients reach it over HTTPS on a subdomain. Immich's docs require the reverse proxy to forward Host, X-Real-IP, X-Forwarded-Proto and X-Forwarded-For, and they state Immich must be served on the root path of a (sub)domain — not under /immich. Never publish port 2283 to the public internet without TLS.
If you still need a server first, start with Immich Docker Compose. For upload failures after you add a proxy, see Immich upload errors.
Why a reverse proxy
Immich's remote access guide warns: never forward port 2283 directly to the internet without additional configuration, because that exposes the web UI over plain HTTP. A reverse proxy terminates TLS and relays traffic to the Immich server on port 2283. Alternatives such as Tailscale or WireGuard keep the server off the public internet entirely; compare them in Tailscale vs WireGuard vs Cloudflare Tunnel.
Step 1 — Point a subdomain at your host
Create an A (or AAAA) record for something like photos.example.com that points at the public IP of the machine running Immich and Caddy. Caddy will request a Let's Encrypt certificate for that name when ports 80 and 443 are reachable.
Step 2 — Keep Immich listening locally
Leave Immich's published port on the Docker host (default 2283:2283 in the official compose file). Caddy will proxy to http://127.0.0.1:2283 or to the immich_server service name if Caddy shares Immich's Docker network. Do not open 2283 on your router.
Step 3 — Caddyfile from Immich's docs
Immich's reverse proxy docs give this Caddy example (automatic HTTPS):
immich.example.org {
reverse_proxy http://<immich-server-host>:2283
}Replace immich.example.org with your subdomain and <immich-server-host> with 127.0.0.1 (Caddy on the host) or the Docker service hostname (Caddy in Compose on the same network).
Example Compose service using the pinned Caddy image:
caddy:
image: caddy:2.11.9
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy-data:/data
- ./caddy-config:/configReload Caddy after editing the Caddyfile (docker exec caddy caddy reload --config /etc/caddy/Caddyfile or restart the container).
Step 4 — Headers, path and well-known
Immich requires every reverse proxy to set Host, X-Real-IP, X-Forwarded-Proto and X-Forwarded-For correctly. Caddy's reverse_proxy sets the usual forwarded headers by default; if you terminate TLS elsewhere, keep those values accurate.
Immich does not support a sub-path such as location /immich. Serve it at the root of the subdomain.
If Caddy (or another proxy in front) uses the Let's Encrypt HTTP-01 challenge, Immich's docs say to verify that /.well-known/immich is routed to Immich. Otherwise the mobile app may fail to connect.
Step 5 — Large uploads
Videos need large request bodies and long timeouts. Immich's nginx example sets client_max_body_size 50000M, disables request buffering and uses 600s timeouts. Caddy does not apply nginx's small default body limit, but if another proxy sits in front (Cloudflare, Traefik, npm), raise its limit too. Cloudflare Free/Pro caps uploads at 100 MB; Immich's FAQ notes Cloudflare Tunnel's 100 MB limit cannot be changed — use Tailscale/WireGuard or a direct proxy for larger videos. See Immich upload errors for 413 and 502 checklists.
Step 6 — Connect the mobile app
In the Immich mobile app, set the server URL to https://photos.example.com (your subdomain). Confirm Background App Refresh / battery settings if uploads stall; see Immich mobile backup.
FAQ
Can I put Immich on example.com/immich?
No. Immich's reverse proxy docs say it does not support being served on a sub-path.
Do I still need Tailscale if I have HTTPS?
Not for HTTPS itself. A public reverse proxy exposes Immich's UI and API to the internet. Immich's remote-access page lists VPN/Tailscale as options that keep the attack surface smaller. Pick based on whether you want apps to work without a VPN client.
What Immich version does this guide assume?
Immich v3.4.2. Pin IMMICH_VERSION=v3.4.2 in .env as in the Docker Compose guide.
Sources
- Immich docs, Reverse Proxy: https://docs.immich.app/administration/reverse-proxy (checked 2026-11-23)
- Immich docs, Remote Access: https://docs.immich.app/guides/remote-access (checked 2026-11-23)
- Immich v3.4.2 release: https://github.com/immich-app/immich/releases/tag/v3.4.2 (checked 2026-11-23)
- Caddy v2.11.9 release: https://github.com/caddyserver/caddy/releases/tag/v2.11.9 (checked 2026-11-10)
Printable restore checklist: Immich restore checklist · Caddy restore checklist. One page with what to back up, the restore steps, gotchas and how to check it worked. Or build a full recovery pack for your lab.

