OpenShift is powerful but traditionally painful to install. CRC (CodeReady Containers) simplifies this by providing a “single‑node OpenShift cluster in a box” that runs locally on Windows, macOS, or Linux. Perfect for developers and testers who want a quick OpenShift environment without complex setup.
🖥️ Environment Used in This Guide
OS: Rocky Linux 9.4
OpenShift version: 4.18.2
Extra disk: 500 GB (for CRC volume group)
User:lixiaohui (non‑root with sudo)
Hardware: 8 cores, 16 GB RAM
Virtualization: Enabled
🔑 Pre‑installation Notes
CRC must run as a non‑root user with sudo privileges.
Always log in via SSH, not su, to avoid systemd bus errors.
Hardware minimums:
4 CPU cores
10.5 GB free RAM
35 GB free disk space
Prepare an LVM volume group named crc on a spare disk.
⚙️ OS Requirements
Windows: Windows 10/11 Pro or Enterprise (Home not supported).
macOS: macOS 13 Ventura or newer.
Linux:
RHEL (latest two minor versions, registered with Red Hat).
CRC installation must be performed with a non‑root account that has sudo privileges. Let’s create a lixiaohui user and assign it to the wheel group for sudo access:
1
useradd -G wheel lixiaohui
Then set the password:
1 2 3 4 5 6
[root@lxh-host1 ~]# passwd lixiaohui Changing password for user lixiaohui. New password: BAD PASSWORD: The password is a palindrome Retype new password: passwd: all authentication tokens updated successfully.
⚠️ Important: You must log in via SSH with this user. Do not use su to switch users, otherwise you may encounter the following error:
1
Executing systemctl action failed: exit status 1: Failed to connect to bus: No medium found
🖥️Hardware Requirements
If your resources are insufficient, CRC simply won’t run. To use CRC for running the OpenShift Container Platform, prepare the following:
CPU: At least 4 physical CPU cores. Don’t worry—most modern machines can easily meet this requirement.
Memory: At least 10.5 GB of free RAM. If your system doesn’t have enough, you may need to close other memory‑hungry applications.
Disk Space: At least 35 GB of free storage. Especially note: in the home directory of the non‑root user used for installation, CRC will create a .crc folder to cache the VM image. This folder consumes significant space, mainly for OpenShift images and cluster data. Make sure you allocate enough storage.
Extra Disk: Before installation, prepare an LVM volume group named crc. Assign sufficient space to it.
If the crc volume group does not exist, you will see an error like this:
1
Error creating machine: error with pre-create check: Use 'crc setup' to define the machine driver storage pool, Use 'crc setup' to define the storage pool, viMessage='Failed to connect socket to '/var/run/libvirt/virtstoraged-sock': No such file or directory'
Notes
Resource Allocation: The above are minimum requirements. If your workloads are more complex (e.g., deploying large applications or running multiple services simultaneously), you may need more CPU and memory.
Don’t Starve Your Host: CRC automatically allocates resources to the OpenShift cluster, but remember to leave some for your host system. If you allocate everything to CRC, your computer may become sluggish.
Adjust Anytime: If you find resources insufficient during runtime, don’t panic. CRC supports dynamic resource adjustment. For example, you can increase memory allocation with:
1 2 3 4 5 6 7 8 9 10 11 12
crc config set memory 16384 ``` (This sets memory to 16 GB.)
---
# 📥 Download CRC
- Download from: [Red Hat Console](https://console.redhat.com/openshift/create/local) - Linux direct link: ```bash wget https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz
Also download your pull‑secret.json file.
Extract and install:
1 2 3 4
[root@lxh-host1 ~]# tar xvf crc-linux-amd64.tar.xz crc-linux-2.49.0-amd64/ crc-linux-2.49.0-amd64/LICENSE crc-linux-2.49.0-amd64/crc
To make the crc program from the extracted archive available system‑wide, place it in a directory that is already included in the PATH environment variable (such as /usr/local/bin or /usr/bin). This way, you don’t need to type the full path every time.
Once again, please make sure to log in with the prepared non‑root user via SSH.
1
[root@lxh-host1 ~]# ssh lixiaohui@localhost
The crc setup command installs and checks all dependencies required for starting the cluster. If it fails, you can run it with debug mode to output more detailed logs:
[lixiaohui@lxh-host1 ~]$ crc setup INFO Using bundle path /home/lixiaohui/.crc/cache/crc_libvirt_4.18.2_amd64.crcbundle INFO Checking if running as non-root INFO Checking if running inside WSL2 INFO Checking if crc-admin-helper executable is cached INFO Caching crc-admin-helper executable INFO Using root access: Changing ownership of /home/lixiaohui/.crc/bin/crc-admin-helper-linux-amd64
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.
[sudo] password for lixiaohui: INFO Using root access: Setting suid for /home/lixiaohui/.crc/bin/crc-admin-helper-linux-amd64 INFO Checking if running on a supported CPU architecture INFO Checking if crc executable symlink exists INFO Creating symlink for crc executable INFO Checking minimum RAM requirements INFO Check if Podman binary exists in: /home/lixiaohui/.crc/bin/oc INFO Checking if Virtualization is enabled INFO Checking if KVM is enabled INFO Checking if libvirt is installed INFO Installing libvirt service and dependencies INFO Using root access: Installing virtualization packages INFO Checking if user is part of libvirt group INFO Adding user to libvirt group INFO Using root access: Adding user to the libvirt group INFO Checking if active user/process is currently part of the libvirt group INFO Checking if libvirt daemon is running INFO Checking if a supported libvirt version is installed INFO Checking if crc-driver-libvirt is installed INFO Installing crc-driver-libvirt INFO Checking crc daemon systemd service INFO Setting up crc daemon systemd service INFO Checking crc daemon systemd socket units INFO Setting up crc daemon systemd socket units INFO Checking if vsock is correctly configured INFO Setting up vsock support INFO Using root access: Setting CAP_NET_BIND_SERVICE capability for /usr/bin/crc executable INFO Using root access: Creating udev rule for /dev/vsock INFO Using root access: Changing permissions for /etc/udev/rules.d/99-crc-vsock.rules to 644 INFO Using root access: Reloading udev rules database INFO Using root access: Loading vhost_vsock kernel module INFO Using root access: Creating file /etc/modules-load.d/vhost_vsock.conf INFO Using root access: Changing permissions for /etc/modules-load.d/vhost_vsock.conf to 644 INFO Checking if CRC bundle is extracted in '$HOME/.crc' INFO Checking if /home/lixiaohui/.crc/cache/crc_libvirt_4.18.2_amd64.crcbundle exists INFO Getting bundle for the CRC executable INFO Downloading bundle: /home/lixiaohui/.crc/cache/crc_libvirt_4.18.2_amd64.crcbundle... 5.74 GiB / 5.74 GiB [---------------------------------------------------------------------------------------------------------------] 100.00% 45.52 MiB/s INFO Uncompressing /home/lixiaohui/.crc/cache/crc_libvirt_4.18.2_amd64.crcbundle crc.qcow2: 20.25 GiB / 20.25 GiB [-------------------------------------------------------------------------------------------------------------] 100.00% oc: 176.52 MiB / 176.52 MiB [------------------------------------------------------------------------------------------------------------------] 100.00% Your system is correctly setup for using CRC. Use 'crc start' to start the instance [lixiaohui@lxh-host1 ~]$
[lixiaohui@lxh-host1 ~]$ crc start --pull-secret-file /pull-secret.txt INFO Using bundle path /home/lixiaohui/.crc/cache/crc_libvirt_4.18.2_amd64.crcbundle INFO Checking if running as non-root INFO Checking if running inside WSL2 INFO Checking if crc-admin-helper executable is cached INFO Checking if running on a supported CPU architecture INFO Checking if crc executable symlink exists INFO Checking minimum RAM requirements INFO Check if Podman binary exists in: /home/lixiaohui/.crc/bin/oc INFO Checking if Virtualization is enabled INFO Checking if KVM is enabled INFO Checking if libvirt is installed INFO Checking if user is part of libvirt group INFO Checking if active user/process is currently part of the libvirt group INFO Checking if libvirt daemon is running INFO Checking if a supported libvirt version is installed INFO Checking if crc-driver-libvirt is installed INFO Checking crc daemon systemd socket units INFO Checking if vsock is correctly configured INFO Loading bundle: crc_libvirt_4.18.2_amd64... INFO Creating CRC VM for OpenShift 4.18.2... INFO Generating new SSH key pair... INFO Generating new password for the kubeadmin user INFO Starting CRC VM for openshift 4.18.2... INFO CRC instance is running with IP 127.0.0.1 INFO CRC VM is running INFO Updating authorized keys... INFO Configuring shared directories INFO Check internal and public DNS query... INFO Check DNS query from host... INFO Verifying validity of the kubelet certificates... INFO Starting kubelet service INFO Waiting for kube-apiserver availability... [takes around 2min] INFO Adding user's pull secret to the cluster... INFO Updating SSH key to machine config resource... INFO Waiting until the user's pull secret is written to the instance disk... INFO Changing the password for the kubeadmin user INFO Updating cluster ID... INFO Updating root CA cert to admin-kubeconfig-client-ca configmap... INFO Starting openshift instance... [waiting for the cluster to stabilize] INFO 2 operators are progressing: authentication, console INFO 2 operators are progressing: authentication, console INFO Operator authentication is progressing INFO All operators are available. Ensuring stability... INFO Operators are stable (2/3)... INFO Operators are stable (3/3)... INFO Adding crc-admin and crc-developer contexts to kubeconfig... Started the OpenShift cluster.
The server is accessible via web console at: https://console-openshift-console.apps-crc.testing
Log in as administrator: Username: kubeadmin Password: g38ZF-DP5Qn-aGdVt-obeEa
Log in as user: Username: developer Password: developer
Use the 'oc' command line interface: $ eval $(crc oc-env) $ oc login -u developer https://api.crc.testing:6443
At the end you’ll see:
Web console:https://console-openshift-console.apps-crc.testing
Admin login:
Username: kubeadmin
Password: (auto‑generated, shown in output)
Developer login:
Username: developer
Password: developer
🌐 Access from Another Machine
Add CRC hostnames to your local /etc/hosts (Linux/macOS) or C:\Windows\System32\drivers\etc\hosts (Windows). Example: