-
| Question : Can I copy old certs then how can I do in order that companion use them directly ? Best regards. | 
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
| Hi @kevin-lot By original client, do you mean  | 
Beta Was this translation helpful? Give feedback.
-
| I mean certbot. | 
Beta Was this translation helpful? Give feedback.
-
| Let say you have a certificate for  First, create the  docker exec your-le-container mkdir -p /etc/nginx/certs/www.example.tldThen copy the existing certificate, chain, full chain and private key inside this folder with the correct names (only the private key has a different name between  sudo docker cp -L /etc/letsencrypt/live/www.example.tld/cert.pem your-le-container:/etc/nginx/certs/www.example.tld/
sudo docker cp -L /etc/letsencrypt/live/www.example.tld/chain.pem your-le-container:/etc/nginx/certs/www.example.tld/
sudo docker cp -L /etc/letsencrypt/live/www.example.tld/fullchain.pem your-le-container:/etc/nginx/certs/www.example.tld/
sudo docker cp -L /etc/letsencrypt/live/www.example.tld/privkey.pem your-le-container:/etc/nginx/certs/www.example.tld/key.pem
 Then create your proxyed service with  If the certificate is a SAN certificate, be sure to put the name of the folder you created inside  Example: you have a SAN certificate covering  Let me know if something is unclear. | 
Beta Was this translation helpful? Give feedback.
-
| Hi there. I tried to migrate my via certbot created certs from my old home server to a new machine. Therefore I performed the above mentioned steps, but my attempts always result in the error listed below. Basicaly I used the examples of Evert Ramos to setup nginx, nginx-gen, nginx-letsencrypt, mariadb and nextcloud. I just changed the .env files and ket the docker.compose.yml's untouched. Afterwords I copied the certs to the volume of nginx-letsencrypt, so that my setup of my certs on the new machine looks something like this. After all, I can't get nginx-letsencrypt to work properly. Kind regards. | 
Beta Was this translation helpful? Give feedback.
-
| I don't know what you might have missed, I just tried using the exact same method and it just worked. Are you sure your certificate is an RSA cert ?  Are you certain your files were copied correctly ? Are they readable with openssl ( Note that I won't be able to provide much more support if you use Evert Ramos examples. | 
Beta Was this translation helpful? Give feedback.
Let say you have a certificate for
www.example.tldobtained with certbot on the same machine where you are running docker and nginx-proxy + the LE companion, and your LE companion container is namedyour-le-container.First, create the
/etc/nginx/certs/www.example.tldfolder inside your docker volume for certificates:docker exec your-le-container mkdir -p /etc/nginx/certs/www.example.tldThen copy the existing certificate, chain, full chain and private key inside this folder with the correct names (only the private key has a different name between
certbotandsimp_le):