It's just a simple guidance on how to use your domain with a Lightsail instance.
I'll consider a situation when you have bought a domain using Namecheap (could be any domain registrar) and have created a Lightsail instance with Debian.
The complete list of steps will look like:
- Create a
static IP
- Create and configure a
DNS zone
- Change
networking
settings - Use AWS
nameservers
for your domain - Install and setup
nginx
* - Setup Let's Encrypt
SSL
certificate*
Create a static IP
- Open
Networking
page - Click on
Create static IP
- Pick up a
name
for your static IP - Click on
Create
- Open
Networking
page - Click on your
static IP
- Attach it to your
instance
Create and configure a DNS zone
- Open
Domains & DNS
page - Click on
create DNS zone
- Specify your registered
domain name
- Click on
create DNS zone
- Assign your registered
domain name
to your created zone - Add
DNS records
Change networking settings
- Open the page with your
instance
- Open
Networking tab
- Make sure you have left opened only
ports
that you need (in my case, it's only 22 and 443)
Use AWS nameservers for your domain
- Open
Domains & DNS
page - Open the page with your
DNS zone
- Copy your
name servers
- Use your
name servers
in the dashboard of your domain register (I used Namecheap) - You can use dnschecker to see if changes were applied (it will take some time)
Install and setup nginx*
This topic is skipped because it's pretty basic and available in the internet
Setup Let's Encrypt SSL certificate*
This topic is well covered in the official doc (If you need a free SSL certificate for your site then you can follow this step)
*
- optional steps