Info
So with SSL, you will have multiple choices with technology but for optimizing your price to operating anything system. Your
Static IP
which had is best optional for combine with Letβs Encrypt, certbot of python3 with your domain. For more information, you can go to see Letβs Encrypt Documentation and Certbot Documentation for more information*Following this document - Update: Using Free Letβs Encrypt SSL/TLS Certificates with NGINX for customize your own SSL. Therefore, in our situation, nginx running inside docker it will make anything become strange than running in own host, so give more time to finding away to try best of it inside container
Setup Free SSL with Certbot
- First of all, you need to add some of the configuration to mount /etc/letsencrypt from local inside the docker. For this purpose, if Nginx dies when restarting that one , the SSL will exist and be continuously used.
- You need to configure the default conf file of nginx, so in this situation, it have more ways to add letβs encrypt, but for ignoring the annoy for fail create, I will recommend that you to choosing use certbot inside the nginx containers
-
After setting your conf of nginx, the certbot will automatically reconfigure your nginx conf file with SSL. Your application will change from HTTP to HTTPS (
# managed by Certbot
) is added. You can move this configuration for another route and it will help you reuse your SSL for another subdomain. I think this SSL iswildcard certificate
and you can use it for multiple subdomains with just one certificate. -
So reapplied for configuration Nginx by this command
The result is your SSL applied to your domain, go and check it via browser
Renew SSL Certificate
- Letβs encrypt is not supported by long-term SSL, so you need to manually renew or create a job to renew it.
- With my plan, I will renew it on the first day of the month to keep the certificate always available, that to executing this command and pushes that for crontab to take care of it.