
Open source in-memory data store used as database, cache, and broker.
This document serves as both a quick start guide to Redis and a detailed resource for building it from source.
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
Redis excels in various applications, including:
Redis is a popular choice for developers worldwide due to its combination of speed, flexibility, and rich feature set. Here's why people choose Redis for:
In summary, Redis provides a powerful, fast, and flexible toolkit for solving a wide variety of data management challenges. If you want to know more, here is a list of starting points:
Redis Community Edition (Redis CE) was renamed Redis Open Source with the v8.0 release.
Redis Ltd. also offers Redis Software, a self-managed software with additional compliance, reliability, and resiliency for enterprise scaling, and Redis Cloud, a fully managed service integrated with Google Cloud, Azure, and AWS for production-ready apps.
Read more about the differences between Redis Open Source and Redis here.
If you want to get up and running with Redis quickly without needing to build from source, use one of the following methods:
docker run -d -p 6379:6379 redis:latest
If you prefer to build Redis from source - see instructions below.
To get started as quickly as possible in your language of choice, use one of the following starter projects:
To connect your application to Redis, you will need a client library. Redis has documented client libraries in most popular languages, with community-supported client libraries in additional languages.
redis-cli is Redis' command line interface. It is available as part of all the binary distributions and when you build Redis from source.
You can start a redis-server instance, and then, in another terminal try the following:
cd src
./redis-cli
redis> ping
PONG
redis> set foo bar
OK
redis> get foo
"bar"
redis> incr mycounter
(integer) 1
redis> incr mycounter
(integer) 2
redis>
For a more visual and user-friendly experience, use Redis Insight - a tool that lets you explore data, design, develop, and optimize your applications while also serving as a platform for Redis education and onboarding. Redis Insight integrates Redis Copilot, a natural language AI assistant that improves the experience when working with data and commands.
Redis provides a variety of data types, processing engines, and capabilities to support a wide range of use cases:
Fully-managed Redis with real-time performance at scale.
This section refers to building Redis from source. If you want to get up and running with Redis quickly without needing to build from source see the Getting started section.
These instructions apply to Redis 8.10 and above. For versions lower than 8.10, see the 8.8 build instructions.
Configuration files: the build steps below tell you to run
./src/redis-server redis.conf. Release tarballs bake the bundled modules'loadmodulelines and per-module settings directly intoredis.confduring packaging, so an extracted release tarball is ready to run as-is. When building from a git checkout instead, that module config lives in the auto-generatedredis-full.confproduced bymake modules-update(and regenerated bymake sync-redis-conf) — run./src/redis-server redis-full.confthere. Edit Redis-core settings inredis.conf. See modules/MODULES.md for the full config flow.
Building Redis with all data structures (JSON, time series, Bloom / cuckoo / count-min / top-k, t-digest, and the Query Engine) needs a build toolchain plus a few version-sensitive dependencies — GCC/Clang, LLVM 21, CMake 3.25–3.31.6, Rust 1.94, OpenSSL, Python 3, and assorted -dev libraries. Instead of a per-OS package list, the repo installs them for you with make bootstrap, which detects your OS and installs each bundled module's prerequisites.
CMake version range matters. The modules require 3.25 ≤ CMake ≤ 3.31.6 — CMake 4.x is not supported and the build will fail with it. On distros that ship CMake 4.x by default (e.g. Ubuntu 26.04), pin a supported version, e.g.
pip3 install 'cmake==3.31.6'. Notemake bootstraponly installs CMake when it's missing or too old; it won't downgrade a pre-installed 4.x, so remove/pin that yourself.
Either works — the release tarball already bundles the module sources; a git checkout needs one extra step to fetch them:
# A) Release tarball (recommended for building/running a release).
# Replace <version>, e.g. 8.10.0 — extracts into redis-<version>/:
wget -O redis-<version>.tar.gz https://github.com/redis/redis/releases/download/<version>/redis-full.tar.gz
tar xvf redis-<version>.tar.gz && cd redis-<version>
# B) git checkout — clone the bundled modules once:
git clone https://github.com/redis/redis.git && cd redis
make modules-update
Pick whichever option fits your environment:
Build inside the Docker build environment — recommended.
The repo ships docker/Dockerfile.noble (Ubuntu 24.04) with every prerequisite baked in, so you build inside the container and never touch your host toolchain:
docker build -f docker/Dockerfile.noble -t redis-build:noble .
# Multi-arch (requires `docker buildx` configured):
docker buildx build --platform linux/amd64,linux/arm64 \
-f docker/Dockerfile.noble -t redis-build:noble .
# Build with the working tree mounted:
docker run --rm -it -v "$PWD":/workspace -w /workspace redis-build:noble \
bash -lc 'make -j"$(nproc)" && make run'
Install everything on a fresh machine or container.
On a clean environment (for example a throwaway ubuntu:24.04 container), let bootstrap install every prerequisite for Redis core and all cloned modules:
make bootstrap
⚠️
make bootstrapinstalls system packages and may override existing versions of shared tools (compiler, CMake, LLVM, …). Prefer option 1, or run it in a disposable container, if that matters on your machine.
See only what's missing. To inspect which prerequisites are absent before installing anything, print one deduped list across Redis core and all modules:
make bootstrap list
Then install just the reported packages yourself. (Version-gated deps are shown as name (>= X); optional test/coverage deps are listed separately and don't fail the check.)
Get the exact install commands to copy-paste.
To run exactly what make bootstrap would, but only for the missing dependencies, use dry-run — it prints the precise install command for each missing dependency and installs nothing:
make bootstrap dry-run
The commands are printed per module, so a dependency shared by several modules appears once for each. Work through them iteratively:
make bootstrap dry-run — the deps you just installed no longer
show, so you now see only what's still missing for the remaining modules.make bootstrap dry-run prints no install commands.Manual, per-OS install (no Docker, and you'd rather not let
make bootstraptouch your host): follow the per-OS dependency instructions in the 8.8 README, which still lists them explicitly — https://github.com/redis/redis/tree/8.8#readme.
export BUILD_TLS=yes # optional — TLS support (needs OpenSSL dev libs)
make -j "$(nproc)"
# Release tarball (module config is baked into redis.conf):
./src/redis-server redis.conf
# From a git checkout, use the auto-generated module config instead:
./src/redis-server redis-full.conf
make (same as make build / make all) builds whatever is cloned under modules/*/src alongside Redis core. To build just the core data structures — even with modules cloned — use make build redis.
Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, FreeBSD. We support big endian and little endian architectures, and both 32 bit and 64-bit systems.
It may compile on Solaris derived systems (for instance SmartOS) but our support for this platform is best effort and Redis is not guaranteed to work as well as on Linux, OSX, and *BSD.
To build Redis with all the data structures (including JSON, time series, Bloom filter, cuckoo filter, count-min sketch, top-k, and t-digest) and with Redis Query Engine, make sure first that all the prerequisites are installed (see Install dependencies and build above), then clone the bundled modules once and build:
make modules-update
make
make (same as make build / make all) always builds whatever's cloned under modules/*/src alongside Redis core — there's no separate flag to opt in. If nothing is cloned yet, you get a core-only build.
To build Redis with just the core data structures — even if modules are already cloned — use:
make build redis
To build with TLS support, you need OpenSSL development libraries (e.g. libssl-dev on Debian/Ubuntu) and the following flag in the make command:
make BUILD_TLS=yes
To build with systemd support, you need systemd development libraries (such as libsystemd-dev on Debian/Ubuntu or systemd-devel on CentOS), and the following flag:
make USE_SYSTEMD=yes
To append a suffix to Redis program names, add the following flag:
make PROG_SUFFIX="-alt"
You can build a 32 bit Redis binary using:
make 32bit
After building Redis, it is a good idea to test it using:
make test
If TLS is built, running the tests with TLS enabled (you will need tcl-tls installed):
./utils/gen-test-certs.sh
./runtest --tls
Redis supports compression of replication stream via zstd as of 8.10. To build with compression support you have to install zstd development libraries (e.g libzstd-dev on Debian/Ubuntu) and use the following flag when invoking the make command:
make BUILD_COMPRESSION=yes
Redis has some dependencies which are included in the deps directory. make does not automatically rebuild dependencies even if something in the source code of dependencies changes.
When you update the source code with git pull or when code inside the dependencies tree is modified in any other way, make sure to use the following command in order to really clean everything and rebuild from scratch:
make distclean
This will clean: jemalloc, lua, hiredis, linenoise and other dependencies.
Also, if you force certain build options like 32bit target, no C compiler optimizations (for debugging purposes), and other similar build time options, those options are cached indefinitely until you issue a make distclean
command.
If after building Redis with a 32 bit target you need to rebuild it
with a 64 bit target, or the other way around, you need to perform a make distclean in the root directory of the Redis distribution.
In case of build errors when trying to build a 32 bit binary of Redis, try the following steps:
make 32bit:
make CFLAGS="-m32 -march=native" LDFLAGS="-m32"Selecting a non-default memory allocator when building Redis is done by setting the MALLOC environment variable. Redis is compiled and linked against libc malloc by default, except for jemalloc being the default on Linux systems. This default was picked because jemalloc has proven to have fewer fragmentation problems than libc malloc.
To force compiling against libc malloc, use:
make MALLOC=libc
To compile against jemalloc on Mac OS X systems, use:
make MALLOC=jemalloc
By default, Redis will build using the POSIX clock_gettime function as the monotonic clock source. On most modern systems, the internal processor clock can be used to improve performance. Cautions can be found here: http://oliveryang.net/2015/09/pitfalls-of-TSC-usage/
On ARM aarch64 systems, the hardware clock is enabled by default because the ARM Generic Timer is architecturally guaranteed to be available and monotonic on all ARMv8-A processors (see the “The Generic Timer in AArch64 state” section of the Arm Architecture Reference Manual for Armv8-A).
To build with support for the processor's internal instruction clock on other architectures, use:
make CFLAGS="-DUSE_PROCESSOR_CLOCK"
Redis will build with a user-friendly colorized output by default. If you want to see a more verbose output, use the following:
make V=1
Please consult the TLS.md file for more information on how to use Redis with TLS.
License Disclaimer If you are using Redis Open Source under AGPLv3 or SSPLv1, you cannot use it together with the Intel Optimizations (Leanvec and LVQ binaries). The reason is that the Intel SVS license is not compatible with those licenses. The Leanvec and LVQ techniques are closed source and are only available for use with Redis Open Source when distributed under the RSALv2 license. For more details, please refer to the information provided by Intel here.
By default, Redis with the Redis Query Engine supports SVS-VAMANA index with global 8-bit quantisation. To compile Redis with the Intel SVS-VAMANA optimisations, LeanVec and LVQ, use the following:
make BUILD_INTEL_SVS_OPT=yes
Alternatively, you can export the variable before running the build step for your platform:
export BUILD_INTEL_SVS_OPT=yes
make
By contributing code to the Redis project in any form, including sending a pull request via GitHub, a code fragment or patch via private email or public discussion groups, you agree to release your code under the terms of the Redis Software Grant and Contributor License Agreement. Please see the CONTRIBUTING.md file in this source distribution for more information. For security bugs and vulnerabilities, please see SECURITY.md and the description of the ability of users to backport security patches under Redis Open Source 7.4+ under BSDv3. Open Source Redis releases are subject to the following licenses:
Version 7.2.x and prior releases are subject to BSDv3. These contributions to the original Redis core project are owned by their contributors and licensed under the 3BSDv3 license as referenced in the REDISCONTRIBUTIONS.txt file. Any copy of that license in this repository applies only to those contributions;
Versions 7.4.x to 7.8.x are subject to your choice of RSALv2 or SSPLv1; and
Version 8.0.x and subsequent releases are subject to the tri-license RSALv2/SSPLv1/AGPLv3 at your option as referenced in the LICENSE.txt file.
The purpose of a trademark is to identify the goods and services of a person or company without causing confusion. As the registered owner of its name and logo, Redis accepts certain limited uses of its trademarks, but it has requirements that must be followed as described in its Trademark Guidelines available at: https://redis.io/legal/trademark-policy/.