This guide explains how to install Rocky Linux on a Virtual Private Server (VPS). Rocky Linux is a free, enterprise-grade Linux distribution designed as a bug-for-bug compatible replacement for CentOS, making it ideal for production servers, hosting environments, and business applications.
Prerequisites
Before you begin, ensure you have:
-
An active VPS
-
Access to the VPS control panel
-
Root password or SSH key
-
VPS public IP address
-
SSH client:
-
Linux / macOS: Terminal
-
Windows: PowerShell or PuTTY
-
Method 1: Install Rocky Linux via VPS Control Panel (Recommended)
Most VPS providers support one-click OS installation.
Steps
-
Log in to your VPS control panel
-
Navigate to OS Reinstall / Operating System
-
Select Rocky Linux
-
Choose a version:
-
Rocky Linux 9 (Recommended)
-
Rocky Linux 8
-
-
Set or generate a root password
-
Click Reinstall / Deploy
-
Wait 5–15 minutes for the installation to complete
Your VPS will reboot automatically after installation.
Method 2: Install Rocky Linux Using ISO (Advanced Users)
Use this method if your VPS provider allows custom ISO mounting.
Steps
-
Open the VPS VNC / NoVNC console
-
Mount the Rocky Linux Minimal ISO
-
Reboot the VPS
-
Follow the installer:
-
Select language and keyboard
-
Configure network (DHCP recommended)
-
Set hostname
-
Configure root password and/or create user
-
Select disk (Automatic partitioning recommended)
-
Choose software selection (Minimal Install recommended)
-
-
Begin installation and wait for completion
-
Reboot and unmount the ISO
Connecting to Your Rocky Linux VPS
After installation, connect using SSH.
Linux / macOS
Windows (PowerShell)
Enter your root password when prompted.
Post-Installation Setup (Highly Recommended)
1. Update the System
2. Create a New User
Switch to the new user:
3. Secure SSH Access
Edit SSH configuration:
Recommended changes:
Restart SSH:
4. Configure Firewall (Firewalld)
Check status:
5. Enable SELinux (Recommended)
Check SELinux status:
If disabled, enable it:
Set:
Reboot the server.
Recommended Rocky Linux Versions for VPS
| Version | Status | Recommended |
|---|---|---|
| Rocky Linux 9 | Stable | ✅ Yes |
| Rocky Linux 8 | Stable | ✅ Yes |
| Rocky Linux 7 | EOL | ❌ No |
Troubleshooting
SSH Connection Refused
-
Check SSH service:
-
Verify firewall rules:
VPS Not Booting
-
Reinstall OS from control panel
-
Ensure correct disk is selected
-
Contact VPS provider for console access
Conclusion
Rocky Linux is a reliable, enterprise-ready operating system ideal for VPS hosting and production workloads. Installing it via your VPS control panel is the fastest method. After installation, always update the system, create a non-root user, secure SSH, and configure the firewall and SELinux.