Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on macOS
A flexible distributed key-value database that is optimized for caching and other realtime workloads.
Saved setup from 3 h ago
Will it work on macOS?
CONTRIBUTING.mdWelcome and thank you for wanting to contribute!
The Valkey project is led by a Technical Steering Committee, whose responsibilities are laid out in GOVERNANCE.md.
We respect the intellectual property rights of others and we want to make sure
all incoming contributions are correctly attributed and licensed. A Developer
Certificate of Origin (DCO) is a lightweight mechanism to do that. The DCO is
a declaration attached to every commit. In the commit message of the contribution,
the developer simply adds a Signed-off-by statement and thereby agrees to the DCO,
which you can find below or at DeveloperCertificate.org.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the
best of my knowledge, is covered under an appropriate open
source license and I have the right under that license to
submit that work with modifications, whether created in whole
or in part by me, under the same open source license (unless
I am permitted to submit under a different license), as
Indicated in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including
all personal information I submit with it, including my
sign-off) is maintained indefinitely and may be redistributed
consistent with this project or the open source license(s)
involved.
We require that every contribution to Valkey to be signed with a DCO. We require the usage of known identity (such as a real or preferred name). We do not accept anonymous contributors nor those utilizing pseudonyms. A DCO signed commit will contain a line like:
Signed-off-by: Jane Smith <jane.smith@email.com>
You may type this line on your own when writing your commit messages. However, if your
user.name and user.email are set in your git configs, you can use git commit with -s
or --signoff to add the Signed-off-by line to the end of the commit message. We also
require revert commits to include a DCO.
If you're contributing code to the Valkey project in any other form, including sending a code fragment or patch via private email or public discussion groups, you need to ensure that the contribution is in accordance with the DCO.
You own the quality of the code that you submit to the project. The Valkey project doesn't impose any limitations on the use of AI tooling as long as the contribution meets the quality bar of the project.
While developing code, make sure to refer to our DEVELOPMENT_GUIDE.md, which includes documentation about various best practices for writing Valkey code.
If your change is conceptually simple, like a bug fix or a small feature, you can open a pull request directly. For a large feature, start with Large features before writing any code.
To submit a patch:
git checkout -b my_branch).git commit -s).git push origin my_branch).unstable (HOWTO).
If it fixes an existing issue, write "Fixes #xyz" in the pull request
description, where xyz is the issue number.Automated review runs before a maintainer reviews the pull request. Please address or reply to its comments.
If the feature is large, changing many systems in Valkey or introducing new classes of commands or data types, please don't start coding straight away. Start by creating an issue on GitHub with a description of what you want to accomplish and why. Focus on the end user experience, and leave out low-level technical details unless they affect it. Use cases are important for features to be accepted. Some large features also need a design document, which follows the process in design-docs/README.md. The project maintainers will let you know if that step is necessary.
Once you get an acknowledgment from the project maintainers, submit a patch using the procedure in Submitting a patch.
Keep in mind that we are very overloaded, so issues and PRs sometimes wait for a very long time. However this is not a lack of interest, as the project gets more and more users, we find ourselves in a constant need to prioritize certain issues/PRs over others. If you think your issue/PR is very important try to popularize it, have other users commenting and sharing their point of view, and so forth. This helps.
Valkey enforces code formatting using clang-format-18. A CI check runs on
every pull request and will fail if your code is not formatted correctly.
Option A — pip (any platform):
pip install clang-format==18.1.8
Option B — apt (Debian/Ubuntu):
sudo apt-get install software-properties-common -y
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/llvm-toolchain.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/llvm-toolchain.gpg] http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update -y
sudo apt-get install clang-format-18 -y
Run clang-format on the files you modified:
clang-format-18 -i src/file_you_changed.c src/file_you_changed.h
To format all source files at once:
clang-format-18 -i src/*.c src/*.h
The formatting configuration lives in src/.clang-format. Use version 18
specifically — different versions may produce different output and cause the
CI check to fail.
Use .github/workflows/daily.yml with
workflow_dispatch to run daily tests manually on any branch in your fork.
use_repo to your fork (for example, your-user/valkey)use_git_ref to your branch name (or a specific commit SHA)skipjobs, skiptests, test_args, and cluster_test_args.Notes:
skipjobs and skiptests to none.
Do not leave them empty, since the workflow input defaults may be applied.valkey-io/valkey, but manual
workflow_dispatch runs work for forks.Thanks!
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/valkey-io/valkey.git cd valkey
C/C++ compiler, CMake 3.24
xcode-select --install brew install cmake
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build
In order to install Valkey binaries into /usr/local/bin, just use:
% make install
You can use make PREFIX=/some/other/directory install if you wish to use a
different destination.
Note: For compatibility with Redis, we create symlinks from the Redis names (redis-server, redis-cli, etc.) to the Valkey binaries installed by make install.
The symlinks are created in same directory as the Valkey binaries.
The symlinks are removed when using make uninstall.
The creation of the symlinks can be skipped by setting the makefile variable USE_REDIS_SYMLINKS=no.
make install will just install binaries in your system, but will not configure
init scripts and configuration files in the appropriate place. This is not
needed if you just want to play a bit with Valkey, but if you are installing
it the proper way for a production system, we have a script that does this
for Ubuntu and Debian systems:
% cd utils
% ./install_server.sh
Note: install_server.sh will not work on macOS; it is built for Linux only.
The script will ask you a few questions and will setup everything you need to run Valkey properly as a background daemon that will start again on system reboots.
You'll be able to stop and start Valkey using the script named
/etc/init.d/valkey_<portnumber>, for instance /etc/init.d/valkey_6379.
No reports for macOS yet.
GitManual AI Agent reads the 10 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.