{"id":168397,"date":"2026-06-04T01:23:14","date_gmt":"2026-06-03T22:23:14","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=168397"},"modified":"2026-06-04T01:41:09","modified_gmt":"2026-06-03T22:41:09","slug":"install-valkey-debian","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/install-valkey-debian\/","title":{"rendered":"Install Valkey on Debian 13 \/ 12"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A working Valkey on Debian 13 takes about two minutes. Valkey is the community fork of Redis and a drop-in replacement for it, so the commands, the wire protocol, and the data files are the same. There are three ways to install it on Debian, and which one you pick comes down to the version you want. Here is each, straight to it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Built and run on Debian 13 (trixie) in June 2026.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install from apt<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Debian ships Valkey in its own repositories. Install the server and the <code>valkey-cli<\/code> client:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>sudo apt update\nsudo apt install -y valkey-server valkey-tools<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The service starts and enables itself. Check the version and that it answers:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>valkey-server --version\nsystemctl is-active valkey-server\nvalkey-cli ping<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That returns a <code>PONG<\/code>. On Debian 13 the package comes from the main repository (the 8.1 line); the service is <code>valkey-server<\/code> and the config file is <code>\/etc\/valkey\/valkey.conf<\/code>. On Debian 12, Valkey is only in <code>bookworm-backports<\/code>, so enable backports there or use the Docker or source method below, both of which work on any Debian release. A quick write confirms it is live:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"300\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-running-debian-13.png\" alt=\"Valkey service active and serving keys on Debian 13 trixie\" class=\"wp-image-168393\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-running-debian-13.png 920w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-running-debian-13-300x98.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-running-debian-13-768x250.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That is the whole install if the apt version is current enough for you. If you need the newest release, use one of the next two.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Run the latest with Docker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The official image gives you the newest release in one command. Install Docker and run it:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>sudo apt install -y docker.io\nsudo docker run -d --name valkey -p 6379:6379 valkey\/valkey:9.1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the version inside the container:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>sudo docker exec valkey valkey-server --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That reports the current 9.x release. The screenshot shows the version from each method side by side, so the gap between the apt package and the container is clear:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"330\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-install-methods-versions-debian-13.png\" alt=\"apt, Docker and source-built Valkey versions on Debian 13 trixie\" class=\"wp-image-168392\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-install-methods-versions-debian-13.png 920w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-install-methods-versions-debian-13-300x108.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/wm-valkey-install-methods-versions-debian-13-768x275.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Build from source<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For the newest release as a native service with TLS, build it. Install the toolchain:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>sudo apt install -y build-essential pkg-config libssl-dev libsystemd-dev curl<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Detect the latest release, download, and compile with TLS and systemd support:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>VER=$(curl -fsSL https:\/\/api.github.com\/repos\/valkey-io\/valkey\/releases\/latest | grep -oP '\"tag_name\":\\s*\"\\K[^\"]+')\ncd \/usr\/local\/src\nsudo curl -fsSL \"https:\/\/github.com\/valkey-io\/valkey\/archive\/refs\/tags\/${VER}.tar.gz\" -o \"valkey-${VER}.tar.gz\"\nsudo tar xzf \"valkey-${VER}.tar.gz\"\ncd \"valkey-${VER}\"\nsudo make BUILD_TLS=yes USE_SYSTEMD=yes -j\"$(nproc)\"\nsudo make install<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Keep <code>libsystemd-dev<\/code> in that list. Without it a <code>Type=notify<\/code> service starts the server but times out waiting for a ready signal it never sends. The systemd unit, user, and config are the same as in the <a href=\"https:\/\/computingforgeeks.com\/install-valkey-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Valkey on Ubuntu<\/a> guide, which uses the identical build on the Debian-family base.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You are live. Before you put traffic on it, set <code>bind 127.0.0.1<\/code>, keep <code>protected-mode yes<\/code>, and add a password if anything off the box will connect. From there, the <a href=\"https:\/\/computingforgeeks.com\/install-valkey-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Valkey integration guide<\/a> shows it working as a real cache with measured latency, a rate limiter, database-level ACLs, and a live Redis migration. On Rocky or AlmaLinux instead, the <a href=\"https:\/\/computingforgeeks.com\/install-valkey-rocky-almalinux\/\" target=\"_blank\" rel=\"noreferrer noopener\">RHEL-family install<\/a> covers the dnf and SELinux specifics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">valkey-cli quick reference<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The commands you will reach for most, all against the running server:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Command<\/th><th>What it does<\/th><\/tr><\/thead><tbody>\n<tr><td><code>valkey-cli ping<\/code><\/td><td>Check the server answers<\/td><\/tr>\n<tr><td><code>valkey-cli set key value<\/code><\/td><td>Store a string<\/td><\/tr>\n<tr><td><code>valkey-cli get key<\/code><\/td><td>Read it back<\/td><\/tr>\n<tr><td><code>valkey-cli set key value ex 60<\/code><\/td><td>Store with a 60-second TTL<\/td><\/tr>\n<tr><td><code>valkey-cli ttl key<\/code><\/td><td>Seconds left before expiry<\/td><\/tr>\n<tr><td><code>valkey-cli incr counter<\/code><\/td><td>Atomic increment<\/td><\/tr>\n<tr><td><code>valkey-cli info memory<\/code><\/td><td>Memory usage and the maxmemory ceiling<\/td><\/tr>\n<tr><td><code>valkey-cli dbsize<\/code><\/td><td>Number of keys<\/td><\/tr>\n<tr><td><code>valkey-cli monitor<\/code><\/td><td>Watch every command live<\/td><\/tr>\n<tr><td><code>valkey-cli flushall<\/code><\/td><td>Wipe everything (careful)<\/td><\/tr>\n<\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That covers day-to-day use. For configuration and clustering, the full command set is in the built-in help: <code>valkey-cli --help<\/code> and <code>valkey-cli help<\/code> inside the prompt.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>A working Valkey on Debian 13 takes about two minutes. Valkey is the community fork of Redis and a drop-in replacement for it, so the commands, the wire protocol, and the data files are the same. There are three ways to install it on Debian, and which one you pick comes down to the version &#8230; <a title=\"Install Valkey on Debian 13 \/ 12\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/install-valkey-debian\/\" aria-label=\"Read more about Install Valkey on Debian 13 \/ 12\">Read more<\/a><\/p>\n","protected":false},"author":27,"featured_media":168398,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[461,26,299,50],"tags":[324,592],"cfg_series":[39878],"class_list":["post-168397","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-debian","category-how-to","category-linux-tutorials","tag-databases","tag-redis","cfg_series-valkey-on-linux"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/168397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=168397"}],"version-history":[{"count":2,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/168397\/revisions"}],"predecessor-version":[{"id":168401,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/168397\/revisions\/168401"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/168398"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=168397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=168397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=168397"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=168397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}