> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Redis

> Store workspace files in Redis.

Redis stores workspace files in a Redis database. Available in Python, Node,
Cloudflare Workers and browsers. File persistence depends on the database's
configuration.

## Configuration

For Python, Node or Cloudflare Workers, set `url` to your Redis connection URL. Use `key_prefix`
to keep this workspace's files separate from other data:

```yaml theme={null}
mounts:
  /data:
    vfs: redis
    mode: write
    config:
      url: redis://localhost:6379/0
      key_prefix: "mirage:fs:"
```

Add `capacity: 100MB` under `config` to cap the bytes the files hold. See
[capacity](https://docs.mirage.strukto.ai/home/setup/vfs.md#mount-capacity).

Browsers connect through a compatible HTTP endpoint, such as Upstash REST.
See [browser Redis setup](https://docs.mirage.strukto.ai/typescript/setup/redis.md#browser) for configuration.

## SDK guides

* [Python Redis VFS](https://docs.mirage.strukto.ai/python/vfs/redis.md)
* [TypeScript Redis setup](https://docs.mirage.strukto.ai/typescript/setup/redis.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.