How To Install Let's Encrypt SSL Certificates on Unmanaged VPS Print

  • 0

Securing your website with SSL certificates is essential for protecting user data and enhancing trust. On an Unmanaged Virtual Private Server (VPS), installing Let's Encrypt SSL certificates requires specific procedures based on your operating system and the presence of a control panel like cPanel.

Installing Let's Encrypt SSL on cPanel VPS

For VPS instances utilizing cPanel, the integration of Let's Encrypt is streamlined through AutoSSL. Follow these steps:

  1. Access the VPS via SSH:

    • Log in as the root user or a user with sudo privileges.
  2. Install the Let's Encrypt AutoSSL Provider:

 

  • Execute the command:
    /scripts/install_lets_encrypt_autossl_provider
  • This command installs the Let's Encrypt plugin for AutoSSL.

 

  1. Configure AutoSSL in WHM:

    • Navigate to Home > SSL/TLS > Manage AutoSSL.
    • Select "Let's Encrypt" as the AutoSSL provider.
    • Agree to the terms of service and save the configuration.
  2. Issue SSL Certificates:

    • To issue certificates for all users, use the "Run AutoSSL For All Users" feature.
    • For individual users, select "Manage Users" and proceed accordingly.

Installing Let's Encrypt SSL on CentOS 6 without a Control Panel

For systems without a control panel, Certbot facilitates the installation of Let's Encrypt certificates.

  1. Access the VPS via SSH:

    Log in as the root user or a user with sudo privileges.
  2. Download and Install Certbot:

    Execute the following commands:
     
  1. wget https://dl.eff.org/certbot-auto
    sudo mv certbot-auto /usr/local/bin/certbot-auto
    sudo chown root /usr/local/bin/certbot-auto
    sudo chmod 0755 /usr/local/bin/certbot-auto
     
     
    These commands download Certbot and set the appropriate permissions.
  1. Obtain and Install the SSL Certificate:
     

For Apache servers:

 
sudo /usr/local/bin/certbot-auto --apache
 
For Nginx servers:
 
sudo /usr/local/bin/certbot-auto --nginx
 
Follow the interactive prompts to enter your email address, agree to the terms of service, and select the domains for which you wish to issue certificates.
 
Set Up Automatic Renewal:
  • To ensure certificates renew automatically, add a cron job

 

This schedules the renewal process to run twice daily.

Installing Let's Encrypt SSL on CentOS 7 without a Control Panel

The procedure for CentOS 7 differs slightly due to the availability of the Extra Packages for Enterprise Linux (EPEL) repository.

  1. Access the VPS via SSH:

    Log in as the root user or a user with sudo privileges.
  2. Enable the EPEL Repository:

    Execute:
     
    sudo yum install epel-release
     
    This command enables access to additional packages required for Certbot.
  3. Install Certbot:

    For Apache servers:
     
    sudo yum install certbot python2-certbot-apache
     
    For Nginx servers:
     
    sudo yum install certbot python2-certbot-nginx
     
    These commands install Certbot along with the necessary web server plugins.
  4. Obtain and Install the SSL Certificate:

    For Apache:
     
    sudo certbot --apache
     
    For Nginx:
     
    sudo certbot --nginx
     
    Proceed through the interactive prompts to configure your SSL certificates.
  5. Set Up Automatic Renewal:

    Add the following cron job to automate renewals:
     
     
    This ensures that Certbot attempts to renew the certificates at regular intervals.

 

 


Was this answer helpful?

« Back