====== Initial server config ======
//In this case, a Hetzner server//
====== Basic server configuration ======
=== Update packages ===
sudo apt update
sudo apt upgrade
=== Register local workstation SSH key ===
Take ~/.ssh/id_rsa.pub and paste it in `/root/.ssh/authorized_keys`
==== Create new user ===
adduser vektrat
=== Add user to sudoers ===
visudo
Resulting file should be like this
# User privilege specification
root ALL=(ALL:ALL) ALL
vektrat ALL=(ALL) NOPASSWD:ALL
=== SSH config ===
cp -r .ssh /home/vektrat/
chown -R vektrat .ssh
chgrp -R vektrat .ssh
Reboot and try to access via ssh with the new user
=== Disable password login ===
sudo vi /etc/shadow
Edit the file to remove hashed password (careful with the rest of the info)
vektrat:*:19000:0:99999:7:::
====== Firewall configuration (optional) ======
We choose to do so at the provider's location and allow those basic services:
| **Direction** | **Protocol** | **Port** | **Service** |
| inbound | TCP | 22 | SSH |
| inbound | TCP | 80 | HTTP |
| inbound | TCP | 443 | HTTPS |
====== Install basic applications and services ======
==== Docker =====
=== Install docker-ce ===
Following [[https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04|those guidelines]]
=== Install docker-compose ===
sudo apt get install docker-compose