How to Set Up Germany VPS — Complete Configuration Guide

Your new Germany VPS from Inferno VPS in Frankfurt is deployed and accessible — now it's time to configure it properly. This comprehensive 10-step setup guide covers everything from basic system updates to advanced security hardening, firewall configuration, and performance optimization. Following these steps ensures your Frankfurt VPS is secure, performant, and production-ready.

All commands in this guide are designed for Ubuntu 22.04 LTS and Debian 12. Commands for CentOS Stream 9 / AlmaLinux / Rocky Linux are noted where different. Always test commands on a fresh installation before applying to a production server.

Step 1: Update System Packages

The first thing to do on any new server is update all installed packages to their latest versions. This ensures you have the latest security patches and bug fixes.

# Update package lists and upgrade all installed packages
sudo apt update && sudo apt upgrade -y

# For CentOS / AlmaLinux / Rocky Linux:
# sudo dnf update -y

# Clean up unnecessary packages
sudo apt autoremove -y && sudo apt autoclean -y

This may take a few minutes depending on the number of packages that need updating. After completion, your server has all the latest security patches applied.

Step 2: Create a Non-Root User with Sudo

Running everything as root is a significant security risk. Create a new user for daily administration and grant sudo privileges.

# Create a new user (replace 'admin' with your preferred username)
sudo adduser admin

# Add the user to the sudo group
sudo usermod -aG sudo admin

# Switch to the new user
su - admin

# Verify sudo access
sudo whoami
# Output should be: root

For CentOS/RHEL-based systems, use sudo usermod -aG wheel admin instead of the sudo group.

Step 3: SSH Key Authentication Setup

SSH key authentication is far more secure than password authentication. Generate a key pair on your local machine and add the public key to your VPS.

Generate SSH Key on Your Local Machine

# On your LOCAL machine (not the VPS)
ssh-keygen -t ed25519 -C "your-email@example.com"

# Copy the public key to your VPS
ssh-copy-id admin@YOUR_SERVER_IP

Manual Key Setup (if ssh-copy-id isn't available)

# On the VPS, create the .ssh directory and authorized_keys file
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys

# Paste your public key (from ~/.ssh/id_ed25519.pub on your local machine)
# Save and exit, then set correct permissions
chmod 600 ~/.ssh/authorized_keys

Test the key-based login in a new terminal window before proceeding to the next step. If you can log in without entering a password, SSH key authentication is working correctly.

Step 4: SSH Hardening

Now that SSH key authentication is working, disable password authentication and strengthen SSH security. Always keep your SSH session open when making these changes — test in a new window before closing the original.

# Edit the SSH configuration file
sudo nano /etc/ssh/sshd_config

Modify or add the following lines in sshd_config:

# Change the default SSH port (optional but recommended)
Port 2222

# Disable password authentication
PasswordAuthentication no

# Disable root login via SSH
PermitRootLogin no

# Disable empty passwords
PermitEmptyPasswords no

# Limit login attempts
MaxAuthTries 3

# Set idle timeout (5 minutes)
ClientAliveInterval 300
ClientAliveCountMax 2

# Allow only your specific user (optional)
AllowUsers admin
# Restart SSH to apply changes
sudo systemctl restart sshd

# For Ubuntu/Debian, you can also use:
# sudo systemctl restart ssh

Important: If you changed the SSH port, remember to connect with ssh -p 2222 admin@YOUR_SERVER_IP from now on. Also update your firewall rules to allow the new port before closing your current session.

Step 5: UFW Firewall Configuration

The Uncomplicated Firewall (UFW) provides a simple interface for managing iptables. Configure it to allow only essential traffic and block everything else.

# Install UFW (usually pre-installed on Ubuntu)
sudo apt install ufw -y

# Deny all incoming by default, allow all outgoing
sudo ufw default deny incoming
sudo ufw default allow outgoing

# Allow SSH (use your custom port if you changed it)
sudo ufw allow 2222/tcp comment 'SSH'

# Allow HTTP and HTTPS
sudo ufw allow 80/tcp comment 'HTTP'
sudo ufw allow 443/tcp comment 'HTTPS'

# If you're running a VPN server:
# sudo ufw allow 51820/udp comment 'WireGuard'

# Enable the firewall
sudo ufw enable

# Check status
sudo ufw status verbose

For CentOS/RHEL-based systems, use sudo dnf install firewalld -y and configure with firewall-cmd commands instead.

Step 6: Fail2Ban Installation

Fail2Ban monitors log files for repeated failed login attempts and automatically blocks offending IP addresses. It's essential protection against brute-force attacks.

# Install Fail2Ban
sudo apt install fail2ban -y

# Create a local configuration file (never edit the default)
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

# Create a custom configuration
sudo nano /etc/fail2ban/jail.local

Add or modify these settings in jail.local:

[DEFAULT]
# Ban for 1 hour, then 1 day, then 1 week on repeated offenses
bantime = 3600
banaction = iptables-multiport

# Find failed attempts within a 10-minute window
findtime = 600

# Ban after 3 failed attempts
maxretry = 3

[sshd]
enabled = true
port = 2222
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
bantime = 3600
# Enable and start Fail2Ban
sudo systemctl enable fail2ban
sudo systemctl start fail2ban

# Check status
sudo fail2ban-client status sshd

Step 7: Set Timezone to Europe/Berlin

Setting the correct timezone ensures your log timestamps and scheduled tasks use Central European Time, which is important for debugging and audit purposes.

# Set timezone to Europe/Berlin
sudo timedatectl set-timezone Europe/Berlin

# Verify the change
timedatectl

# Install NTP for accurate time synchronization
sudo apt install chrony -y
sudo systemctl enable chrony
sudo systemctl start chrony

Step 8: Swap Configuration

Swap space prevents out-of-memory crashes when RAM is exhausted. While NVMe storage is fast, swap should be viewed as a safety net — not a substitute for adequate RAM.

# Check current swap status
sudo swapon --show
free -h

# Create a 1 GB swap file (adjust size based on your plan)
sudo fallocate -l 1G /swapfile

# Set correct permissions
sudo chmod 600 /swapfile

# Format as swap
sudo mkswap /swapfile

# Enable swap
sudo swapon /swapfile

# Make swap persistent across reboots
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

# Optimize swap settings
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

# Verify swap is active
free -h

The swappiness=10 setting tells the kernel to avoid using swap unless absolutely necessary, preserving NVMe IOPS for actual data operations.

Step 9: NGINX + Certbot Installation

Install a web server and set up free SSL/TLS certificates from Let's Encrypt for secure HTTPS connections.

# Install NGINX
sudo apt install nginx -y

# Start and enable NGINX
sudo systemctl enable nginx
sudo systemctl start nginx

# Verify NGINX is running
sudo systemctl status nginx

# Install Certbot for Let's Encrypt SSL certificates
sudo apt install certbot python3-certbot-nginx -y

# After pointing your domain to your VPS IP, get an SSL certificate
# sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

# Test automatic renewal
sudo certbot renew --dry-run

Step 10: Automatic Security Updates

Configure unattended-upgrades to automatically install security patches, keeping your server protected without manual intervention.

# Install unattended-upgrades
sudo apt install unattended-upgrades -y

# Enable automatic updates
sudo dpkg-reconfigure --priority=low unattended-upgrades
# Select "Yes" when prompted

# Or configure manually
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

Key settings in 50unattended-upgrades:

// Enable automatic security updates
Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}-security";
    "${distro_id}ESMApps:${distro_codename}-apps-security";
    "${distro_id}ESM:${distro_codename}-infra-security";
};

// Auto-reboot if needed (set to "true" if you want it)
Unattended-Upgrade::Automatic-Reboot "false";

// Only upgrade during a specific time window
Unattended-Upgrade::Allowed-Origins::Blacklist {};
# Enable the service
sudo systemctl enable unattended-upgrades
sudo systemctl start unattended-upgrades

# Check if it's running
sudo unattended-upgrade --dry-run --debug

Monitoring Setup

Keep an eye on your server's health with these lightweight monitoring tools:

htop — Interactive Process Viewer

sudo apt install htop -y
htop

vnstat — Network Bandwidth Monitor

sudo apt install vnstat -y
sudo systemctl enable vnstat
sudo systemctl start vnstat

# Check bandwidth usage
vnstat

# Real-time monitoring
vnstat -l

dmesg + journalctl — System Logs

# View hardware/kernel messages
dmesg --level=err,warn

# View system journal
journalctl -f --since "1 hour ago"

Basic Benchmarking

Verify your Inferno VPS is performing as expected with quick benchmark tests:

CPU Benchmark (Geekbench 6)

# Download and run Geekbench 6
wget https://cdn.geekbench.com/Geekbench-6.2.2-Linux.tar.gz
tar xf Geekbench-6.2.2-Linux.tar.gz
cd Geekbench-6.2.2-Linux
./geekbench6

NVMe I/O Benchmark

sudo apt install fio -y

# Random read IOPS test
sudo fio --name=nvme-read --rw=randread --bs=4k --iodepth=64 --numjobs=4 --size=1G --runtime=30 --group_reporting

# Random write IOPS test
sudo fio --name=nvme-write --rw=randwrite --bs=4k --iodepth=64 --numjobs=4 --size=1G --runtime=30 --group_reporting

Network Throughput

# Install speedtest
sudo apt install speedtest-cli -y
speedtest-cli

Backup Strategy

A robust backup strategy is essential for any production server. Here's a simple approach using Rsync and automated cron jobs:

# Install rsync (usually pre-installed)
sudo apt install rsync -y

# Create a backup script
sudo nano /usr/local/bin/backup.sh
#!/bin/bash
# Daily backup script for Germany VPS
BACKUP_DIR="/backup"
DATE=$(date +%Y-%m-%d_%H-%M-%S)
KEEP_DAYS=7

# Create backup directory
mkdir -p $BACKUP_DIR

# Backup important directories
tar -czf $BACKUP_DIR/full-backup-$DATE.tar.gz \
    /etc \
    /home \
    /var/www \
    /root \
    /opt \
    --exclude=/backup

# Remove backups older than 7 days
find $BACKUP_DIR -name "full-backup-*.tar.gz" -mtime +$KEEP_DAYS -delete

echo "Backup completed: $BACKUP_DIR/full-backup-$DATE.tar.gz"
# Make executable and schedule
sudo chmod +x /usr/local/bin/backup.sh

# Add to crontab (run daily at 2 AM)
echo '0 2 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1' | crontab -

For off-server backups, consider using Rsync to push backups to another server, or configure automated uploads to cloud storage (S3-compatible, Backblaze B2) for disaster recovery.

Your Germany VPS is now fully configured, secured, and monitored. You have SSH key authentication, a hardened firewall, brute-force protection, automatic updates, swap space, and a backup strategy in place. For additional help, visit our support page or check the FAQ.

Ready to Deploy in Frankfurt?

Get your Germany VPS from $4.99/mo with NVMe SSD, 10Gbps, and free DDoS protection

Get Germany VPS →