Skip to content
Runbook

Install Redis on Fedora / RHEL

Ultra-fast in-memory key-value database, used as a cache, message broker, and session store.

Cachecachein-memorykey-valuenosqlpub-subbroker

Installation

Server — Valkey (DNF) · dnf
sudo dnf install -y valkey

Fedora no longer ships redis: valkey is the compatible replacement. Add valkey-compat-redis to get the redis-cli/redis-server commands back.

Verify the installation

Verify
valkey-cli --version

Service

Start
sudo systemctl start valkey
Stop
sudo systemctl stop valkey
Status
sudo systemctl status valkey
Restart
sudo systemctl restart valkey
On boot
sudo systemctl enable valkey

Important files

TypePathDescription
config/etc/valkey/valkey.confMain server configuration file.
data/var/lib/valkeyPersistence directory (dump.rdb / appendonly.aof).

Default ports

6379

Command-line tools

  • valkey-cliCommand-line client (equivalent of redis-cli).
  • valkey-serverThe Valkey server binary.

Uninstall

Uninstall
sudo systemctl stop valkey
sudo dnf remove -y valkey

Good to know

  • Since Fedora 41, the redis package has been removed from the repositories and obsoleted by Valkey. The systemd unit is called valkey and is not enabled automatically after installation.
  • On RHEL 9 / Rocky / AlmaLinux, the redis package is still available via AppStream. For genuine Redis on Fedora, use the third-party Remi repository or Docker.

Installation on Fedora / RHEL

Since Fedora 41, the redis package has been removed from the official repositories and replaced by Valkey, the open source fork (BSD license) maintained by the Linux Foundation following Redis's license change in March 2024. Valkey is a drop-in replacement: same protocol, same configuration and data format. Install it with sudo dnf install -y valkey.

If your scripts rely on the redis-cli / redis-server names, add the compatibility package valkey-compat-redis, which provides those aliases. On RHEL 9, Rocky, or AlmaLinux, the redis package is still available via the AppStream repositories — check depending on the version. To install genuine Redis on Fedora, use the third-party Remi repository or Docker.

Enabling the service

Like most packages, the service is not started or enabled automatically after installation. Run sudo systemctl enable --now valkey to start it immediately and at boot. The systemd unit is named valkey (not redis). Confirm with valkey-cli ping, which should return PONG.

Configuration and SELinux

The configuration lives in /etc/valkey/valkey.conf and the data in /var/lib/valkey. On systems with SELinux active (the default case on Fedora/RHEL), if you change the data paths or the port, you may need to adjust the SELinux contexts to allow access. As everywhere, only bind the server to a public interface after setting requirepass and configuring the firewall (firewalld).