Notebook icon. This icon is part of the Gnote project, licensed under the GPLv3.

Configure NGINX to use SSL certificate

in 6 steps

Edited June 07, 2024

After setting up your NGINX server, open the Bash and...

$ sudo apt-get update

$ sudo apt-get install certbot python3-certbot-nginx

Remember, it can also be a subdomain. If you want to include more than one domain, use the -d option before each one:

$ sudo certbot --nginx -d your-domain.com -d www.your-domain.com -d sub.your-domain.com

Follow the interactive instructions to set up Certbot. After that:

$ sudo nginx -t

$ sudo systemctl restart nginx

To renew automatically after 90 days:

$ sudo certbot renew --quiet

Done.


Pencil icon. This icon is part of the Gnote project, licensed under the GPLv3. Written by Claromes

Tag icon. This icon is part of the Gnote project, licensed under the GPLv3. nginx · ssl · bash · english

Comments? Ping me on Mastodon or Matrix
Share on Mastodon · Bluesky · Órbita · Hacker News · Email