Redis

Redis is the standard pick for caches, background-job queues (Sidekiq, BullMQ, RQ), and pub/sub. OwnStack runs Redis as a dokku service on the stack and links it via REDIS_URL.

Provisioning

$ ssh dokku@<stack-ip> redis:create redis-<app> --image-version 7
$ ssh dokku@<stack-ip> redis:link redis-<app> <app>

OwnStack auto-creates Redis for apps with needs_redis: true on first deploy. Apps that use Sidekiq typically have this set.

The REDIS_URL shape

redis://:<password>@dokku-redis-<service>:6379

Connect

$ ssh dokku@<stack-ip> redis:connect redis-<app>
redis-<app>:6379>

Persistence

The dokku-redis plugin enables AOF persistence by default — writes are durably appended to disk every second. RDB snapshots run periodically. If you only need a cache (no durability requirement), you can disable AOF for performance:

$ ssh dokku@<stack-ip> redis:set redis-<app> appendonly no

Restart the service afterward.

Multiple Redis services

For separating cache from queues:

$ ssh dokku@<stack-ip> redis:create cache-<app>
$ ssh dokku@<stack-ip> redis:link cache-<app> <app> --alias CACHE
# sets CACHE_URL on the app, alongside REDIS_URL

Backups

Stack backups capture an RDB snapshot of every Redis service. Restoring a Redis snapshot replaces in-memory state — for cache-only Redis this is rarely useful, but for queue state it can recover an outage.

Memory sizing

Redis memory is bounded by the stack's RAM. For a stack with 8 GiB, a Redis service handling cache + queues should be capped well below total RAM (other apps need memory too). Set the cap with maxmemory:

$ ssh dokku@<stack-ip> redis:set redis-<app> maxmemory 1gb
$ ssh dokku@<stack-ip> redis:set redis-<app> maxmemory-policy allkeys-lru

allkeys-lru evicts least-recently-used keys when memory is full. volatile-lru evicts only keys with TTLs. noeviction errors on writes when full.