keepcalculator

06 Numbers and Powers

Migrate CentOS 8 to CentOS Stream: Full Guide

Card No. 06·85740 · Updated · Standard formula, shown below

Yes, you can migrate CentOS 8 to CentOS Stream, and the official tool for this is the migrate2rocky script, which actually converts CentOS 8 to Rocky Linux, not CentOS Stream. To go to CentOS Stream specifically, you use the centos-stream-release package and the dnf swap command. This article explains the exact steps, the differences between the two paths, and what to consider before you switch.

Why Migrate at All?

CentOS 8 reached its end of life on December 31, 2021. That means no more security updates, bug fixes, or patches from the official CentOS project. Running an unsupported operating system is a serious security risk, especially if the machine is exposed to the internet. The two most common paths for existing CentOS 8 users are:

  • CentOS Stream 8 – a rolling-release distribution that sits between Fedora and RHEL. It gets updates continuously, but they are not the same as RHEL updates.
  • Rocky Linux or AlmaLinux 8 – rebuilds of RHEL that aim to be drop-in replacements for CentOS 8. They follow RHEL’s release cycle and are binary-compatible.

Many system administrators choose Rocky or Alma because they want a stable, RHEL-compatible system without the rolling-release nature of CentOS Stream. However, if you specifically want CentOS Stream, the migration is straightforward.

What Is CentOS Stream?

CentOS Stream is a continuously delivered distribution that provides a preview of what will be included in the next minor release of RHEL. It is not a direct rebuild of RHEL; instead, it is a midstream between Fedora (which is more experimental) and RHEL (which is very stable). For developers and testers who want to prepare for upcoming RHEL features, CentOS Stream is a good choice. For production servers that need long-term stability, it may not be ideal because updates can introduce changes more frequently than a traditional point-release system.

How to Migrate from CentOS 8 to CentOS Stream 8

The official Red Hat documentation describes a simple process using dnf. Here are the steps:

  1. Back up your system. This is critical – migration can fail, and you don’t want to lose data.
  2. Update your current CentOS 8 system to the latest packages: sudo dnf update -y
  3. Install the CentOS Stream release package: sudo dnf install centos-stream-release -y
  4. Swap the repositories: sudo dnf swap centos-8-repos centos-stream-repos -y
  5. Clean the cache and update: sudo dnf clean all then sudo dnf update -y
  6. Reboot your system: sudo reboot

After reboot, verify that you are now on CentOS Stream by running cat /etc/centos-release – it should show something like “CentOS Stream release 8”.

Common Problems and How to Avoid Them

Migration is not always smooth. Here are some issues you might encounter:

  • Missing GPG keys – When you install the new release package, you may get an error about missing keys. You can fix it by importing the keys manually: sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial (the exact path may vary).
  • DNF dependency conflicts – Sometimes packages from the old repo conflict with the new ones. If that happens, try sudo dnf distro-sync to align your packages with the new repos.
  • Kernel modules – Third-party kernel modules (like some drivers) may not be compatible with the newer kernel that comes with Stream. Check with your hardware vendor before migrating.

CentOS Stream vs. Rocky Linux / AlmaLinux

If you are weighing options, here is a quick comparison:

  • Release model: CentOS Stream is rolling; Rocky and Alma are point-release.
  • Compatibility with RHEL: Rocky and Alma are binary-compatible with RHEL; CentOS Stream is not guaranteed to be.
  • Update frequency: CentOS Stream receives updates more frequently, sometimes before they are fully tested in RHEL.
  • Support lifecycle: CentOS Stream 8 will be supported until May 2024 (as per the CentOS project). Rocky and Alma offer longer support periods (typically 10 years).

For most production environments, Rocky or Alma is a safer choice. CentOS Stream is better suited for development and testing.

Costs and Licensing

Both CentOS Stream and Rocky/Alma are free to use. There are no licensing fees. However, consider the cost of your time: migrating to a new OS takes effort, and if you choose CentOS Stream, you may need to update more often, which could increase maintenance overhead. Also, if you rely on third-party software that is certified for RHEL, Rocky/Alma will likely work without issues, while CentOS Stream might not be officially supported.

Safety and Backup

Before any migration, always make a full backup. Use tools like rsync to copy important files to an external drive, or take a snapshot if you are on a VM. Test the migration on a non-production machine first. If you are using a control panel like cPanel or Plesk, check with the vendor for their recommended migration path – they may have specific scripts or support for CentOS Stream or Rocky.

Frequently Asked Questions

Can I migrate from CentOS 8 to CentOS Stream 9 directly?

No, you cannot jump directly. You must first migrate to CentOS Stream 8, then upgrade to CentOS Stream 9 using the standard upgrade process (which involves dnf system-upgrade). The same applies if you want to go to Rocky 9 or Alma 9 – you would need to migrate to version 8 first.

Is CentOS Stream stable enough for production?

It depends on your definition of stable. CentOS Stream is not a beta; it is a production-ready distribution, but because it is rolling, updates can introduce changes that might affect your applications. If you need predictable, long-term stability, Rocky or Alma is a better choice.

Will my CentOS 8 configs work on CentOS Stream?

Most configuration files will carry over without changes, especially if you are using standard packages. However, some packages may have different versions, so you should review your configuration after migration. Also, check that any custom repositories you added are compatible with CentOS Stream – some third-party repos (like EPEL) have separate branches for Stream.

What is the difference between CentOS Stream and CentOS Linux?

CentOS Linux was a rebuild of RHEL, while CentOS Stream is a rolling preview of future RHEL releases. CentOS Linux 8 is no longer supported; CentOS Stream 8 is the only CentOS 8 variant still receiving updates.

How long will CentOS Stream 8 be supported?

According to the CentOS project, CentOS Stream 8 will receive updates until May 31, 2024. After that, you will need to migrate to CentOS Stream 9 or another distribution.

Can I migrate back to CentOS Linux if I don’t like Stream?

No, CentOS Linux 8 is discontinued, so you cannot go back. You would have to migrate to Rocky Linux or AlmaLinux instead, which is possible using their migration scripts.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →