How to run letsencrypt with nginx + docker?


My domain is:

I ran this command: used a template from bitbucket that runs nginx + letsencrypt + sample page

It produced this output: I ran it several times because of some issues i have and now it says that there were too many certificate requests. This would indicate that i now have a certificate for my server?

My web server is (include version): Nginx 1.10.3

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

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

The problem here is the letsencrypt container installed a certificate on my server, but i am not sure how to retrieve it and use it on my website which is an core project. I am running the website with docker sqllserver and nginx… i have gone through many tutorials and articles but im not sure what i’m doing wrong. Since i have an active certificate on my machine, isn’t it just the proxy configuration that i need to adjust? Can someone assist me please


The output here:

indicates a certificate was generated.

From the sample nginx config file shown on the bitbucket page,
the ssl_certificate* lines would indicate the files you want are under
/etc/letsencrypt/live, but are inside the docker container.

So, you need to get them out of the container… docker is a little out of the scope here.
google “copy directory from docker container to host” may help you along,
or if you were following directions at Digital Ocean, pages there usually have feedback/comments.

I didn’t look at the docker-compose file, but I think every time you run docker-compose up you are requesting and creating new certificates. If you need to tweak the config, you can use something like the docker exec command there to e.g. get a shell inside the docker container, edit the config, reload nginx.


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