Templates

Redis

Deploy Redis 7 with persistent storage — in-memory data store for caching and pub/sub

Ink deploys Redis 7 as a container service with a persistent volume and append-only persistence. Your agent provisions the instance using a template, and Ink returns a generated password plus a Redis connection string.

Deploying

Your agent uses the template_deploy MCP tool:

Tool Call
(
  : "redis",
  : "my-cache"
)
{
  "services": [object Object],
  "outputs": [object Object]
}

Or via the CLI:

ink template deploy redis --name my-cache

Auto-generated password

Redis is deployed with --requirepass and a generated REDIS_PASSWORD. Use the returned connection_string output rather than hardcoding credentials.

Persistent storage

A persistent volume is attached at /data (10 Gi default). Data survives container restarts and redeployments.

Connecting

The response includes service endpoints and a connection string. Sibling services in the same project can use the returned internal endpoint; external clients should use the returned connection string and generated password.

redis://:password@hostname:6379

Client libraries

Node.js

npm install ioredis
import Redis from 'ioredis';

const redis = new Redis(process.env.REDIS_URL);

await redis.set('key', 'value');
const value = await redis.get('key');

Python

pip install redis
import os
import redis

r = redis.Redis(host="my-cache", port=6379, password=os.environ["REDIS_PASSWORD"])
r.set("key", "value")
value = r.get("key")

Specs

PropertyValue
EngineRedis 7
Imageredis:7
Port6379
Volume/data
Default Memory512Mi
Default vCPU0.5

On this page