A cache in front of your database or your slow endpoints is usually a small win with an outsized effect, and on Ownkube it is one more deployment next to the app and database you already have. Ownkube’s managed cache runs Valkey, the Redis-compatible in-memory store, with a connection string ready in a couple of minutes.
This covers creating the cache, connecting to it privately from your app, opting into a public endpoint if you need one, and what it costs.
TL;DR
- Create a
cachedeployment from the dashboard; Ownkube’s managed cache engine is Valkey, Redis-compatible. - Pick a cache box by memory; it bills a flat monthly price, in-memory and ephemeral, with no storage charge.
- The cache is private by default. Connect your app to it over the in-region
redis://endpoint. - If you need to reach it from outside Ownkube, turn on the opt-in public endpoint for a TLS-encrypted
rediss://connection string. - Cache boxes start at $2 a month, always cheaper than a database box of the same memory since there is no storage or backup line.
What you need
- An app already deployed on Ownkube. See how to deploy a web app in under a minute if you have not done this yet.
- An Ownkube account signed in at
app.ownkube.io. - Wallet balance to cover the cache box’s monthly price, since caches are always reserved, never metered.
Step 1: Create the cache deployment
From the dashboard, start a new deployment and choose the cache type. The engine is Valkey, a Redis-compatible in-memory store. Name it, put it in the same region as the app that will use it, and continue to sizing.
Step 2: Pick a cache box
A cache holds its whole dataset in memory and runs continuously, so like a database it is always reserved rather than metered. Every cache box is shared CPU, since a cache spends almost nothing on CPU and is bound by memory instead:
| Box | vCPU | Memory | Price |
|---|---|---|---|
| Cache 0.25 | 0.1 vCPU (shared) | 0.25 GiB | $2 / mo |
| Cache 0.5 | 0.1 vCPU (shared) | 0.5 GiB | $3 / mo |
| Cache 1 | 0.25 vCPU (shared) | 1 GiB | $5 / mo |
| Cache 2 | 0.25 vCPU (shared) | 2 GiB | $9 / mo |
| Cache 4 | 0.5 vCPU (shared) | 4 GiB | $16 / mo |
A cache box is ephemeral: it keeps data in memory only and carries no storage charge, which is why it always costs less than a database box with the same amount of memory. A node restart is a cold cache, so treat it as a cache, not a source of truth.
Step 3: Configure it
On the cache’s settings, set the Valkey version, a max-memory limit, and an eviction policy (for example, evict the least-recently-used keys once memory fills up). These are the same knobs you would expect from any Redis-compatible deployment.
Step 4: Connect from your app
The cache’s connection card shows the host, port, password, and a ready-to-copy connection string. It is private by default, reachable from your other deployments in the same region over redis://, not from the public internet.
Set it as an environment variable on your app:
REDIS_URL=redis://default:<password>@<host>:6379
Then use it with whichever Redis-compatible client your stack already uses. For a Node app with ioredis:
import Redis from "ioredis";
const redis = new Redis(process.env.REDIS_URL);
await redis.set("session:123", JSON.stringify({ userId: 1 }), "EX", 3600);
const cached = await redis.get("session:123");
Redeploy the app so the environment variable takes effect, then check its logs to confirm the connection:
okctl login
okctl deploy logs <app-deployment-id> --range 300
Step 5: Turn on public access if you need it
Most apps only ever need the private endpoint, since the app and the cache sit in the same region. If you need to reach the cache from somewhere outside Ownkube, for example a local dev environment or a worker running elsewhere, turn on public access from the cache’s settings. That allocates a stable public hostname and a TLS-encrypted rediss:// connection string:
REDIS_URL=rediss://default:<password>@<public-host>:6379
Use rediss://, not redis://, for the public endpoint: the extra s is what tells your client to negotiate TLS.
What it costs
A small Cache 0.25 box runs $2 a month with no storage line to add on top, since a cache is ephemeral by definition. That draws from the same prepaid wallet as your app and database, so it is one more line in the same balance, not a separate bill. If you have not added a database yet, see how to add a managed Postgres database to your app.
FAQ
Is this actually Redis?
It runs Valkey, the open-source, Redis-compatible fork. Your existing Redis client libraries and commands work against it the same way; Ownkube calls it a Valkey cache rather than Redis in its own copy.
Does the cache persist data across restarts?
No. A cache is in-memory and ephemeral by design, so a restart clears it. Use it for sessions, rate limits, and hot-path lookups you can regenerate, not as a system of record.
Can I reset the cache password?
Not today. The cache password is fixed when the cache is created, unlike a database password, which can be reset. If you need a new password, create a new cache.
Is the public endpoint safe to use?
The public endpoint is TLS-encrypted (rediss://) and off by default; you turn it on per cache when you actually need external access. For anything that does not need to leave Ownkube’s network, the private redis:// endpoint is the better default.
How is pricing different from a database box?
A cache box of the same memory size always costs less than a database box, because a cache has no dedicated-CPU tier, no durable volume, and no backup line. That is also why a cache is the wrong place to store data you cannot afford to lose.
Where Ownkube fits
Adding a cache should not be a project of its own: pick a box by memory, connect over the private endpoint your app already reaches, and turn on the public rediss:// endpoint only when you actually need it from outside. It is one more reserved deployment on the same wallet as everything else you run. Deploy your first app.