
In this blog post, we will show you how to install and configure Valkey on AlmaLinux 10 OS. Valkey is an open-source, high-performance, in-memory data store used for caching, session management, message queues, and real-time applications. It is a community-driven fork of Redis, created after Redis changed its licensing terms. On AlmaLinux 10, Valkey can serve as a caching backend for web applications such as Laravel, WordPress, and other PHP-based systems. Because it stores data primarily in RAM, it provides very fast read and write operations, reducing database load and improving application response times.
Valkey supports data structures such as strings, lists, sets, hashes, and sorted sets. It also offers persistence, replication, and high-availability capabilities. For system administrators, Valkey is a useful alternative to Redis for deploying modern applications on AlmaLinux 10 servers.
Learning to install and configure Valkey on AlmaLinux 10 is a straightforward process that may take up to 15 minutes. Let’s get things done!
Table of Contents
Prerequisites
- A server running AlmaLinux 10 OS
- User privileges: root or a non-root user with sudo privileges
Step 1. Update the System
Before installing Valkey, update the system packages to their latest versions. To do that, execute the following command:
dnf update -y && dnf upgrade -y
Step 2. Install Valkey
Valkey is available in the default AlmaLinux 10 AppStream repository. The official AlmaLinux package listings confirm that Valkey packages are published for AlmaLinux 10. We do not need to install EPEL or add a third-party repository. To install Valkey, execute the following command:
dnf install valkey -y
Once installed, start and enable the Valkey service:
systemctl start valkey && systemctl enable valkey
To check the status of the service:
systemctl status valkey
You should get output similar to this:
[root@test ~]# systemctl status valkey
● valkey.service - Valkey persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/valkey.service; enabled; preset: disabled)
Active: active (running) since Wed 2026-10-14 23:27:00 CEST; 10s ago
Invocation: 4edf5b532a2340c18058d6121e817816
Main PID: 71511 (valkey-server)
Status: "Ready to accept connections"
Tasks: 5 (limit: 10643)
Memory: 7.9M (peak: 8.1M)
CPU: 86ms
CGroup: /system.slice/valkey.service
└─71511 "/usr/bin/valkey-server 127.0.0.1:6379"
Oct 14 23:27:00 test.vps systemd[1]: Starting valkey.service - Valkey persistent key-value database...
Oct 14 23:27:00 test.vps systemd[1]: Started valkey.service - Valkey persistent key-value database.
As you can see, the Valkey service is running on port 6379. To check this, you can use the command below:
netstat -tunlp | grep 6379
You should get the following output:
[root@test ~]# netstat -tunlp | grep 6379 tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 71511/valkey-server tcp6 0 0 ::1:6379 :::* LISTEN 71511/valkey-server
Step 3. Configure Valkey
Configuring Valkey means adjusting its settings to control how it operates on your AlmaLinux 10 server. This includes setting a password, defining which network interfaces it listens on, specifying the port, limiting memory usage, and configuring data persistence. Proper configuration ensures Valkey runs securely and efficiently, meeting your application’s requirements.
The main Valkey configuration file is located at /etc/valkey/valkey.conf. Before making any changes to this configuration file, it is recommended to make a backup of it.
cp /etc/valkey/valkey.conf /etc/valkey/valkey.conf.bak
First, we will generate a random strong password:
openssl rand -hex 32
Now we can proceed with the configuration. Open /etc/valkey/valkey.conf with your favorite editor and make the following changes:
bind 127.0.0.1 # accepts local connections only.
port 6379 # sets the default Valkey port. (In case it does not listen on the default port)
protected-mode yes # enables an additional protection mechanism.
requirepass "YOUR_GENERATED_PASSWORD" # The password we generated before we opened the Valkey configuration
maxmemory 256mb # sets a memory limit for the Valkey dataset.
maxmemory-policy allkeys-lru #allows Valkey to remove less recently used keys when the limit is reached.
Save your changes and restart the service:
systemctl restart valkey
Now, to test the authentication, we need to execute the following command:
valkey-cli ping
If the authentication is enabled correctly, you should see the following message:
[root@test ~]# valkey-cli ping (error) NOAUTH Authentication required.
Now, we need to test the authentication again to see if the following command will ask for a password:
valkey-cli --askpass ping
If everything is OK, the prompt will ask for the password:
[root@test ~]# valkey-cli --askpass ping Please input password:
Enter the password that you generated before editing the Valkey configuration file. The output should look like this:
[root@test ~]# valkey-cli --askpass ping Please input password: **************************************************************** PONG
Conclusion
Valkey is a powerful, open-source, in-memory data store that provides fast and reliable data access for modern applications running on AlmaLinux 10. Its support for caching, session management, and various data structures makes it a valuable solution for improving application performance and reducing database workload. Installing and configuring Valkey involves enabling the service, securing access with authentication, setting appropriate network bindings, and managing memory usage according to the server’s resources. With proper configuration, Valkey can help improve response times and optimize resource utilization for web applications such as Laravel and WordPress. Its compatibility with Redis protocols also makes it a practical alternative for many existing workloads. Overall, Valkey is an excellent choice for administrators seeking a secure, efficient, and flexible caching solution.
That’s it. You successfully installed and configured Valkey on AlmaLinux 10 OS.
Of course, you don’t have to install Valkey on AlmaLinux 10 if you’re having trouble and aren’t familiar with Linux. You can always contact our technical support. Just sign up for one of our monthly management plans and submit a support ticket. We are available 24/7 and will handle your request right away.
If you liked this post about installing and configuring Valkey on AlmaLinux 10, please share it with your friends or leave a comment below.
