Installation Guide
Install Valkey on Linux, macOS, or Docker in just minutes.
Linux Installation
Ubuntu / Debian
Install via the official APT repository for the latest stable version:
curl -fsSL https://valkey.io/install/valkey-8.1.sh | sudo bash sudo apt install valkey
CentOS / RHEL / Fedora
Install using the RPM package manager:
sudo dnf install valkey
Building from Source
If you need custom build options or the latest version:
git clone https://github.com/valkey-io/valkey.git cd valkey make -j$(nproc) sudo make install
macOS Installation
Recommended installation via Homebrew:
brew install valkey
Start the service after installation:
brew services start valkey
Docker Deployment
Using the official Docker image is the fastest way to deploy:
# Pull the latest stable image docker pull valkey/valkey:8.1 # Start container (default port 6379) docker run -d --name valkey -p 6379:6379 valkey/valkey:8.1 # Connection test docker exec -it valkey valkey-cli ping
Data Persistence: In production, mount a data volume: docker run -v /data/valkey:/data valkey/valkey:8.1
Verify Installation
After installation, run the following to confirm Valkey is working:
$ valkey-cli ping PONG $ valkey-cli INFO server | grep valkey_version valkey_version:8.1.0
System Service Management
On Linux, Valkey automatically registers as a systemd service after installation:
# Start sudo systemctl start valkey # Enable auto-start on boot sudo systemctl enable valkey # Check status sudo systemctl status valkey
Kernel Parameters: In production, set vm.overcommit_memory=1 and net.core.somaxconn=1024 to avoid data truncation and connection queue overflow.