Configuration

Enable Redis

Umami supports Redis as a caching layer for improved performance. When Redis is enabled, frequently accessed data such as website lookups and session information is cached, reducing database queries and improving response times.

Additionally, login authentication will be handled by Redis sessions instead of JWT tokens, providing server-side session management.

When to use Redis

Redis is recommended when:

  • You have a high-traffic website and want to reduce database load.
  • You are running multiple Umami instances and need shared session management.
  • You want faster response times for API calls.

Redis is optional. Without it, Umami uses direct database lookups and JWT-based authentication, which work well for most use cases.

Usage

To enable Redis, add a connection string as an environment variable called REDIS_URL.

REDIS_URL=redis://username:password@your-redis-server:port

If your Redis instance uses TLS, use the rediss:// protocol:

REDIS_URL=rediss://username:password@your-redis-server:port

Docker Compose example

To add Redis to an existing Docker Compose setup, add a Redis service and set the REDIS_URL environment variable:

redis:
  image: redis:7
  restart: always

umami:
  environment:
    REDIS_URL: redis://redis:6379

Behavior

If Redis becomes unavailable, Umami will fall back to direct database lookups. No data will be lost, but response times may increase until Redis is restored.