Initial setup for creating a website#

Step 1 - getting a domain name#

TODO

Step 2 - getting a virtual private server (VPS) and initial setup#

Buy a cheap VPS from somewhere. The best deal I found was from contabo.de - i got their absolute cheapest VPS. follow their steps and when you are done, you should get an email with the IP adrress of the VPS ( the password is typically set at the time of signup + purchase). In contabo, I could choose in advance the OS i wanted and I chose Ubuntu 20.04

  1. first login

ssh root@your_server_ip
  1. it is a good idea to create a user and NOT operate from root.

adduser johndoe
  1. The new user should still have access to sudo priviliges

adduser -aG sudo johndoe
  1. pre-step: allow firewall (ufw) to keep ssh ports open

ufw allow OpenSSH
  1. main-step: enable firewall

ufw enable
  1. logout - vps bare setup is done !

  2. nice to have - setup passwordless access to ssh services.

Step 3 - connecting the domain name to vps.#

The main idea is to set the A records to point to your VPS.

I followed the page provided by my name registrar ( the chaps who sold you the web domain name) Porkbun. The details can be found here.

The basic steps are :

  1. find existing DNS records link

  2. remove existing DNS records for ALIAS and CNAME ( the image below is what I had as default)

  1. Add a “A - Address record” once - in this case, the host is “www”. The address is the IP address of the VPS

  2. Add an another address record “A - address record” - in this case, leave the host blank. The address is the same as that of the VPS.