I’ve been self hosting traditionally in debian, but I would like to be able to add services easier using docker. As such, I’m looking to move to a container based architecture.
One place I struggle is that I can’t seem to find a good container where the default image supports ACME to support Let’s encrypt for automatic cert renewal.
For Nginx, I would have you build my container. HAproxy ACME support seems to be a shell script.
Any suggestions?
This is usually where something like Traefik comes in. It will reverse proxy the docker instance and it can be configured to handle let’s encrypt. The are also other options I like nginx proxy manager and I think Caddy also can do this, by I don’t have experience with that.
Yep I use caddy for all that. Bonus is caddy has a docker compose proxy plugin where all your domain/port/cert config can be part of your each application’s compose file, rather than needing to make adjustments in caddy centrally. Works great for my purposes.
I didn’t understand, why not use nginx? It has built in support for let’s encrypt by default, you just have to activate it in the nginx config. https://nginx.org/en/docs/http/ngx_http_acme_module.html
I’m considering moving to Talos, so I imagine Traefik would work better in k8s right?
Traefik also supports running on K8s, yes.
On that note, if you’re moving to K8s, I recommend looking into K8s Gateway API, it’s the successor to the old Ingress API. There are other, more complete, implementations of it than Traefik. See https://gateway-api.sigs.k8s.io/
Which gateway implementations would you recommend?
I’m looking to support HTTPS and Webdav
I’m using istio (in ambient mode, so it doesn’t put its sidecar into every pod I create), and Nextcloud behind it, works flawlessly. It does consume a bit of time to set up properly though.
TLS certificates are handled via cert-manager, which works with both Ingress and Gateway API, independent of which implementation you choose.
I’ve also tried envoy gateway (had issues with uploading larger files via Nextcloud Web UI and Gradle publish to maven repo).
Cilium (a CNI) also has an integrated Gateway and Ingress API implementation, works fine, but lacks some of the most recent stable features, and quite some experimental features. But if you just need a HTTPS gateway without much fuss, it’s rock-solid. Setup time is also minimal for the Ingress/Gateway controller part. Cilium CNI on the other hand takes a lot of time to understand and configure, if you’re unfamiliar with networking in general.
Traefik’s featureset is comparable with Cilium’s Gateway API implementation, also works, simple to setup, and might be better suited, if you’re already familiar with it using docker, as it’s the same concepts, just slightly different config (docker labels vs. Ingress/Gateway API with Traefik specific annotations).
You might check docker swag. It’s got built in certbot client and has preconfigured support for a couple hundred common self-hosted services.
I second SWAG. nginx, let’s encrypt, plenty of ready-to-go configs, it’s pretty great
I use traefik since I’m hosting stuff in docker and it works great. I think, Caddy is another popular pick, but I haven’t tried it and cannot tell you anything about it.
I use Zoraxy and it is great if you like GUIs.
Don’t know if this fits for your use case but I am in love with pangolin.
I use docker to host all kinds of containers - I use unbuntu but that doesn’t matter. I use Let’s encrypt for the certs. Then I use a nginx container to proxy all of that. It’s super easy. Any shell scripts are small and easily understood. I’m not sure why you struggle. I can give you samples that have you up in minutes.
Take a look at Zoraxy or NPM.