Setup Certificate
Shows how to obtain and verify an SSL certificate for a domain using Certbot.
Create Route 53 URL
Create Route 53 URL from your domain e.g. caesar.internal.romeprotocol.xyz to point to EC2 server IP.
Open Ports
Make sure that ports HTTP (80) and HTTPS (443) are open on your remote server.
Use AWS EC2 security group to open these ports.
Obtain Certificate
Certbot CLI below enables you to obtain a Lets Encrypt certificate.
Note: Use your own email address and domain name when requesting the certificate.
sudo apt install -y nginx
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot certonly --nginx -n -m [email protected] --agree-tos --domains caesar.internal.romeprotocol.xyz # Replace with your email and domain
sudo nginx -s stop
Verify certificate generation
Now, ensure that fullchain.pem and privkey.pem files are located in the directory below.
sudo ls /etc/letsencrypt/live/caesar.internal.romeprotocol.xyz
Last updated
Was this helpful?