Knowledgebase

How to Install Rocky Linux on a VPS (Step-by-Step Guide) Print

  • 0

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

  1. Log in to your VPS control panel

  2. Navigate to OS Reinstall / Operating System

  3. Select Rocky Linux

  4. Choose a version:

    • Rocky Linux 9 (Recommended)

    • Rocky Linux 8

  5. Set or generate a root password

  6. Click Reinstall / Deploy

  7. 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

  1. Open the VPS VNC / NoVNC console

  2. Mount the Rocky Linux Minimal ISO

  3. Reboot the VPS

  4. 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)

  5. Begin installation and wait for completion

  6. Reboot and unmount the ISO


Connecting to Your Rocky Linux VPS

After installation, connect using SSH.

Linux / macOS

 
ssh root@YOUR_SERVER_IP

Windows (PowerShell)

 
ssh root@YOUR_SERVER_IP

Enter your root password when prompted.


Post-Installation Setup (Highly Recommended)

1. Update the System

 
dnf update -y

2. Create a New User

 
adduser username passwd username usermod -aG wheel username

Switch to the new user:

 
su - username

3. Secure SSH Access

Edit SSH configuration:

 
nano /etc/ssh/sshd_config

Recommended changes:

 
PermitRootLogin no PasswordAuthentication yes # set to no if using SSH keys

Restart SSH:

 
systemctl restart sshd

4. Configure Firewall (Firewalld)

 
systemctl enable firewalld --now firewall-cmd --add-service=ssh --permanent firewall-cmd --reload

Check status:

 
firewall-cmd --list-all

5. Enable SELinux (Recommended)

Check SELinux status:

 
sestatus

If disabled, enable it:

 
nano /etc/selinux/config

Set:

 
SELINUX=enforcing

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:

 
systemctl status sshd
  • Verify firewall rules:

 
firewall-cmd --list-services

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.


Was this answer helpful?

« Back

Chat with us Call us

Looking for the Right Hosting Solution?

Our expert support team is here to guide you to the ideal hosting solution for your specific needs. Get personalized recommendations and answers to all your questions.

Get Expert Consultation

Copyright © 2026 Tupoa Hosting. All Rights Reserved.