# Run Redis on Koo

A Redis database on Koo is a service in your [environment](/docs/projects/projects-and-environments): you create it on the environment canvas, next to the services that cache, queue, or share state through it. Koo runs Redis 7.4 — there is no version to pick and nothing to install or upgrade.

A database is never internet-reachable. It has no public URL, and its hostname only resolves inside Koo — your services reach it over [Koo's private network](/docs/networking/private-networking), and each one wires itself in with a [connection variable](/docs/databases/connect-a-database).

## Create a Redis database

1. 
2. 
3. 
4. 
5. 
6. 
7.

> **Note:**
>
> Your primary account includes one free-unit Redis (0.5 vCPU / 1 GiB) in its permanent free allowance, alongside one free web service and one free Postgres. On the Free plan the allowance is also the ceiling — one Redis in total. See [the free tier](/docs/get-started/free-tier).

## The password

Redis has a single credential: the password. There is no username and no named database. The password is set at create time — auto-generated unless you supply one — and can never be changed afterwards.

A password you supply yourself must be 8–128 characters, using only letters, digits, and `.` `_` `~` `-`. The restriction exists because the password is embedded verbatim in the connection URL — `redis://:<password>@<host>:6379` — so it must never need URL-encoding. **Generate secure password** fills in a compliant one for you.

In that URL the username is empty, and the leading colon is correct: it separates the empty username from the password. Redis clients accept this form as-is.

## Size, disk & persistence

You give a database explicit CPU and memory, like any service. Disk is included automatically and follows the memory you pick — you never choose a disk size.

| vCPU | Memory | Price |
| --- | --- | --- |
| 0.25 vCPU | 512 MiB | $5/mo |
| 0.5 vCPU | 1 GiB | $10/mo |
| 1 vCPU | 2 GiB | $20/mo |
| 2 vCPU | 4 GiB | $40/mo |
| 4 vCPU | 8 GiB | $80/mo |

Pick any CPU + memory (memory up to 8 GiB per vCPU).

Your Redis writes an append-only file to its disk, so data survives restarts. That is durability for a running database, not a backup.

A database always runs as exactly one instance in one location, on every plan.

## Connect from your services

Nothing is wired automatically. Creating a Redis changes nothing about your other services — each consumer declares its own connection variable:

1. 
2. 
3.

Your code then reads `REDIS_URL` from its environment like any other variable.

A Redis database publishes four connection keys — `REDIS_URL`, `HOST`, `PORT`, `PASSWORD` — and a consumer can wire any single one individually. The [connection guide](/docs/databases/connect-a-database) covers individual keys, sharing one database between services, and the API shape.

## View connection details

The database's **Settings** tab shows a read-only **Connection** card with the non-secret details: `HOST` and `PORT`. The same card rides every read of the [service object](/api/objects/service) in the API.

The full set, password included, is behind **Reveal connection** on the same card. Revealing requires the [editor role](/docs/collaboration/teams-and-roles) or higher, and every reveal is logged to the [audit trail](/docs/collaboration/audit-log).

`HOST` is the database's internal hostname — the same value shown under **Private networking** in Settings. It only resolves inside Koo; there is no external address.

## Run commands

The database's **Console** tab opens a shell in the running container, where `redis-cli` is available and `REDIS_PASSWORD` is already set:

```bash
redis-cli -a "$REDIS_PASSWORD" ping
```

The console requires the editor role or higher, and every session is audited.

There is no external access of any kind — not from your laptop, not from CI, not from a GUI client. The database's host only resolves inside Koo.

A Redis console in the browser will let you inspect keys and run commands without opening a shell. (Coming soon)

## What a Redis service doesn't do

- 
- 
- 
- 
-

## Delete a database

Deleting a database is staged like any other change: the node is marked for deletion, and you can undo freely until you confirm on the changes bar. The bar's button reads **Delete** when the deletion stands alone (**Deploy** when other staged changes ride along).

> **Warning:**
>
> Once the delete deploys, the database's data is destroyed permanently. Koo keeps no backups or snapshots of databases — copy out anything you need first, from the Console tab or through your own services.
