Building a Personal Server from Scratch
Recorded the entire process from buying a domain, choosing a VPS, configuring Nginx, installing SSL to deploying the first service. Suitable for beginners.
Prerequisites
You need: a domain, a VPS, basic SSH knowledge.
Steps
- Purchase VPS, get IP and root password
- SSH connect, change password, create regular user, configure SSH key
- Install Nginx:
apt install nginx - Point domain DNS to VPS IP
- Get SSL certificate:
certbot --nginx
Security Hardening
bash
# Change SSH port
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config
# Disable root login
sed -i 's/#PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config
# Install fail2ban
apt install fail2banYour server is your home in the digital world. Spend time building it well, it's worth it.