VPS First Setup Guide: Secure Server Checklist
Step-by-step VPS initial setup: first SSH login, system update, creating a non-root user, SSH hardening, firewall and fail2ban installation for a secure server.
Choose the right Linux distribution for your VPS: comparison of Ubuntu LTS, Debian, AlmaLinux and Rocky Linux, pros and cons, use cases and recommendations.
One of the first choices you face when ordering a VPS is the operating system. Ubuntu, Debian, or AlmaLinux? Each distribution has its own strengths, weaknesses, and ideal use cases. This guide helps you choose the distribution that best fits your needs.
Your Linux distribution choice affects:
| Feature | Ubuntu 24.04 LTS | Debian 12 | AlmaLinux 9 | Rocky Linux 9 |
|---|---|---|---|---|
| Base | Debian | Independent | RHEL | RHEL |
| Package Manager | apt | apt | dnf | dnf |
| LTS Support | 5 years (10 ESM) | ~5 years | 10 years | 10 years |
| Release Frequency | Every 6 months | Every 2 years | Follows RHEL | Follows RHEL |
| Community Size | Very large | Large | Medium | Medium |
| Enterprise Use | Common | Common | Very common | Common |
| Beginner Friendly | Very | Moderate | Moderate | Moderate |
| Server Focused | Yes | Yes | Yes | Yes |
Ubuntu is the most widely used Linux distribution worldwide. Ubuntu LTS (Long Term Support) releases are particularly ideal for server environments.
# Ubuntu 24.04 LTS post-install basic check
lsb_release -a
# Ubuntu 24.04.x LTS
# Package manager
apt update && apt upgrade -y
# Popular software installs easily
apt install nginx docker.io python3-pip nodejs npm -y
Ubuntu is ideal for:
Debian is the parent distribution that Ubuntu is based on. Known for its "universal operating system" slogan, it stands out for its stability.
# Debian 12 (Bookworm) basic info
cat /etc/debian_version
# 12.x
# Newer software via backports
echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list
apt update
apt install -t bookworm-backports nginx
Debian is ideal for:
These Red Hat Enterprise Linux (RHEL)-compatible distributions are designed for enterprise environments. They emerged to replace CentOS.
| Feature | AlmaLinux | Rocky Linux |
|---|---|---|
| Founder | CloudLinux | Gregory Kurtzer (CentOS founder) |
| Focus | RHEL compatibility | RHEL clone |
| Community | Active | Very active |
| Enterprise Support | Yes | Yes |
# AlmaLinux 9 basic info
cat /etc/almalinux-release
# AlmaLinux release 9.x
# Package manager
dnf update -y
# EPEL repository (for additional software)
dnf install epel-release -y
dnf install htop fail2ban -y
# SELinux status
getenforce
# Enforcing (active)
AlmaLinux/Rocky is ideal for:
| Use Case | Recommended | Alternative |
|---|---|---|
| Web dev (Node.js/Python) | Ubuntu 24.04 LTS | Debian 12 |
| WordPress/PHP hosting | AlmaLinux 9 | Ubuntu 24.04 LTS |
| Docker/Kubernetes | Ubuntu 24.04 LTS | Debian 12 |
| Database server | Debian 12 | AlmaLinux 9 |
| Game server | Ubuntu 24.04 LTS | Debian 12 |
| cPanel/WHM | AlmaLinux 9 | Rocky Linux 9 |
| Enterprise app | AlmaLinux 9 | Rocky Linux 9 |
| Beginner | Ubuntu 24.04 LTS | — |
| Minimal resources | Debian 12 | — |
# Always prefer LTS releases
# 2024: Ubuntu 24.04 LTS (Noble Numbat)
# 2026: Ubuntu 26.04 LTS (upcoming)
# Non-LTS releases (like 23.10) only get 9 months of support
# NEVER use non-LTS releases for servers
# Use the Stable release (currently: Debian 12 Bookworm)
# Do not use Testing or Unstable on servers
# Version check
cat /etc/debian_version
# Use the latest major release (currently: 9.x)
# 8.x can also be used for RHEL 8 compatibility
# Version check
cat /etc/almalinux-release
# or
cat /etc/rocky-release
Switching from one distribution to another generally requires a reinstall. You can reinstall the OS from the REXE panel:
OS reinstallation deletes all data. Always take a backup first.
If you're new to Linux, start with Ubuntu 24.04 LTS — it has the largest community support and documentation. If stability is your priority, choose Debian 12; for enterprise environments or cPanel, choose AlmaLinux 9. All three distributions perform excellently on REXE infrastructure.
Ubuntu is based on Debian but updates more frequently and includes newer software. Debian is more stable and minimalist. Ubuntu is easier for beginners, while Debian is better suited for experienced users. Both are good choices for servers.
CentOS 7 support ended in 2024. AlmaLinux 9 or Rocky Linux 9 are the best alternatives to CentOS. Both are RHEL-compatible and offer 10 years of support. AlmaLinux 9 is recommended if you use cPanel.
Always choose 64-bit (amd64/x86_64). 32-bit systems are no longer supported and cannot use more than 4GB of RAM. All REXE VPS plans use 64-bit processors.
Always prefer minimal installation for servers. Unnecessary packages can create security vulnerabilities and consume resources. You can add packages as needed. All images provided by REXE are minimal server installations.
Yes, you can reinstall the OS from the REXE panel. However, this process deletes all data. Always take a backup first. Updating the existing system is generally more practical than changing distributions.
Step-by-step VPS initial setup: first SSH login, system update, creating a non-root user, SSH hardening, firewall and fail2ban installation for a secure server.
Technical differences between VPS, VDS and Dedicated servers: virtualization types, performance comparison, use cases, pricing considerations and when to upgrade.