1. Caddy version (caddy version
):
2.3.0
2. How I run Caddy:
# Caddyfile
badenas.uk.to {
tls myemail@email.at
import common.conf
basicauth / user pass
proxy 192.168.0.69:5555
proxy /jellyfin 192.168.0.69:8096 {
transparent
}
proxy /portainer 192.168.0.69:9000 {
transparent
}
}
quickconnect.to/MYNASQUICKCONNECT {
import common.conf
basicauth / admin pass
proxy / 192.168.0.69:5555 {
transparent
}
}
a. System environment:
b. Command:
I run Caddy 2 in a docker container on my Synology NAS (Docker Hub)
c. Service/unit/compose file:
paste full file contents here
d. My complete Caddyfile or JSON config:
# common.conf
gzip
log stdout
errors stdout
header / {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
-Server
}
3. The problem I’m having:
As the fresh owner of a Synology NAS, I got a few containers already running in docker:
- Portainer
- Jellyfin
- Jupyter
- qBittorrentVPN
- Killing Floor 2 Server
After reading up a little on it, I found that opening ports for each container to be kind of dangerous (exposing my homenetwork to so many open ports). I wanted to somehow make it a little bit safer.
Some might say that a VPN would be much easier and would fit perfectly for my needs, but I’d like to be able to host at least Jellyfin and the KF2 Server for friends.
I found this thread on the caddy.community and copied the Caddyfile and the conf from there, however, I don’t get more than this site when accessing badenas.uk.to:
Whenever I try to access for instance badenas.uk.to/portainer, I get an 404.
4. Error messages and/or full log output:
2021/01/26 10:58:38.142 INFO using provided configuration {"config_file": "/etc/caddy/Caddyfile", "config_adapter": "caddyfile"}
2021/01/26 10:58:38.143 INFO admin admin endpoint started {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2021/01/26 10:58:38.143 INFO http server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server {"server_name": "srv0", "http_port": 80}
2021/01/26 10:58:38.143 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc00025cf50"}
2021/01/26 10:58:38.143 INFO autosaved config {"file": "/config/caddy/autosave.json"}
2021/01/26 10:58:38.144 INFO serving initial configuration
2021/01/26 10:58:38.143 INFO tls cleaned up storage units
2021/01/26 11:06:19.851 INFO shutting down apps then terminating {"signal": "SIGTERM"}
2021/01/26 11:06:20.351 INFO tls.cache.maintenance stopped background certificate maintenance {"cache": "0xc00025cf50"}
2021/01/26 11:06:20.851 INFO admin stopped previous server
2021/01/26 11:06:20.851 INFO shutdown done {"signal": "SIGTERM"}
5. What I already tried:
I’ve read the linked post already a few times, but I don’t seem to get my head wraped around what I’m doing wrong.
For me it seems like Caddy is running ok (hence the welcoming page I am shown). However, there seems to be something wrong with my Caddyfile, but I don’t understand what.
Please be patient with me, I’m still at the very beginning of learning an I don’t have much knowledge built up so far.
Thank you in advance!