You just got a fresh VPS with root access. Before you deploy anything, spend 10 minutes locking it down. Here is the checklist I run on every new Linux server.

1. Update everything

apt update && apt upgrade -y 

2. Create a non-root user

adduser deploy usermod -aG sudo deploy 

3. Use SSH keys instead of passwords

On your local machine:

ssh-copy-id deploy@YOUR_SERVER_IP 

Then edit /etc/ssh/sshd_config:

PermitRootLogin no PasswordAuthentication no 

Restart SSH:

systemctl restart ssh 

Keep your current session open and test the new login in a second terminal before closing it.

4. Turn on a firewall

ufw allow OpenSSH ufw allow 80 ufw allow 443 ufw enable 

5. Block brute-force attempts

apt install fail2ban -y systemctl enable --now fail2ban 

6. Enable automatic security updates

apt install unattended-upgrades -y dpkg-reconfigure --priority=low unattended-upgrades 

7. Add swap on small servers

fallocate -l 1G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile echo '/swapfile none swap sw 0 0' >> /etc/fstab 

8. Take a snapshot

Once the server is clean, take a snapshot or backup. If something breaks later, you can roll back in minutes.

That's it. Your server is now in much better shape than a default install.

I run AlisHosting, a KVM VPS provider with NVMe storage, full root access and 35+ locations, so I set up a lot of fresh servers. What's on your own first-boot checklist? Drop it in the comments.