software:server
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| software:server [2021/03/22 07:49] – created vektrat | software:server [2022/01/09 08:28] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| + | //In this case, a Hetzner server// | ||
| + | |||
| + | ====== Basic server configuration ====== | ||
| + | |||
| + | === Update packages === | ||
| + | <code bash> | ||
| + | sudo apt update | ||
| + | sudo apt upgrade | ||
| + | </ | ||
| + | |||
| + | === Register local workstation SSH key === | ||
| + | Take ~/ | ||
| + | |||
| + | ==== Create new user === | ||
| + | <code bash> | ||
| + | adduser vektrat | ||
| + | </ | ||
| + | |||
| + | === Add user to sudoers === | ||
| + | <code bash> | ||
| + | visudo | ||
| + | </ | ||
| + | |||
| + | Resulting file should be like this | ||
| + | <code bash> | ||
| + | # User privilege specification | ||
| + | root ALL=(ALL: | ||
| + | vektrat ALL=(ALL) NOPASSWD: | ||
| + | </ | ||
| + | |||
| + | === SSH config === | ||
| + | <code bash> | ||
| + | cp -r .ssh / | ||
| + | chown -R vektrat .ssh | ||
| + | chgrp -R vektrat .ssh | ||
| + | </ | ||
| + | |||
| + | Reboot and try to access via ssh with the new user | ||
| + | |||
| + | === Disable password login === | ||
| + | <code bash> | ||
| + | sudo vi / | ||
| + | </ | ||
| + | |||
| + | Edit the file to remove hashed password (careful with the rest of the info) | ||
| + | <code bash> | ||
| + | vektrat: | ||
| + | </ | ||
| + | |||
| + | ====== Firewall configuration (optional) ====== | ||
| + | We choose to do so at the provider' | ||
| + | | **Direction** | **Protocol** | **Port** | **Service** | | ||
| + | | inbound | ||
| + | | inbound | ||
| + | | inbound | ||
| + | |||
| + | ====== Install basic applications and services ====== | ||
| + | ==== Docker ===== | ||
| + | === Install docker-ce === | ||
| + | Following [[https:// | ||
| + | |||
| + | === Install docker-compose === | ||
| + | <code bash> | ||
| + | sudo apt get install docker-compose | ||
| + | </ | ||
software/server.1616399393.txt.gz · Last modified: (external edit)
