Ubuntu Linux

How to Install Valkey on Ubuntu 24.04

Richard
Written by
Richard
Feb 23, 2025 Updated Mar 20, 2026 3 min read
How to Install Valkey on Ubuntu 24.04

This article explains how to install Valkey on Ubuntu 24.04.

Valkey is an in-memory key-value store database forked from the Redis code due to changes in the Redis license.

Valkey can run as a standalone daemon or in a cluster and supports a collection of datatypes, including stringsnumbershasheslistssetssorted setsbitmapshyperloglogs, and more.

The steps below walk you through installing Valkey on Ubuntu 24.04.

Install Valkey on Ubuntu

Before installing Valkey, update Ubuntu, then install Valkey. You don’t have to include additional repositories, as Valkey’s packages are included in Ubuntu’s default repositories.

🐧Bash / Shell
sudo apt update
sudo apt install valkey

Once installed, its configuration file is located at /etc/valkey/valkey.conf.

Configure Valkey

To adjust Valkey’s settings, open the default configuration file by running the command below.

🐧Bash / Shell
sudo nano /etc/valkey/valkey.conf

Adjust settings based on your environment.

💻Code
......
......
# listening interface
# localhost only by default
# if you'd like to connect from other Hosts,
# change to the own IP address or set to [0.0.0.0]

bind 127.0.0.1 -::1

# By default, outgoing connections (from replica to master, from Sentinel to
# Accept connections on the specified port, default is 6379.
# listening port

port 6379

# By default the server does not run as a daemon. Use 'yes' if you need it.

daemonize yes

# Set the number of databases. The default database is DB 0, you can select
# dbid is a number between 0 and 'databases'-1

databases 16

Once you’re done adjusting the settings, save and exit the file.

Then, restart Valkey by running the command below.

🐧Bash / Shell
sudo systemctl restart valkey

Operation

Here are some of the basic commands you can use to operate Valkey.

Connect to the local Valkey server.

💻Code
 valkey-cli

Connect to another Valkey server.

💻Code
valkey-cli -h node01.example.com

Show connected clients.

💻Code
client list

Show stats and requests.

💻Code
info
monitor

Exit from console

💻Code
quit

That should do it!

Conclusion:

In summary, installing and configuring Valkey on Ubuntu 24.04 is straightforward. Following the abovementioned steps, you can quickly start with the in-memory key-value store. Here are the key takeaways:

  • Ease of Installation: Valkey is readily available in Ubuntu’s default repositories, simplifying the installation process.
  • Configuration Flexibility: The configuration file allows customization to fit various environments and use cases.
  • Basic Commands: Familiarizing yourself with basic commands ensures Valkey’s efficient operation.
  • Daemon Support: Valkey can run as a daemon or in a cluster, offering versatility for different deployment scenarios.
  • Data Management: Supports a wide range of data types, making it suitable for diverse applications.

With these points in mind, Valkey is a powerful option for anyone needing an efficient key-value store.

Frequently Asked Questions

How do I install Valkey on Ubuntu 24.04?

To install Valkey on Ubuntu 24.04, first update your system using 'sudo apt update', then run 'sudo apt install valkey'. Valkey is included in the default repositories, so no additional repositories are needed.

Where can I find the Valkey configuration file?

The Valkey configuration file is located at '/etc/valkey/valkey.conf'. You can edit this file to adjust settings according to your environment.

What are some basic commands to use with Valkey?

Some basic commands include 'valkey-cli' to connect to the local server, 'client list' to show connected clients, and 'info' to display stats and requests. Familiarizing yourself with these commands will help you operate Valkey efficiently.

Can Valkey run as a daemon?

Yes, Valkey can run as a daemon or in a cluster. You can enable daemon mode by setting 'daemonize yes' in the configuration file.

What data types does Valkey support?

Valkey supports a variety of data types, including strings, numbers, hashes, lists, sets, sorted sets, bitmaps, and hyperloglogs. This versatility makes it suitable for a wide range of applications.

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2469 articles → Twitter

📚 Related Tutorials

Change Ubuntu Display Resolution: A Step-by-Step Guide
Ubuntu Linux Change Ubuntu Display Resolution: A Step-by-Step Guide
How to Install Redmine with Apache on Ubuntu 24.04
CMS How to Install Redmine with Apache on Ubuntu 24.04
How to Restart Ubuntu Linux: A Complete Guide
Ubuntu Linux How to Restart Ubuntu Linux: A Complete Guide
How to Install Apache on Ubuntu Linux
Ubuntu Linux How to Install Apache on Ubuntu Linux

Leave a Reply

Your email address will not be published. Required fields are marked *