# Host Redis

Redis online all the time, for caches, queues, sessions and rate limits: your AI agent creates it on Estiba with a password, and you pay for the memory it uses.

## Put it online

1. [Sign up](https://app.estiba.cloud) and [connect your agent](https://estiba.cloud/docs/connect-your-agent) to Estiba, once.
2. Ask it: "create a Redis on Estiba, with a password".
3. Your agent creates it from the official image, with a version that only changes when you say so. Redis has no password unless it is given one, so your agent always starts it with one, kept as a secret: stored encrypted and never shown again, not even to the agent, so keep the one it gives you.
4. If what you keep in it must last (queues, sessions), your agent turns on Redis's own saving to disk and keeps it in a volume, at `/data`. A cache that can start empty needs neither.
5. It gives Redis a port and tells you its address, such as `ports.estiba.cloud:21450`.
6. [Add credit](https://estiba.cloud/docs/credit-and-prices), from $5. Redis starts once there is credit.

Valkey, the open-source copy of Redis, works the same way: ask for it by name.

## Connect to it

Use a connection URL with redis-cli, Redis Insight or your app's client (ioredis, node-redis, redis-py, BullMQ):

```
redis://default:PASSWORD@ports.estiba.cloud:21450
```

Your apps on Estiba connect to the same address, wherever each one runs; your agent puts the URL in the app as a secret.

The address is open to the internet, like any database on a port: the password is what keeps others out, so use a long one. The connection is not encrypted unless the database is set up with TLS: for data that matters from outside Estiba, ask your agent to turn it on.

## What it costs

You pay for what it uses, measured every second: $4 per GB of memory and $8 per vCPU busy, a month, and $0.10 per GB in its volume, taxes included. Your agent keeps it always on, so it never sleeps and your apps always find it.

Redis keeps everything in memory, so memory is what you pay for. The official Redis 8 image, started empty on one of Estiba's servers, held about 11 MB: **about $0.05 a month**. Each 100 MB more of memory adds about $0.40 a month. When it is a cache, ask your agent for a memory limit and to let Redis drop old keys, so it does not keep growing. The dashboard shows what yours really uses and costs each day.

## If a server goes down

A Redis with no volume starts on another server by itself within a couple of minutes, empty. One with a volume waits for its server to come back, with its files. When Estiba moves it to another machine the address stays the same; the move restarts it for a few seconds and apps reconnect.
