Initial Server Configuration and Security Setup
Securing your VPS immediately after deployment is crucial.
Step 1: Update Your System
# For Ubuntu/Debian
sudo apt update && sudo apt upgrade -y
# For AlmaLinux/CentOS/RHEL
sudo dnf update -y
CopyStep 2: Create a Sudo User
# Create new user (replace "youruser")
adduser youruser
# Add user to sudo/wheel group
usermod -aG sudo youruser # Ubuntu/Debian
usermod -aG wheel youruser # AlmaLinux/CentOS/RHEL
CopyStep 3: Harden SSH Access
First, set up Advanced SSH Security and Key Management, then edit /etc/ssh/sshd_config
:
PermitRootLogin no
PasswordAuthentication no
CopyStep 4: Configure Firewall
Set up UFW. For detailed rules, see our Firewall Configuration and Network Security with UFW.
sudo ufw allow ssh
sudo ufw enable
CopyNext Steps: Explore our How to Install CloudPanel v2 guide or other guides in our Application Installers category.