Skip to content
Search Fedora

    Browse this documentation

    Running Valkey 9.1 on Fedora: install, start, connect, and how it relates to Redis

    On Fedora, the Redis-style service you install is Valkey.

    Terminal window
    dnf list --available redis

    There is no redis package. What the repositories offer is:

    Terminal window
    dnf list --available valkey
    valkey.x86_64 9.1.2-1.fc45 fedora

    Valkey is the community fork that took over after Redis 7.2 (under the Linux Foundation), and Fedora made it the default in-memory database.

    redis replaced by valkey 9.1.2, bound to loopback by default

    Terminal window
    sudo dnf install valkey

    Small package: 1.9 MiB download, 6.6 MiB installed.

    Two service units arrive, and neither starts by default:

    Terminal window
    systemctl list-unit-files | grep -i valkey
    valkey-sentinel.service disabled disabled
    valkey.service disabled disabled

    valkey.service is the single-node server; valkey-sentinel.service is the high-availability sentinel. Start the main one:

    Terminal window
    sudo systemctl enable --now valkey
    systemctl is-active valkey
    valkey-cli ping
    active
    PONG

    PONG means it is alive.

    Terminal window
    valkey-server --version
    Valkey server v=9.1.2 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=fa6c1330cfae654d

    Worth reading:

    • jemalloc-5.3.0 — Valkey uses jemalloc instead of glibc malloc, one reason its memory fragmentation behaviour is good
    • bits=64 — a 64-bit build
    • sha=00000000:0 — build metadata stripped by packaging, not an error
    Terminal window
    ss -lntp | grep 6379
    LISTEN 0 511 127.0.0.1:6379 0.0.0.0:*
    LISTEN 0 511 [::1]:6379 [::]:*

    Or ask the server itself:

    Terminal window
    valkey-cli config get bind
    bind
    127.0.0.1 -::1

    127.0.0.1 plus the IPv6 loopback — unreachable from outside. That is Fedora’s default policy: a database should not be exposed by accident.

    To serve other hosts, edit /etc/valkey/valkey.conf:

    bind 0.0.0.0 -::
    protected-mode yes

    Then sudo systemctl restart valkey.

    Terminal window
    valkey-cli set demo "hello fedora"
    valkey-cli get demo
    OK
    hello fedora

    Inspect the keyspace:

    Terminal window
    valkey-cli info keyspace
    # Keyspace
    db0:keys=1,expires=0,avg_ttl=0,keys_with_volatile_items=0

    db0:keys=1 is one key; expires=0 means no TTL set.

    Terminal window
    rpm -ql valkey | grep '\.conf$'
    /etc/valkey/sentinel.conf
    /etc/valkey/valkey.conf
    /usr/lib/sysusers.d/valkey.conf

    The main file is /etc/valkey/valkey.conf — not the Redis-era /etc/redis/redis.conf.

    There is no redis package, but there is a compatibility one:

    Terminal window
    dnf list --available 'valkey-compat*'
    valkey-compat-redis.noarch 9.1.2-1.fc45 fedora

    Install it and scripts calling redis-cli / redis-server keep working, executing Valkey underneath.

    Legacy commandActually runs
    redis-clivalkey-cli
    redis-servervalkey-server
    redis-sentinelvalkey-sentinel
    ItemNote
    config path/etc/redis/redis.conf → /etc/valkey/valkey.conf
    service nameredis.service → valkey.service
    data directorycheck dir, do not point the new service at an empty path
    persistence filesRDB/AOF formats compatible; dump.rdb can be moved over
    authno password by default — add requirepass after migrating
    clientsprotocol compatible, no library changes
    SymptomCause
    valkey-cli cannot connectservice not started; systemctl start valkey
    remote 6379 times outdefault bind is 127.0.0.1; change bind
    no redis-cli even with valkey installedinstall valkey-compat-redis
    data gone after restartpersistence off; check save and appendonly
    memory climbs until the box diesno maxmemory set; Valkey does not throttle itself