Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. Server & runtime
  3. Valkey

Valkey

Cache, sessions and queues on Valkey, shared or one instance per app.

Server & runtime

Valkey is the open-source (BSD, Linux Foundation) continuation of Redis: same protocol, same phpredis driver, same REDIS_* variables. Cipi gives each Laravel app its own instance, so no app can read or flush another's cache, sessions or jobs.

Valkey
$ cipi valkey list
$ cipi valkey isolate shop --maxmemory=256mb
Per-app instance
Servicecipi-valkey@myapp, running as the app's user
Network127.0.0.1, its own port (from 6400) and password
Config / data/etc/cipi-valkey/myapp.conf, /var/lib/cipi-valkey/myapp
CostAbout 10 MB of RAM when idle
.envREDIS_HOST, REDIS_PORT, REDIS_PASSWORD already written

Use it in Laravel#

New apps keep cache, sessions and queues in their database. Switch whatever you want to Valkey:

bash
cipi app env myapp --set=CACHE_STORE=redis
cipi app env myapp --set=SESSION_DRIVER=redis
cipi app artisan myapp config:cache
cipi worker restart myapp

Queues on Valkey run under Horizon: set QUEUE_CONNECTION=redis and cipi worker horizon enable myapp (Horizon). Plain queue:work workers read the database connection.

Manage instances#

bash
cipi valkey list
cipi valkey isolate shop                     # move an app off the shared instance
cipi valkey isolate --all
cipi valkey isolate shop --maxmemory=256mb --policy=allkeys-lru
cipi valkey restart shop
cipi valkey flush-shared                     # once no app uses it: empty + new password
Step 1 of 5Maintenance on

The app briefly returns 503 (a few seconds) so nothing writes during the move.

If the copy fails, the app stays exactly where it was. Apps whose Redis points elsewhere are left alone. Clones and synced apps get their own instance. cipi pending lists apps still on the shared instance.

cipi app create --valkey=shared keeps one app on the server-wide instance. Valkey is excluded from unattended upgrades; patch it with stack upgrades.