The Droplet

Terraform config to create a droplet and point a domain to it.

Set up

01. Create infrastructure

terraform init
terraform plan
terraform apply -var-file="env.tfvars"

02. Set up

scp start-up.sh root@rmaki.tech:~/
ssh root@rmaki.tech
bash start-up.sh
scp auto-upgrade.sh luke@rmaki.tech:~/
scp Caddyfile luke@rmaki.tech:~/apps/
ssh luke@rmaki.tech
bash auto-upgrade.sh

sudo nano /etc/ssh/sshd_config

Change the following lines:

PasswordAuthentication no
PermitRootLogin no
sudo systemctl restart ssh