Your First Hour With a New VPS

Connect and update

ssh root@YOUR_SERVER_IP

# Debian / Ubuntu
apt update && apt upgrade -y

# AlmaLinux / Rocky
dnf update -y

hostnamectl set-hostname server1.yourdomain.com
timedatectl set-timezone Asia/Beirut

Create a non-root user and key-based login

adduser deploy
usermod -aG sudo deploy      # or wheel on RHEL-family

# From your local machine
ssh-keygen -t ed25519 -C "[email protected]"
ssh-copy-id deploy@YOUR_SERVER_IP

# Then harden /etc/ssh/sshd_config
#   PermitRootLogin no
#   PasswordAuthentication no
#   Port 2222   (optional but reduces log noise)
systemctl restart sshd

Open a second terminal and confirm the new login works before closing your root session, or you can lock yourself out.

Firewall and intrusion protection

# Ubuntu
ufw default deny incoming
ufw default allow outgoing
ufw allow 2222/tcp
ufw allow 80,443/tcp
ufw enable

# RHEL-family
firewall-cmd --permanent --add-service={http,https}
firewall-cmd --permanent --add-port=2222/tcp
firewall-cmd --reload

# Brute-force protection
apt install fail2ban -y && systemctl enable --now fail2ban

Baseline operational setup

  • Enable automatic security updates, and schedule reboots for kernel updates.
  • Add swap if RAM is under 4 GB, sized at roughly one to two times memory.
  • Set up log rotation and confirm /var/log is not filling the disk.
  • Install a monitoring agent or configure alerts on CPU, memory, disk and uptime.
  • Configure reverse DNS (PTR) for the IP if the server will send email.
  • Take a snapshot once the base configuration is complete — it becomes your known-good rollback point.

Choose your stack next

With the base secured, decide between a control panel (cPanel/WHM, DirectAdmin, Plesk, CyberPanel, ISPmanager) for managed convenience, or a hand-built stack (LiteSpeed/NGINX + PHP-FPM + MariaDB + Redis) for maximum control. Panels save enormous time when hosting many sites; hand-built stacks win for single high-performance applications.

Frequently asked questions

Do I need a control panel on a VPS?

No, but it is worth it if you host several sites or want cPanel-style email and backups without scripting them yourself.

Which OS should I choose?

Ubuntu LTS for the widest documentation and package availability, AlmaLinux or Rocky for cPanel and RHEL-compatible workloads.

Need a hand applying this?

Our engineers can do it for you. Open a ticket and we will help.