1. The problem I’m having:
I am running caddy as a reverse proxy for all the services on my home server and ran in to a problem recently when I tried to expose a new service, however Caddy appears to not be able to reach it. It is important to note I can reach the service using from my laptop.
2. Error messages and/or full log output:
{
"level": "error",
"ts": 1724938414.7671852,
"logger": "http.log.error",
"msg": "dial tcp 192.168.1.234:2283: i/o timeout",
"request": {
"remote_ip": "192.168.1.1",
"remote_port": "15314",
"client_ip": "192.168.1.1",
"proto": "HTTP/2.0",
"method": "GET",
"host": "immich.elduko.xyz",
"uri": "/",
"headers": {
"User-Agent": [
"Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0"
],
"Accept-Language": [
"en-US,en;q=0.5"
],
"Dnt": [
"1"
],
"Sec-Fetch-Dest": [
"document"
],
"Sec-Fetch-Site": [
"none"
],
"Priority": [
"u=0, i"
],
"Te": [
"trailers"
],
"Accept": [
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8"
],
"Accept-Encoding": [
"gzip, deflate, br, zstd"
],
"Upgrade-Insecure-Requests": [
"1"
],
"Sec-Fetch-Mode": [
"navigate"
],
"Sec-Fetch-User": [
"?1"
]
},
"tls": {
"resumed": false,
"version": 772,
"cipher_suite": 4865,
"proto": "h2",
"server_name": "immich.elduko.xyz"
}
},
"duration": 3.002806667,
"status": 502,
"err_id": "h83aqt3ea",
"err_trace": "reverseproxy.statusError (reverseproxy.go:1269)"
}
3. Caddy version:
v2.8.4
4. How I installed and ran Caddy:
I run Caddy using docker-compose using the Docker official image of Caddy.
a. System environment:
OS: Debian 12
Kernel: 6.1.0-23-amd64
Docker Version: 27.2.0
Docker-Compose Version: 2.24.5
b. Command used to run Caddy:
sudo docker-compose up -d
c. compose file:
version: "3"
networks:
proxy:
driver: bridge
services:
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./data:/data
d. My complete Caddy config:
blog.elduko.xyz {
reverse_proxy 192.168.1.234:8085
}
git.elduko.xyz {
reverse_proxy 192.168.1.234:3000
}
qbt.elduko.xyz {
reverse_proxy 192.168.1.234:8081
}
jellyfin.elduko.xyz {
reverse_proxy 192.168.1.234:8096
}
s3.elduko.xyz {
reverse_proxy 192.168.1.234:9001
}
api.s3.elduko.xyz {
reverse_proxy 192.168.1.234:9000
}
adminer.elduko.xyz {
basicauth {
foo bar
}
reverse_proxy 192.168.1.234:8083
}
immich.elduko.xyz {
reverse_proxy 192.168.1.234:2283 # This is the one that's giving me problems, and yes the port and IP are correct
}
www.elduko.xyz {
redir https://blog.elduko.xyz
}
e. Immich compose file
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- 2283:3001
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false