Install Certbot
You can use free SSL certification by Let’s Encrypt. First, you should install certbot to use Let’s Encrypt.
$ sudo pacman -S certbot certbot-nginxCertificate sites
To certificate domain www.lama-lab.mydns.jp and nc.lama-lab.mydns.jp, type
$ sudo certbot --nginx --agree-tos --domain example.com --email 'email@example.com' --no-eff-emailConfigure Firewall
$ sudo ufw allow https
$ sudo ufw reloadScheduling Certification renew
The certification will be expired every 3 months. So you should renew the certification automatically.
$ sudo vi /etc/cron.daily/certbot-renew#!/bin/sh
certbot renew --post-hook "systemctl reload nginx"Change the permission of the script.
$sudo chmod 755 /etc/cron.daily/certbot-renewNote: How to delete a certification
To delete a certification, type
$ sudo certbot delete --cert-name www.lama-lab.mydns.jpLast Updated on March 8, 2025 by lama-admin
Leave a Reply