Set Up Linux VPS – Complete Guide (SSH, Firewall, Security & Performance)
Set up Linux VPS from A to Z: SSH keys, UFW firewall, Fail2ban, swap, updates, backups & game server prep – step-by-step for NexoraHost.
Quick answer: Set up a NexoraHost Linux VPS securely in 30–60 minutes: SSH connection → update system → SSH keys instead of password → UFW firewall → Fail2ban → open only needed ports → plan backups. This guide covers every step – from Ubuntu/Debian to game server preparation.
What is a VPS and what do you need it for?
A VPS (Virtual Private Server) is a virtual machine with its own OS, root access and fixed IP. You share physical hardware with other customers but have guaranteed resources (CPU, RAM, SSD) – much cheaper than a dedicated root server.
Typical use cases:
- Game servers (Minecraft, ARK, FiveM, DayZ) – with Pterodactyl or manually
- Voice servers (TeamSpeak, Mumble)
- Web projects, APIs, bots (Discord, Telegram)
- Development and test environments
More background: What is a VPS? · Root server comparison: What is a root server?
Step 0: Choose the right plan
Use caseRAMCPUStorage
1× Minecraft (vanilla, <10 players)4 GB2 cores40 GB SSD
Modded Minecraft / ARK / FiveM8–16 GB4 cores80–160 GB SSD
Pterodactyl panel + 2–3 servers16 GB6 cores160 GB SSD
Web server + DB + mail4–8 GB2–4 cores40–80 GB SSD
Step 1: First SSH connection
IP, user and password in customer panel → ssh root@IP → update system → enable UFW. ssh root@YOUR-SERVER-IP See also: First steps with your server
Step 2: Update system
apt update && apt upgrade -y
Step 3: Hostname & timezone
hostnamectl set-hostname my-vps timedatectl set-timezone Europe/Berlin
Step 4: Secure SSH (keys instead of password)
`# On your local machine ssh-keygen -t ed25519 -C "nexorahost-vps"
On server
mkdir -p ~/.ssh && chmod 700 ~/.ssh nano ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys
Disable password login in /etc/ssh/sshd_config
systemctl restart sshd` Details: SSH keys instead of passwords
Step 5: UFW firewall
apt install ufw -y ufw allow 22/tcp ufw allow 25565/tcp # Minecraft ufw allow 80/tcp ufw allow 443/tcp ufw enable Full guide: Firewall – opening and closing ports
Step 6: Fail2ban
apt install fail2ban -y systemctl enable --now fail2ban
Step 7: Swap (for low RAM)
fallocate -l 2G /swapfile chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile echo '/swapfile none swap sw 0 0' >> /etc/fstab
Step 8–10: Tools, monitoring, backups
Install curl, git, htop. Monitor with htop, df -h, free -h. Plan snapshots (root server) or cron backups (VPS). See monitoring guide.
Game server preparation
- Install Pterodactyl
- Open ports in UFW
- Set up domain/SRV record → Minecraft SRV