How to Install Let's Encrypt SSL in Nginx on Ubuntu 24.10

To install Let's Encrypt SSL on Nginx on Ubuntu 24.10, follow these steps:

Step 1 : Ensure your domain is properly DNS configured for verification.

Step 2 : Update your system by running:

Step 3 : Install Certbot and the Nginx plugin:

Step 4 : Create a configuration file for your domain:

- Add the configuration for the domain:

Step 5 : Create the directory for your domain:

Then, create a sample index.html file in this directory.

Step 6 : Enable the Nginx configuration:

Step 7 : Test the Nginx configuration:

Step 8 : Restart Nginx to apply changes:

Step 9 : Obtain the SSL certificate using Certbot:

- Enter your email address: (e.g., youremail@example.com)

- Agree to the terms of service: y

- Share your email address: y

- Certbot will confirm the successful installation.

Step 10 : Test automatic certificate renewal:

Step 11 : Visit your domain (e.g., https://example.devtutorial.io) to verify the SSL is working correctly.

Congratulations, you have successfully installed Let's Encrypt SSL on Nginx!