This is a draft document that was built and uploaded automatically. It may document beta software and be incomplete or even incorrect. Use this document at your own risk.

Jump to content
Introduction to Valkey
SUSE Linux Enterprise Server 16.0

Introduction to Valkey

Publication Date: 24 Oct 2025
WHAT?

Valkey is an open source in-memory data structure store that excels as a database, cache, message broker and streaming engine. Valkey provides a high-performance, scalable and versatile in-memory data store, crucial for accelerating applications and efficiently managing diverse data needs with enhanced multi-threading and reliability.

WHY?

Learn about how to install and configure Valkey.

EFFORT

40 minutes of reading time.

GOAL

Setting up Valkey on SUSE Linux Enterprise Server for SAP applications or migrating from Redis to Valkey.

1 About Valkey

Valkey is a fork of Redis version 7.2.4. It is an open source, in-memory data structure store, licensed under the BSD (Berkeley Software Distribution) license, that serves as a versatile platform for various applications. It excels as a database, providing fast and flexible data storage; as a cache, significantly improving application performance; as a message broker, enabling asynchronous communication; and even as a streaming engine for real-time data processing. Valkey builds upon the foundation of Redis OSS, incorporating multi-threading for enhanced performance and offering a robust solution for applications demanding speed, scalability, and diverse data handling capabilities.

Valkey has many benefits, which include the following:

  • Delivers fast, low-latency access to data stored in memory, ideal for caching, real-time analytics, and message brokering.

  • Supports powerful and versatile data structures like strings, hashes, lists, sets, sorted sets, streams, and geo-spatial indexes.

  • Offers RDB (Redis Database Backup) snapshot and AOF (append-only file) persistence for recovering data after restarts.

  • Enables horizontal scaling by partitioning data across multiple nodes.

  • Maintains compatibility with Redis 7.2, making it easy to migrate without changing existing client libraries or application logic.

  • Provides built-in publish/subscribe capabilities for building event-driven or messaging-based systems.

For more information on Valkey, refer to https://valkey.io/docs/.

2 Managing Valkey

Learn how to install Valkey, use the command-line tool and migrate from Redis to Valkey.

2.1 Setting up a Valkey service file

Valkey is an open-source and in-memory data store that functions as a database, cache, message broker and streaming engine.

Procedure 1: Creating a Valkey systemd service file
  1. Install Valkey:

    > sudo  zypper -n in valkey
  2. Create a Valkey systemd service file:

    > sudo  vi /etc/systemd/system/valkey.service
  3. Add the following to the file:

    [Unit]
            Description=Valkey In-Memory Data Store
            After=network.target
    
            [Service]
            User=valkey
            Group=valkey
            ExecStart=/usr/sbin/redis-server /etc/redis/valkey.conf
            LimitNOFILE=10240
            ExecStop=/usr/bin/valkey-cli shutdown
            Restart=always
    
            [Install]
            WantedBy=multi-user.target
  4. Copy the sample file to the specified config file:

    > sudo  cp /etc/valkey/default.conf.example /etc/valkey/valkey.conf
  5. Update file permissions:

    > sudo  chown valkey:valkey /etc/valkey/valkey.conf
  6. Start and enable the Valkey service:

    > sudo  systemctl start valkey
    > sudo  systemctl enable valkey
  7. Verify the Valkey setup:

    valkey-cli ping

    Valkey is running on your system when you get the command print PONG.

2.2 The Valkey command-line interface

The Valkey command-line interface is used for managing, debugging and testing Valkey. By default, the valkey-cli command connects to the server at the address 127.0.0.1 with port 6379.

Some of the valkey-cli command options include:

-h

Server host name with default ip of 127.0.0.1.

-p

Server port with a default vale of 6379.

-t

Server connection timeout in seconds (decimals allowed). Default timeout is 0, which means no limit and depends on the operating system.

-s

Server socket overrides the host name and port.

-a

Password to use when connecting to the server. You can also use the VALKEYCLI_AUTH environment variable to pass this password more safely. This argument takes precedence when both options are used.

--user

User name that is used to send ACL (Access Control List) style, which is AUTH username pass. Needs the -a option.

--pass

Password that is an alias of the -a option to align with the new --user option.

--askpass

Forces password input via STDIN with masking. If this argument is used, then -a and the VALKEYCLI_AUTH environment variable are ignored.

-u

Server URI in format valkey://user:password@host:port/dbnum. User, password and dbnum are optional. For authentication without a user name, use user name default. For TLS, use the scheme valkeys.

--help

Output help and exit.

--version

Output version and exit.

--cluster help

List all available cluster manager commands.

Example 1: Basic valkey-cli command examples include:
  • SET: Sets a key-value pair.

    >  valkey-cli SET KEY_NAME "Hello Valkey"

    For example:

    >  valkey-cli SET TESTKEY "Hello Valkey"
  • GET: Retrieves the value associated with a key.

    >  valkey-cli GET TESTKEY
      "Hello Valkey"
  • DEL: Deletes a key.

    >  valkey-cli DEL TESTKEY
      (integer) 1

    1 if deleted and 0 if not found.

  • INFO: Displays information and statistics about the Valkey server.

    >  valkey-cli INFO
      Server
      redis_version:7.2.4
      server_name:valkey
      valkey_version:8.0.2
      redis_git_sha1:00000000
      redis_git_dirty:0
      redis_build_id:e0cc1d08b1f9571a
      server_mode:standalone
      os:Linux 6.12.0-160000.9-default x86_64
      arch_bits:64
      monotonic_clock:POSIX clock_gettime
      multiplexing_api:epoll
      gcc_version:13.3.1
      process_id:974
      process_supervised:no
      run_id:32864c141804bcb17cae98145beee86ca251afd7
      tcp_port:6379
      server_time_usec:1750760734442451
      uptime_in_seconds:2780
      uptime_in_days:0
      hz:10
      configured_hz:10
      lru_clock:5930270
      executable:/usr/sbin/redis-server
      config_file:/etc/valkey/valkey.conf
      io_threads_active:0
      availability_zone:
    
    [...]
  • MONITOR: Streams all commands processed by the Valkey server in real time.

    >  valkey-cli MONITOR
    OK
  • KEYS: Finds all keys matching a pattern.

    >  valkey-cli KEYS "*" # All keys
    "TESTKEY"
    "TESTKEY1"

2.3 Migrating from Redis to Valkey

Valkey is designed to be a seamless replacement, maintaining compatibility with the Redis API, protocol, persistence data, ports and configuration files. The transition from Redis to Valkey is easy for many basic setups. The following procedure assumes Redis is installed, running and loaded with data.

Procedure 2: How to migrate from Redis to Valkey
  1. Check the current Redis server version:

    >  redis-cli info server
            # Server
            redis_version:7.2.4
            redis_git_sha1:00000000
            redis_git_dirty:0
            redis_build_id:8c22b097984bd350
            redis_mode:standalone
            [...]
  2. Install valkey-compat-redis package with the --force-resolution option:

    > sudo  # zypper in --force-resolution valkey-compat-redis
            Refreshing service 'NVIDIA'.
            Refreshing service 'openSUSE'.
            Loading repository data...
            Reading installed packages...
            Resolving package dependencies...
    
            The following 2 NEW packages are going to be installed:
              valkey valkey-compat-redis
    
            The following package is going to be REMOVED:
              redis
    
            2 new packages to install, 1 to remove.
    
            Package download size:     1.3 MiB
    
            Package install size change:
                          |       5.2 MiB  required by packages that will be installed
              -245.2 KiB  |  -    5.4 MiB  released by packages that will be removed
    
            Backend:  classic_rpmtrans
            Continue? [y/n/p/...? shows all options] (y):

    The package takes your existing configuration files and persistence data and moves them to Valkey with no additional steps required. This migration is possible because Valkey is fully compatible with the Redis API, protocol, persistence data, ports and configuration files.

  3. Start and enable Valkey:

    > sudo  systemctl start valkey
    > sudo  systemctl enable valkey
  4. Check the server information:

    >  redis-cli info server
                # Server
                redis_version:7.2.4
                server_name:valkey
                valkey_version:7.2.5
                redis_git_sha1:00000000
                redis_git_dirty:0
                redis_build_id:b0d9f188ef999bd3
                redis_mode:standalone
                [...]

    Valkey is responsive to both redis_version:7.2.4 and valkey_version:7.2.5. Retaining the redis_version ensures maximum compatibility while still identifying the server with valkey_version. Valkey has a binary named valkey-cli but symbolically links redis-cli. Both CLIs have the same functionality.