# Valkey / Garnet

A Redis-compatible cache you host. Valkey is BSD-3-Clause; Garnet is MIT — Upstash and Redis Cloud without the request meter.

**Replaces:** Upstash / Redis Cloud

**Tier:** Easy

## Problem

Upstash meters Redis-compatible requests and storage. Redis Cloud is hosted Redis from Redis Ltd. Redis itself moved off OSI licenses (RSALv2 / SSPL) — this page does not treat Redis as the OSS path. Valkey is BSD-3-Clause (valkey-io/valkey), the Linux Foundation successor lineage. Garnet is MIT (microsoft/garnet) if you want that cache-store with Redis clients. Dragonfly is BSL 1.1 — not OSI, so it is not this path. This is not every Upstash Kafka or QStash product.

## Stack

- [Valkey](https://valkey.io) — BSD-3-Clause Redis-compatible in-memory datastore
- [Garnet](https://microsoft.github.io/garnet/) — MIT Redis-compatible cache-store from Microsoft Research

## Estimated SaaS cost saved

| You stop paying | Typical / year | Self-host instead |
|---|---:|---|
| Upstash / Redis Cloud (small team) | $1,200 | Valkey or Garnet |

**About $1,200 / year** on a small team, before you count lock-in.

## Deploy on Railway

Placeholder: Valkey (or Garnet) as a Railway service with a volume if you persist RDB/AOF. Bind the Redis port the app already uses. No one-click template in this repo yet — Start on Railway.

[Start on Railway](https://c17.io/go/railway/valkey-cache?from=%2Fstacks%2Fvalkey-cache.md)

[PostgreSQL if this is the primary database, not a cache](https://c17.io/stacks/cloudnativepg-postgres)

## AGENT_PROMPT

```
Replace Upstash or Redis Cloud with Valkey (preferred OSI Redis-compatible server) or Garnet.

- Official Valkey image, persist if you need snapshots. Point REDIS_URL at the new host. Confirm one GET/SET from the app that used Upstash.
- Do not install Redis and call it open source. Do not install Dragonfly and call it OSI (BSL 1.1). Write AGENT_PROMPT.md.
```

## FAQ

### Valkey or Garnet?

Valkey if you want the common Redis-compatible server. Garnet if you want the MIT Research cache-store. Pick one.

### Why not Redis?

Redis community code is RSALv2/SSPL — not OSI. Valkey is the BSD-3-Clause path.

### Why not Dragonfly?

Dragonfly is Business Source License 1.1. This site skips it for the OSS path.

Source: https://c17.io/stacks/valkey-cache
