Rocky Linux is a free, community-driven RHEL-compatible Linux distribution. This guide covers essential first steps after provisioning a Rocky Linux VPS at UnderHost.
## 1. Connect via SSH {#connect-ssh}
Find your VPS credentials in CustomerPanel under **My Services**. Connect using SSH:
```bash
ssh root@your.server.ip
```
Replace `your.server.ip` with your VPS IP address. If prompted, accept the key fingerprint.
## 2. Update the System {#update-system}
Keep your system secure by updating packages:
```bash
dnf update -y
```
For a major upgrade:
```bash
dnf upgrade -y
```
## 3. Configure Firewalld {#firewall-basics}
Rocky Linux includes **firewalld** for firewall management. Check its status:
```bash
systemctl status firewalld
```
Enable it at boot:
```bash
systemctl enable firewalld
systemctl start firewalld
```
Allow SSH (required to keep access):
```bash
firewall-cmd --permanent --add-service=ssh
firewall-cmd --reload
```
Allow HTTP and HTTPS for web servers:
```bash
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
```
## 4. Create a Non-Root User {#create-user}
Running everything as root is unsafe. Create a non-root user:
```bash
useradd -m -s /bin/bash adminuser
passwd adminuser
```
Add sudo privileges:
```bash
usermod -aG wheel adminuser
```
Test the new user:
```bash
su - adminuser
sudo whoami
```
Exit and log in as the new user for day-to-day tasks.
## 5. Install Common Software {#install-software}
**Web Server (Nginx):**
```bash
dnf install nginx -y
systemctl enable nginx
systemctl start nginx
```
**PHP and Extensions:**
```bash
dnf install php php-cli php-fpm php-mysqlnd -y
systemctl enable php-fpm
systemctl start php-fpm
```
**MySQL/MariaDB:**
```bash
dnf install mariadb-server -y
systemctl enable mariadb
systemctl start mariadb
mysql_secure_installation
```
**Git:**
```bash
dnf install git -y
```
## Next Steps {#next-steps}
- Install a control panel (aaPanel, CloudPanel, or HestiaCP)
- Configure SSL certificates with Let's Encrypt
- Set up regular backups
- Monitor system resources with tools like htop
- Read the [OS Comparison guide](/article/os-comparison/) for other options
For more help, see our [VPS management guide](/article/manage-vps/) or [contact support](/article/contact-support/).
**Related:** [Getting started with AlmaLinux on your VPS](/article/almalinux-guide/) | [Getting started with Ubuntu Server on your VPS](/article/ubuntu-server-guide/) | [Linux and Windows operating systems for VPS-which to choose](/article/os-comparison/) | [How to choose the right operating system for your VPS](/article/choose-os/)
Was this article helpful?
Need a server with this OS?
Deploy Linux or Windows workloads on an UnderHost Cloud VPS or dedicated server with the operating system that fits your stack.