Skip to Content
Rock8Cloud
Databases & Storage

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

  1. Click Add Service in your project
  2. Select Database
  3. Choose Valkey (Redis)
  4. Select a version (9.0.8 is the default, 8.1.12 is also available)
  5. Enter a name (e.g., valkey-cache, valkey-queue)
  6. 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:

VariableDescriptionExample
HOSTValkey hostname(auto-generated)
PORTValkey port6379
PASSWORDInstance password (secret)(auto-generated)
URLFull connection URLredis://default:<password>@<host>:6379

Password authentication is always on. The password is generated once and stays the same across redeploys.

Linking to Your Application

  1. Go to your application service → Build and Deploys → Environment Variables
  2. Link the Valkey variables using the names expected by your framework, for example REDIS_URL from URL

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 HOST variable 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 URL variable or pass PASSWORD to 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

On this page