Question

Let's Encrypt for nginx in docker container (not compose)

Hi guys

I read this: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04

Can you give me some tips on how to do this when nginx is run in docker container? All tutorials out there seems to do this with nginx not running in container or with docker compose. Im not using compose right now.

Br

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, @Lennart99

I would recommend you to switch and use docker-compose and then follow any of the articles that you’ve found. The other option will be is to use a temporary self-signed certificate start Nginx and then request/issue a Let’s Encrypt SSL using the nginx-certbot script:

  1. curl -L https://raw.githubusercontent.com/wmnnd/nginx-certbot/master/init-letsencrypt.sh > init-letsencrypt.sh

Hope that this helps! Regards, Alex