Automatic Certification with Let's Encrypt
It is possible to set up GreenRADIUS to automatically obtain and install certificates from Let's Encrypt. These are the steps to obtain and install a certificate and configure your GreenRADIUS to automatically renew its certificate from Let's Encrypt.
Prerequisites
- GreenRADIUS v4.3.5.5 or later
- A valid domain name with the A record pointing at GreenRADIUS
- GreenRADIUS must be connected to the Internet with the ability to make outgoing connections on port 443 and accept incoming connections from any IP address on port 80. (Note: In order to enable incoming connections on the internal UFW firewall (if enabled), run
sudo ufw allow 80
in the GreenRADIUS command line.)
Steps
- Log into your GreenRADIUS instance via SSH
sudo su
snap install core
snap refresh core
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
certbot certonly --standalone
- Follow the onscreen instructions. After this, your certificate files will be placed in a directory at
/etc/letsencrypt/live/<your site name>/
. This contents of this folder will be updated as needed by Certbot, so the certificate here should always be fresh. - Download the automatic installation script from this link and unzip it. You should now have a file called
install-grva.sh
. - Move
install-grva.sh
to/etc/letsencrypt/renewal-hooks/deploy
. - Run
chmod +x /etc/letsencrypt/renewal-hooks/deploy/install-grva.sh
. - Run
certbot renew --force-renewal
and verify that no errors occurred.
You should now find that the new certificates have been installed on GreenRADIUS. Certbot will periodically refresh the certificates; there may be a few seconds where GreenRADIUS is unavailable when this occurs (approximately once per month).
Updated 2021-11-01
© 2024 Green Rocket Security Inc. All rights reserved.
© 2024 Green Rocket Security Inc. All rights reserved.