How to update the SSL certificate for SolusVM every 3 months automatically?

Have more questions? Submit a request

Applicable to:

  • SolusVM

Question

How to update the SSL certificate for SolusVM every 3 months automatically?

Answer

  1. Connect to Master node via SSH
  2. Create a bash script for updating certificate

    # echo -e "#/bin/bash\n/root/.acme.sh/acme.sh --renew -d example.com --force\ncat /usr/local/svmstack/nginx/ssl/ssl.crt /usr/local/svmstack/nginx/ssl/ssl.key > /usr/local/solusvm/includes/nvnc/cert.pem\nservice svmstack-nginx restart" > /root/upd_ssl.sh

  3. Make it executable:

    # chmod +x /root/upd_ssl.sh

  4. Add this script to the crone task for regular execution every month:

    # { crontab -l; echo "0 0 3 * * /root/upd_ssl.sh "; } | crontab -

    Note: The path to script /root/upd_ssl.sh can be different

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.