← Databases
RE

Redis

Tick Redis on an app and it gets its own logical database on the server's shared Redis, or its own dedicated instance if it needs one. Here is exactly what that gives you, what gets backed up, and how to reach it from outside.

What you get

  • Redis 7 (redis:7-alpine), shared on the server by default: each app gets its own logical database number, 0 to 15, on the same instance, password-protected.
  • Give this app its own Redis on the Redis card instead, with its own memory limit, an eviction policy you choose (noeviction, allkeys-lru, volatile-lru, allkeys-lfu or volatile-ttl) and append-only persistence synced every second. Your keys are copied across when you switch, either way.
  • Scheduled off-site backups today cover Postgres, MySQL and ClickHouse; the shared Redis add-on isn't part of that dump-and-restore pipeline. A dedicated Redis keeps its append-only file on disk, and moving an app to a database server copies it across as part of that move.
  • A database server's standby keeps a live copy of the shared Redis and takes over automatically if the primary is unreachable for 3 minutes (Pro and Team). A dedicated per-app Redis starts empty on the standby after a failover, it isn't replicated.
  • No point-in-time recovery for Redis, that's Postgres-only.

How to add it

  1. 1

    Tick Redis when you create the app

    On New app, or later from Edit → Add-ons, check Redis and deploy. Railyard injects REDIS_URL, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD and REDIS_DB, picking a free logical database number automatically.

  2. 2

    Or add it from the CLI

    railyard apps create <name> <git-url> --addons redis does the same thing from a terminal.

  3. 3

    Give the app its own instance if it needs isolation

    On the Redis card, Give this app its own Redis sets a memory limit and an eviction policy and copies your keys across; Go back to the shared Redis reverses it.

A one-click example

Chatwoot runs Postgres for its data and Redis for Sidekiq's job queue, a realistic pairing if you're adding Redis for background jobs rather than only a cache.

Deploy Chatwoot Free plan, no card.

Or deploy a standalone instance deploys a standalone Redis instance with nothing else attached, if that's all you need.

FAQ

What does Redis cost on Railyard?
Redis runs on the server you're already paying for; there's no extra charge for the shared add-on. A dedicated Redis still runs on the same server unless you move it to its own database server.
Are Redis add-ons backed up?
The shared Redis add-on isn't part of Railyard's scheduled database backups, those cover Postgres, MySQL and ClickHouse. Treat it as a cache or queue you can rebuild rather than a system of record, unless you've given the app its own dedicated instance with persistence turned on.
How do I connect from outside, with redis-cli or a GUI?
Open Trusted addresses on the Redis card and allow your IP. Railyard opens a TCP proxy for that one address, and the card gives you the exact redis-cli command to paste.
How do I migrate existing Redis data in?
Point your app at an external Redis URL under Resources while you copy data across, or run redis-cli --rdb against the generated REDIS_URL once the add-on is up. Move off Heroku Key-Value Store (Redis) walks through a full Heroku Redis migration.

Tutorials that use it

General docs