🇩🇪 DE 🇬🇧 EN
NexoraHost / Docs home
Popular searches:Minecraft won't startCreate Minecraft serverFiveM txAdminInstall WordPressSet up subdomainVPS GermanySSL errorOpen port 25565Discord bot hostingDNS troubleshooting

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:

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

NexoraHost customer panel – credentials and 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

  1. Install Pterodactyl
  2. Open ports in UFW
  3. Set up domain/SRV record → Minecraft SRV

Related guides

Frequently asked questions (FAQ)

How long does VPS setup take?
Basic configuration (SSH, updates, firewall, SSH keys) takes 30–60 minutes. Game server setup is additional.
Ubuntu or Debian – which is better?
Both work. Ubuntu 22.04/24.04 is most widely used with the best community support for game servers and Pterodactyl.
Do I need a root server instead of VPS?
For small to medium projects a VPS is enough. For 20+ players, modded servers or Pterodactyl with many nodes we recommend a root server with dedicated CPU.
Can I upgrade the VPS later?
Yes – at NexoraHost you can upgrade RAM, CPU and storage in the customer panel. Plan a backup first.

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