0
votes

I am following this tutorial to implement SSL Certs from Let's Encrypt.

I set up a basic nginx config that Lets Encriypt can sent a token to. After that I am trying to receive a SSL Certificate by running the Certbot image manually:

sudo docker run -it --rm \
-v /docker-volumes/etc/letsencrypt:/etc/letsencrypt \
-v /docker-volumes/var/lib/letsencrypt:/var/lib/letsencrypt \
-v /docker/letsencrypt/letsencrypt-site:/data/letsencrypt \
-v "/docker-volumes/var/log/letsencrypt:/var/log/letsencrypt" \
certbot/certbot \
certonly --webroot \
--register-unsafely-without-email --agree-tos \
--webroot-path=/data/letsencrypt \
--staging \
-d example.com -d www.example.com

And I am receiving the following error:

Failed authorization procedure. example.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization

What has me confused are the volumes in the shell command. The folder "docker-volumes" does not exist on the host. Even after I run the command it does not get created.

Update: Output of /docker-volumes ls -la:

/docker-volumes/etc:
total 16
drwxr-xr-x 4 root root 4096 Mar 17 19:38 .
drwxr-xr-x 4 root root 4096 Mar 17 19:23 ..
drwxr-xr-x 7 root root 4096 Mar 18 08:02 letsencrypt
drwxr-xr-x 7 root root 4096 Mar 17 19:58 letsencrypt-docker

/docker-volumes/var:
total 16
drwxr-xr-x 4 root root 4096 Mar 17 19:23 .
drwxr-xr-x 4 root root 4096 Mar 17 19:23 ..
drwxr-xr-x 4 root root 4096 Mar 17 19:38 lib
drwxr-xr-x 4 root root 4096 Mar 17 19:38 log
1

1 Answers

0
votes

It doesn't related to docker. You need to change example.com -> your domain and make sure you pointed domain to Public IP of the server.