To install an SSL certificate on your DigitalOcean droplet, follow these general steps:
- Obtain an SSL certificate from a trusted certificate authority (CA). You can purchase an SSL certificate from a CA or use a free SSL certificate provider such as Let’s Encrypt.
- SSH into your droplet using your preferred SSH client.
- Install the Certbot tool on your droplet by running the following command:
sudo apt-get update
sudo apt-get install certbot python3-certbot-nginx
Note: This assumes you are using Nginx as your web server. If you are using Apache, replace nginx
with apache
in the command.
- Run the following command to obtain an SSL certificate:
sudo certbot --nginx
This will start the Certbot tool and guide you through the process of obtaining and installing an SSL certificate. Follow the prompts and provide the requested information.
- Once the SSL certificate has been installed, verify that your website is now accessible over HTTPS.
That’s it! Your DigitalOcean droplet now has an SSL certificate installed and your website is secure over HTTPS.