Valkey
Add a managed Valkey (Redis-compatible) in-memory datastore to your project
Valkey is an open source, Redis-compatible in-memory datastore. Use it as a cache, for session storage, or as the backing store for job queues.
Valkey keeps data in memory only. A restart, resize, or version change clears all data. Use it for caches and queues, not as a primary store.
Create a Valkey Service
- Click Add Service in your project
- Select Database
- Choose Valkey (Redis)
- Select a version (
9.0.8is the default,8.1.12is also available) - Enter a name (e.g.,
valkey-cache,valkey-queue) - Click Create
Rock8Cloud provisions a single instance with networking handled automatically. AI agents can do the same with the MCP tool provision_redis, and blueprints use the database type valkey.
Environment Variables
After creation, Rock8Cloud exposes these variables for your application to connect:
| Variable | Description | Example |
|---|---|---|
HOST | Valkey hostname | (auto-generated) |
PORT | Valkey port | 6379 |
PASSWORD | Instance password (secret) | (auto-generated) |
URL | Full connection URL | redis://default:<password>@<host>:6379 |
Password authentication is always on. The password is generated once and stays the same across redeploys.
Linking to Your Application
- Go to your application service → Build and Deploys → Environment Variables
- Link the Valkey variables using the names expected by your framework, for example
REDIS_URLfromURL
Any standard Redis client works, such as ioredis, node-redis, BullMQ, redis-py, or Sidekiq. No cluster client is needed.
After saving, your application automatically redeploys with the new configuration.
Memory and Eviction
- Valkey uses up to 80% of the service's memory allocation for data
- The eviction policy is
noeviction. When memory is full, writes fail with an out-of-memory error instead of silently dropping keys. This is what queue libraries such as BullMQ expect - The default allocation is 250m CPU and 256 MiB of memory
To change the allocation, open the Resources tab of the service, or use the MCP tool set_service_resources. Resizing restarts Valkey and clears its data.
Features
- Redis-compatible - works with any Redis client library
- Always password protected - one generated password, reused across redeploys
- In-memory only - no persistence, data is cleared on restart, resize, or version change
- Single instance - one replica, no high availability option
- Network-isolated - only accessible from services within the same project, not from the internet
- Fully managed - automated lifecycle management with zero configuration
Troubleshooting
Connection refused
- Verify the
HOSTvariable is correct - use the auto-generated hostname provided by Rock8Cloud - Ensure your application service is in the same project as Valkey
- Check that the Valkey deployment completed successfully
Authentication errors
- Valkey always requires the password. Use the
URLvariable or passPASSWORDto your client - The default username is
default
Write fails with an out-of-memory error
- Valkey is full and does not evict keys. Remove data your application no longer needs or increase memory in the Resources tab
- Memory available for data is 80% of the allocation
Data disappeared
- Valkey has no persistence. A restart, resize, or version change clears all data
Related
- Dragonfly - Deprecated Redis-compatible datastore
- PostgreSQL - Relational database
- S3 Object Storage - S3-compatible object storage
- Environment Variables - Configure secrets and settings