Report this

What is the reason for this report?

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

Posted on November 25, 2021

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



This textbox defaults to using Markdown to format your 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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.