Skip to content

Commit 1ab5b3d

Browse files
authored
Merge pull request #1126 from idanzairi302/codex/unraid-beginner-safe-docs
docs: add beginner-safe Unraid deployment guide
2 parents 7cfe5d0 + fafb49f commit 1ab5b3d

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
lines changed
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
sidebar_position: 34
3+
title: "Unraid Deployment (Beginner-Safe)"
4+
---
5+
6+
:::warning
7+
8+
This tutorial is a community contribution and is not supported by the Open WebUI team. It serves only as a demonstration on how to customize Open WebUI for your specific use case. Want to contribute? Check out the [contributing tutorial](/tutorials/tips/contributing-tutorial).
9+
10+
:::
11+
12+
# Open WebUI on Unraid (Beginner-Safe)
13+
14+
This guide is for first-time Unraid users who want a stable Docker deployment with persistent data and safe upgrades.
15+
16+
## What You Will Do
17+
18+
- Create the Open WebUI container in Unraid.
19+
- Configure persistent storage for `/app/backend/data`.
20+
- Connect Open WebUI to Ollama.
21+
- Update Open WebUI without losing data.
22+
- Troubleshoot reverse-proxy and persistence issues.
23+
24+
## Before You Start
25+
26+
- Docker is enabled in Unraid.
27+
- You have a persistent appdata path, for example: `/mnt/user/appdata/open-webui`.
28+
- Optional: Ollama is running either on:
29+
- the Unraid host, or
30+
- another reachable machine.
31+
32+
:::important
33+
Persist `/app/backend/data` to a host path. If you skip this, chats/settings can disappear after container recreation.
34+
:::
35+
36+
## 1. Create the Container in Unraid
37+
38+
In **Docker > Add Container**, use:
39+
40+
| Field | Value |
41+
| --- | --- |
42+
| Name | `open-webui` |
43+
| Repository | `ghcr.io/open-webui/open-webui:main` |
44+
| Network Type | `bridge` |
45+
| Restart Policy | `always` |
46+
| Container Port | `8080` |
47+
| Host Port | `3000` (or another free port) |
48+
49+
Add a path mapping:
50+
51+
| Config Type | Container Path | Host Path |
52+
| --- | --- | --- |
53+
| Path | `/app/backend/data` | `/mnt/user/appdata/open-webui` |
54+
55+
## 2. Configure Ollama Connectivity
56+
57+
Choose one setup.
58+
59+
### Ollama on the Unraid Host
60+
61+
- Extra parameters:
62+
- `--add-host=host.docker.internal:host-gateway`
63+
- Environment variable:
64+
- `OLLAMA_BASE_URL=http://host.docker.internal:11434`
65+
66+
### Ollama on Another Machine
67+
68+
- Environment variable:
69+
- `OLLAMA_BASE_URL=http://<ollama-lan-ip>:11434`
70+
71+
### Ollama in Another Container
72+
73+
- Put both containers on the same custom Docker network.
74+
- Set:
75+
- `OLLAMA_BASE_URL=http://<ollama-container-name>:11434`
76+
77+
## 3. First Launch Validation
78+
79+
1. Start the container.
80+
2. Open `http://<unraid-ip>:3000`.
81+
3. Complete initial admin setup.
82+
4. Open **Settings > Admin Settings > Connections** and verify the Ollama endpoint.
83+
5. Confirm models appear in the model selector.
84+
85+
## 4. Persistent Volume Notes
86+
87+
- Open WebUI state is stored in `/app/backend/data`.
88+
- Set a fixed `WEBUI_SECRET_KEY` in your Unraid template and keep it the same across recreates to avoid unnecessary session invalidation.
89+
- Keep host mapping consistent across updates/recreates.
90+
- Use a directory mapping, not a file mapping.
91+
- If persistence fails, check folder permissions for `/mnt/user/appdata/open-webui`.
92+
93+
## 5. Upgrade Steps (Safe Workflow)
94+
95+
1. Back up `/mnt/user/appdata/open-webui`.
96+
2. Ensure your template keeps the same `WEBUI_SECRET_KEY`.
97+
3. Update/pull your Open WebUI image tag.
98+
4. Recreate using the same template and the same `/app/backend/data` mapping.
99+
5. Verify chats/settings are intact.
100+
6. If needed, roll back to the previous image and restore backup.
101+
102+
For broader update options, see [Updating Open WebUI](/getting-started/updating).
103+
104+
## Troubleshooting
105+
106+
### Cannot Reach Ollama
107+
108+
Symptoms:
109+
- `Connection error` in Open WebUI
110+
- models do not load
111+
112+
Checks:
113+
- Confirm `OLLAMA_BASE_URL` is reachable from inside the Open WebUI container.
114+
- If using host Ollama, confirm `--add-host=host.docker.internal:host-gateway` is present.
115+
- If `host.docker.internal` fails, use your Unraid host LAN IP.
116+
117+
### `host.docker.internal` Does Not Resolve
118+
119+
- Add `--add-host=host.docker.internal:host-gateway`.
120+
- Restart container after saving template changes.
121+
- Fallback: `OLLAMA_BASE_URL=http://<unraid-lan-ip>:11434`.
122+
123+
### Reverse Proxy Subpath Problems (`/openwebui`)
124+
125+
Symptoms:
126+
- login/static assets return `404`
127+
- WebSocket disconnects or stuck loading states
128+
129+
Checks:
130+
- Ensure proxy forwards WebSocket upgrade headers.
131+
- Ensure subpath routing is consistent (strip or rewrite prefix before forwarding).
132+
- Set `WEBUI_URL` without trailing slash, for example:
133+
- `WEBUI_URL=https://example.com/openwebui`
134+
- If subpath remains unstable, prefer a subdomain:
135+
- `WEBUI_URL=https://ai.example.com`
136+
137+
For broader reverse-proxy debugging, see [Connection Errors](/troubleshooting/connection-error).
138+
139+
### Data Missing After Update/Redo
140+
141+
- Verify mapping is exactly `/app/backend/data` to your persistent host folder.
142+
- Confirm no typo created a second empty folder.
143+
- Confirm Unraid permissions allow read/write.

0 commit comments

Comments
 (0)