1. Caddy version (caddy version
):
caddy:latest
2. How I run Caddy:
docker with docker-container
a. System environment:
Raspberry PI 3b raspOS 5.10.103-v7+ armv7l
b. Command:
docker-compose up -d caddy
c. Service/unit/compose file:
caddy:
container_name: caddy
image: caddy:latest
volumes:
- /home/pi/caddy/Caddyfile:/etc/caddy/Caddyfile
- /home/pi/caddy/data:/data
environment:
- TZ=Europe/Rome
restart: always
ports:
- 80:80
- 443:443
d. My complete Caddyfile or JSON config:
(https_header) {
header {
Strict-Transport-Security "max-age=31536000; includeSubdomains"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "same-origin"
}
}
{
# Global options block. Entirely optional, https is on by default
# Optional email key for lets encrypt
email <my_email>
# Optional staging lets encrypt for testing. Comment out for production.
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
https://<my_domain>.duckdns.org {
respond "Saluti da Fabio"
file_server
}
https://<my_domain>.duckdns.org:9000 {
import https_header
reverse_proxy http://192.168.1.11:8123
}
3. The problem I’m having:
After I instaced the caddy docker all connections are dropped. If I’m connected trough SSH the connection was closed and it cant access anymore. Inside the RPI I can’t ping anything outside, google or the router. If I stop the docker docker stop caddy
all return to normal status.
What I did wrong?
Thanks