Self-hosted Nginx and Let’s Encrypt in less than 3 minutes using Docker Compose and a simple CLI tool reddit / selfhosted ---------------------------------------------------------------------- thekrautboy · 2023-10-30 18:42 Thanks for sharing. Im honestly not so sure why nginx with certbot and cron? Certbot is typically used when you need to retrieve certs and spread them out over multiple services which cannot get the certs on their own. All of this could simply be replaced by a single Caddy: reverse proxy, lets encrypt and auto-renewal. Same with Traefik and many others. ---------------------------------------------------------------------- PrincipalEngineer1 · 2023-10-30 19:04 I'm not aware of a fast way (a few minutes and no coding) to set up Traefik or others to obtain Let's Encrypt SSL/TLS Certificates for multiple domains and automatically renew them the day before expiration. Certbot is used to pass ACME challenge and get Let's Encrypt SSL/TLS Certificates. ---------------------------------------------------------------------- thekrautboy · 2023-10-30 19:11 > I'm not aware of a fast way (a few minutes and no coding) to set up Traefik or others to obtain Let's Encrypt SSL/TLS Certificates for multiple domains and automatically renew them the day before expiration. See the example i just added for Caddy. And i have been doing the same with Traefik for years now. > Certbot is used to pass ACME challenge and get Let's Encrypt SSL/TLS Certificates. I know what certbot does, and i am saying Caddy and Traefik and others can do this themselves, automatically, for multiple domains, with renewal before expiry. And without running as root when its not needed. ---------------------------------------------------------------------- thekrautboy · 2023-10-30 19:48 I did not say root is required. You are giving containers access to the Docker host socket, which equals root access. ---------------------------------------------------------------------- xXfreshXx · 2023-10-30 21:23 Why not use linuxserver swag? It has other benefits also. ---------------------------------------------------------------------- PowerfulAttorney3780 · 2023-10-31 19:44 I'ma try this and if it works you a God ---------------------------------------------------------------------- thekrautboy · 2023-10-31 19:48 Its only a example, you obviously need to adjust it for whatever DNS provider you want to use with your Lets Encrypt certs for example. The Docker image has builtin modules for Cloudflare, DuckDNS, deSEC and a few more: https://hub.docker.com/r/l33tlamer/caddy-desec You need to refer to the documentation of whichever module you want to use and slightly adjust the config above. The example uses deSEC. You also need to adjust how you proxy to another container, or another machine, in the Caddyfile. But i think the given example should make it clear, if not consult the Caddy documentation. ---------------------------------------------------------------------- PowerfulAttorney3780 · 2023-10-31 19:56 Yeah I know a bit about docker I've been using it maybe like a month