Enterprise hosting · Built for gamers
Set Up Linux VPS – Complete Guide (SSH, Firewall, Security & Performance)
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 case | RAM | CPU | Storage |
|---|---|---|---|
| 1× Minecraft (vanilla, <10 players) | 4 GB | 2 cores | 40 GB SSD |
| Modded Minecraft / ARK / FiveM | 8–16 GB | 4 cores | 80–160 GB SSD |
| Pterodactyl panel + 2–3 servers | 16 GB | 6 cores | 160 GB SSD |
| Web server + DB + mail | 4–8 GB | 2–4 cores | 40–80 GB SSD |
Step 1: First SSH connection

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
Related guides
Frequently asked questions (FAQ)
How long does VPS setup take?
Ubuntu or Debian – which is better?
Do I need a root server instead of VPS?
Can I upgrade the VPS later?
NexoraHost
Root & VPS servers
Ryzen power at Maincubes FRA01 – full root access, NVMe, DDoS protection included.
nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime