Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docs/tutorials/integrations/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Without Redis in multi-worker or multi-instance scenarios, you will experience:

### Prerequisites

- A valid Open WebUI instance (running version 1.0 or higher)
- A current Open WebUI release
- A Redis container (we will use `redis:7-alpine` in this example)
- Docker Composer (version 2.0 or higher) installed on your system
- A Docker network for communication between Open WebUI and Redis
Expand Down Expand Up @@ -316,7 +316,7 @@ You can also provide a semicolon-separated list of allowed domains. **Do not ski
Notice the different database numbers (`/0` vs `/1`) in the URLs:

- `REDIS_URL` uses database `0` for general application state
- `WEBSOCKET_REDIS_URL` uses database `1` for websocket-specific data
- `WEBSOCKET_REDIS_URL` uses database `1` for websocket-specific data (when unset it defaults to `REDIS_URL`, and `WEBSOCKET_REDIS_CLUSTER` defaults to `REDIS_CLUSTER`)

This separation helps isolate different types of data. You can use the same database number for both if preferred, but using separate databases is recommended for better organization and potential performance optimization.

Expand All @@ -328,10 +328,12 @@ This separation helps isolate different types of data. You can use the same data
REDIS_KEY_PREFIX="open-webui"
```

The `REDIS_KEY_PREFIX` allows multiple Open WebUI instances to share the same Redis instance without key conflicts. In Redis cluster mode, the prefix is formatted as `{prefix}:` (e.g., `{open-webui}:config:*`) to enable multi-key operations on configuration keys within the same hash slot.
The `REDIS_KEY_PREFIX` allows multiple Open WebUI instances to share the same Redis instance without key conflicts. `open-webui` is already the default, so this line only matters when you change it, and the prefix is used verbatim in cluster mode too.

### Sentinel Failover Configuration

Sentinel is enabled by setting `REDIS_SENTINEL_HOSTS` (comma-separated) and optionally `REDIS_SENTINEL_PORT` (default `26379`); `WEBSOCKET_SENTINEL_HOSTS` and `WEBSOCKET_SENTINEL_PORT` do the same for the websocket manager. In that mode the hostname part of `REDIS_URL` is the Sentinel master (service) name, and its database and credentials are reused.

:::danger Critical: Socket Timeout for Sentinel Deployments

Redis Sentinel setups require explicit socket connection timeout configuration to ensure proper failover behavior. Without a timeout, the application can hang indefinitely when a Redis master node goes offline, potentially preventing even application restarts.
Expand Down Expand Up @@ -408,7 +410,6 @@ REDIS_CLUSTER="true"
- `REDIS_CLUSTER` enables cluster-aware connection handling
- The `REDIS_URL` should point to your cluster's configuration endpoint
- This option has no effect if `REDIS_SENTINEL_HOSTS` is defined (Sentinel takes precedence)
- When using cluster mode, the `REDIS_KEY_PREFIX` is automatically formatted as `{prefix}:` to ensure multi-key operations target the same hash slot

:::

Expand Down Expand Up @@ -595,7 +596,7 @@ You can also verify that Open WebUI is actually writing data to Redis:
docker exec -it redis redis-cli --scan --pattern "open-webui*"
```

If Redis is configured correctly, you should see keys with your configured prefix (e.g., `open-webui:session:*`, `open-webui:config:*`).
If Redis is configured correctly, you should see keys with your configured prefix (e.g., `open-webui:session_pool`, `open-webui:usage_pool`, `open-webui:auth:token:*:revoked`). Persisted configuration is shared through the database `config` table, not Redis.

### Test Multi-Worker Setup

Expand Down Expand Up @@ -658,7 +659,7 @@ REDIS_URL="redis://redis:6379/0"
- `ENABLE_WEBSOCKET_SUPPORT="true"`
- `WEBSOCKET_MANAGER="redis"`
- `WEBSOCKET_REDIS_URL="redis://redis:6379/1"`
2. Check logs for: `DEBUG:open_webui.socket.main:Using Redis to manage websockets.`
2. Check logs for: `DEBUG:open_webui.socket.main:Using Redis to manage websockets.` (logged at DEBUG level, so it appears only with `GLOBAL_LOG_LEVEL=DEBUG`)
3. Verify Redis is accessible from Open WebUI container

#### Issue: "Multiple Open WebUI instances interfering with each other"
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/integrations/valkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
container_name: valkey
volumes:
- valkey-data:/data
command: "valkey-server --save 30 1 --maxclients 10000 --timeout 1800"
command: "valkey-server --save 30 1 --appendonly yes --maxmemory-policy noeviction --maxclients 10000 --timeout 1800"
healthcheck:
test: "[ $$(valkey-cli ping) = 'PONG' ]"
start_period: 5s
Expand Down
Loading