evertramos / docker-portainer-letsencrypt

Portainer docker container over SSL Certificate using Let's Encrypt automated by our webproxy docker-compose-letsencrypt-nginx-proxy
GNU Lesser General Public License v3.0
188 stars 52 forks source link

About ssl certificates #22

Open talesmgodois opened 3 months ago

talesmgodois commented 3 months ago

I guess this is probably just a naive doubt.

But I have generated some certificates using certbot in order to use with nginx.

I wonder if they can be used to make portainer available with https.

these are the files it generated, however from portainer documentation, they are using crt and key files, not pem.

README  cert.pem  chain.pem  fullchain.pem  privkey.pem

Should I use theses keys he generated and do some conversion? Should I generate it differently using certbot?

evertramos commented 3 months ago

Hello @talesmgodois,

You wouldn´t need to use them once you can reissue a new certificate through nginx-proxy. But if you want to use it you can, you will just need to add the certificates to the correct path in your nginx-proxy:

./data/certs/your-domain.com/

with these names:

cert.pem chain.pem fullchain.pem key.pem

So you will need to rename the privkey to key.pem, and when you restart your portainer with the correct env variable to activate the letsencrypt for your service, it will automatically use your certificate already generated.

give a try and let me know if it worked.