When CentOS Linux 8 reached end of life at the end of 2021 and CentOS became CentOS Stream, two community projects stepped in to provide free, Red Hat Enterprise Linux (RHEL)-compatible distributions: AlmaLinux and Rocky Linux. For most servers they’re interchangeable. The differences are in governance and philosophy rather than day-to-day use.

What they have in common

  • Free and community-supported, with commercial support available from third parties.
  • Same package manager and tools as RHEL: dnf, firewalld, SELinux, systemd.
  • Same major versions as RHEL (8, 9, 10) with long support lifecycles — around ten years per major version.
  • Run the same software — anything built for RHEL generally runs on either one.
  • Migration tools to convert from CentOS, Oracle Linux or each other.

The differences

AlmaLinux Rocky Linux
Backed by AlmaLinux OS Foundation (non-profit) Rocky Enterprise Software Foundation; founded by CentOS co-founder Gregory Kurtzer
Compatibility goal ABI-compatible with RHEL — applications built for RHEL run unchanged; it may ship small fixes ahead of RHEL Aims to be bug-for-bug compatible with RHEL
Source approach (after Red Hat restricted RHEL sources in 2023) Builds from CentOS Stream plus upstream sources, keeping ABI compatibility Continues to rebuild RHEL-matching sources through other legitimate channels
Extras Offers additional architectures and builds; Elevate tool for in-place major upgrades Strong focus on enterprise parity; SIGs for extra packages
Migration script almalinux-deploy migrate2rocky

In practice, both track RHEL closely and release updates quickly after Red Hat does.

Which should you choose?

  • Choose AlmaLinux if you like its non-profit governance, want the in-place major version upgrade path (ELevate), or your control panel or vendor recommends it. Many hosting control panels support AlmaLinux as a first-class OS.
  • Choose Rocky Linux if you want the closest possible match to RHEL behaviour, for example to mirror a RHEL production environment in testing.
  • Either is fine for a typical web server, database server or application server. Pick the one your software vendor documents and stick with it.

What about CentOS Stream?

CentOS Stream is the development branch just ahead of RHEL. It’s stable enough for many uses and gets features earlier, but it changes more often and has a shorter lifecycle per version. For production servers that should stay unchanged for years, AlmaLinux or Rocky is the safer choice.

Getting started on a VPS

After installing either distribution:

dnf -y upgrade
dnf -y install epel-release      # extra packages (htop, fail2ban, …)
systemctl enable --now firewalld
firewall-cmd --permanent --add-service={ssh,http,https}
firewall-cmd --reload
getenforce                       # keep SELinux 'Enforcing'

Create a non-root user with sudo, switch SSH to key authentication, and enable automatic security updates with dnf-automatic:

dnf -y install dnf-automatic
sed -i 's/^upgrade_type.*/upgrade_type = security/; s/^apply_updates.*/apply_updates = yes/' /etc/dnf/automatic.conf
systemctl enable --now dnf-automatic.timer

Migrating between them

Both projects provide scripts to convert an existing CentOS 8, AlmaLinux or Rocky installation in place. Take a full backup (or a fresh server to test on) first; conversions replace core packages and reboot the system. For older CentOS 7 servers, plan a fresh installation and migrate data instead — the jump between major versions is large.

Summary

AlmaLinux and Rocky Linux are both solid, free RHEL-compatible distributions. AlmaLinux emphasizes ABI compatibility and non-profit governance; Rocky emphasizes strict RHEL parity. For most servers the choice comes down to what your software supports. Our CentOS & RHEL-compatible VPS page covers running this family of distributions on a KVM VPS.

  • AlmaLinux
  • Rocky Linux
  • CentOS
  • Linux