Let's Encrypt and deso-node running in docker-compose

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: node.stakingwallet.com

I ran this command: docker-compose -f docker-compose.dev.yml start nginx

It produced this output:
nginx: [emerg] open() "/etc/letsencrypt/options-ssl-nginx.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:21

My web server is (include version): nginx/1.18.0

The operating system my web server runs on is (include version): Linux Minx (Ubuntu)

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):certbot 2.5.0

This is what happens when I try to run the container. I have a nginx.dev file as conf setup in the same path as my .yml file. I upload the content of both files.

docker-compose.dev.txt (691 Bytes)
nginx.txt (486 Bytes)

Hi @manolius148, and welcome to the LE community forum :slight_smile:

Are you following some guide/instructions?
Has this [ever] worked before?

To me, it looks like nginx has no access to the /etc/letsencrypt/ folder.


Thank you for the reply.

I'm just trying to run it. I followed the certbot setup instructions to successfully install the certificates. But the docker nginx is unable to effectively run the service, so the site is offline. And no, it has never worked.

1 Like

From within docker?

1 Like

From the website

(assuming you mean your website)

Is within docker, correct?

What I am trying to say is you are using instructions like these Certbot Instructions | Certbot within docker, so they being executed at the same level of the system as your webserver.

1 Like

Correct, instructions from certbox website I mean. The problem is when running the container.

So you ran those instructions within the container?
Not outside the container, correct?

1 Like

I tried both. Anyway the git has a nginx.dev file used by the container as config. Sometimes it gets in conflict to nginx service and I must stop it in order to release 443 port

In fact first of all I installed certbot and got the certificate files inside "letsencrypt/live" with no issues. The problem is when running the nginx service in docker, it always halts (if nginx was previously up, because of the busy 443 port) otherwise it displays the lacking file error.
The outcome is that the certificate is not running in the website.

that'd you are not mounting right dir as volume to nginx container


I can't understand you. I run a script which is in fact a docker-compose service with three containers (backend, frontend and nginx). Nginx docker process uses the nginx.dev file I uploaded earlier to set the params.

add somthing like /etc/letsencrypt:/etc/letsencrypt nginx's docker-compose volume (not bother which side is which nor symlink thing) and looks file from nginx config. it cant' read cert if dir is not mount


?? can't understand your reply

  - ./nginx.dev:/etc/nginx/nginx.conf
  - /etc/letsencrypt:/etc/letsencrypt

Ahm ok I will try thank you


Solved!! Tahnk you so much!

My acknwoledgement:


before you leave, it may need nginx reload to detect updated certificate after renewal after 60 days:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.