# Self-host Open WebUI

> Self-hosted web interface for chatting with language models, connecting to Ollama or any OpenAI-compatible API. Run your own Open WebUI on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.

_Updated November 23, 2026_

Running your own Open WebUI usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Open WebUI behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.

## Just ask your agent

Open a Hobby workspace, tap **Launch** to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:

```text
Set up Open WebUI on this workspace and give me the link. Follow https://envhaven.com/self-host/open-webui.md
```

Then open the link it sends and create your Open WebUI account straight away, before anyone else finds the address. That is the whole request: the address in it is this page's Markdown copy, and the agent follows the instructions for it further down, with every setting Open WebUI's docs require.

## Or keep it private with Tailscale

The preview URL puts Open WebUI on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Open WebUI an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace's **Vars** pane as `TS_AUTHKEY`, and ask the agent:

```text
Set up Open WebUI on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/open-webui.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
```

- On Plus and Pro, a Tailscale container runs beside Open WebUI, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
- On Hobby, Tailscale runs in the workspace beside Open WebUI; after a restart or an update, ask the agent to start both again.
- Anything other services have to reach, such as a webhook, still needs a public address. [Keep self-hosted apps private with Tailscale](https://envhaven.com/guides/self-host-privately-with-tailscale) covers both, and what Tailscale's free plan includes.

| At a glance |  |
| --- | --- |
| What it is | AI chat, models and agent tools |
| License | Open WebUI License |
| Runs as | Docker (`ghcr.io/open-webui/open-webui:main`) or a native install |
| Memory | No minimum stated. Docs advise 2 GB or more for a container doing RAG or embeddings and call 1 GB very low. ([docs](https://docs.openwebui.com/troubleshooting/performance/)) |
| Plan that fits | Hobby or larger |
| Web port | 8080 |
| Documentation | [docs.openwebui.com/getting-started/quick-start/](https://docs.openwebui.com/getting-started/quick-start/) |

## What your agent takes care of

- **Installing it.** Open WebUI runs from the official image, `ghcr.io/open-webui/open-webui:main`, with its data in folders under `~/apps/open-webui`, or without Docker on Hobby.
- **Putting it on an HTTPS address.** The workspace's preview URL serves it, and your own domain can too.
- **Locking it down first.** What Open WebUI's docs say to set before it faces the internet, below.
- **Telling you what to back up**: /app/backend/data (Docker volume open-webui) and DATA_DIR for pip installs (default open_webui/data inside site-packages; set it outside the Python environment) ([docs](https://docs.openwebui.com/getting-started/quick-start/)).

### The settings it needs behind a proxy

- `WEBUI_URL`: Public HTTPS address of the instance. Set it before using OAuth/SSO; it is persisted config, so afterwards change it in Admin Settings > General. ([docs](https://docs.openwebui.com/reference/https/))
- `CORS_ALLOW_ORIGIN`: Allowed browser origins. Defaults to *; if set it must contain the exact public origin or Socket.IO connections fail. ([docs](https://docs.openwebui.com/reference/https/))
- WebSocket proxying and `ENABLE_WEBSOCKET_SUPPORT`: The proxy must forward /ws/socket.io with Upgrade and Connection headers; ENABLE_WEBSOCKET_SUPPORT=false switches server and client to long-polling when it cannot. ([docs](https://docs.openwebui.com/reference/https/))
- `WEBUI_AUTH_COOKIE_SECURE` and `WEBUI_SESSION_COOKIE_SECURE`: Mark the auth and session cookies Secure; both are off by default and should be true once TLS is in front. ([docs](https://docs.openwebui.com/reference/https/))
- `FORWARDED_ALLOW_IPS`: Addresses of proxies whose X-Forwarded-* headers are trusted; the default trusts any peer. ([docs](https://docs.openwebui.com/reference/https/))
- `WEBSOCKET_MANAGER`=redis with `REDIS_URL`: Needed only when running several instances or UVICORN_WORKERS above 1; also needs a shared database and the same WEBUI_SECRET_KEY everywhere. ([docs](https://docs.openwebui.com/reference/https/))

### Before it faces the internet

- The first account created becomes the administrator and sign-up then closes, so create it immediately after exposing the instance (or pre-create it with WEBUI_ADMIN_EMAIL and WEBUI_ADMIN_PASSWORD). ([docs](https://docs.openwebui.com/getting-started/advanced-topics/hardening))
- Set WEBUI_SECRET_KEY to a fixed value (the docs generate one with openssl rand -hex 32) so sessions survive container recreation. ([docs](https://docs.openwebui.com/getting-started/quick-start/))

## Things to ask next

Everything after the install is one more sentence to the agent. Some that come up:

- "Connect it to the API keys in my Vars pane, and make Claude the default model."
- "Add a second user account for my partner, without admin rights."
- "Move Open WebUI to app.example.com." Add the domain on the dashboard's Domains page with a CNAME to `domains.envhaven.app`, and the agent changes Open WebUI's address settings to match.
- "Update Open WebUI to the latest release." It pulls the new image and recreates the container, data kept.

## Instructions for the agent

The agent reads these from the page's Markdown copy. They also work pasted on their own, if you would rather give them in your own words.

```text
Set up Open WebUI on this workspace and serve it at my preview URL.
- Where Docker has a daemon (Plus and Pro), use Docker Compose with the official image, ghcr.io/open-webui/open-webui:main, starting from the docs' compose file: https://github.com/open-webui/open-webui/blob/main/docker-compose.yaml. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- Keep the compose file in ~/apps/open-webui and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Open WebUI's port 8080.
- Without Docker (on Hobby, where Docker has no daemon), install it as its docs describe, with `pip install open-webui`, then `open-webui serve` (Python 3.11 or 3.12; 3.13 is not supported), into ~/apps/open-webui with its data, so it survives workspace updates; global installs and system paths do not. Run it in a tmux window named open-webui, listening on 0.0.0.0:8080, and point my preview URL at port 8080.
- The preview URL terminates HTTPS in front of Open WebUI: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/open-webui.md for the preview URL, as Open WebUI's docs describe for running behind a proxy; skip any that apply only when Open WebUI serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/open-webui.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Open WebUI up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.
```

## What to know

- In Docker, Open WebUI's containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
- Without Docker, Open WebUI runs as a process in the workspace, so after a restart or an update, ask the agent to start it again.
- The app sets no upload cap by default, so Cloudflare's 100 MB request body limit becomes the effective cap. Set RAG_FILE_MAX_SIZE (megabytes) at or below 100 so the app reports the limit itself. ([docs](https://docs.openwebui.com/reference/https/))
- The standard image bundles the local ML stack (1.62 GB download); the slim image (197 MB) leaves out local embedding and speech runtimes, which then need external services. ([docs](https://docs.openwebui.com/getting-started/quick-start/))
- A pip install on a Linux x86_64 server without an NVIDIA GPU still pulls the CUDA libraries unless the CPU build of PyTorch is installed first. ([docs](https://docs.openwebui.com/getting-started/quick-start/))
- The default local embedding model runs on the CPU and uses roughly 500 MB of RAM per replica; the docs suggest an external embeddings API for multi-user setups. ([docs](https://docs.openwebui.com/getting-started/essentials))
- Open WebUI expects its own host rather than a path under one, so it takes the workspace's preview URL or a domain of its own.
- A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.

## Without a workspace

The manual route, on a server you run:

1. Rent a Linux VPS, secure SSH, and create a user for the app.
2. Install Docker and write a compose file from the official image.
3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Open WebUI's own [documentation](https://docs.openwebui.com/getting-started/quick-start/) covers each step for its install methods.

## Sources

Facts about Open WebUI come from its own documentation, checked on 2026-11-23:

- [docs.openwebui.com/getting-started/quick-start](https://docs.openwebui.com/getting-started/quick-start/)
- [docs.openwebui.com/troubleshooting/performance](https://docs.openwebui.com/troubleshooting/performance/)
- [docs.openwebui.com/reference/https](https://docs.openwebui.com/reference/https/)
- [docs.openwebui.com/faq](https://docs.openwebui.com/faq/)
- [docs.openwebui.com/getting-started/essentials](https://docs.openwebui.com/getting-started/essentials)
- [docs.openwebui.com/getting-started/advanced-topics/hardening](https://docs.openwebui.com/getting-started/advanced-topics/hardening)

## Keep reading

- [Self-host any app with your agent](https://envhaven.com/self-host)
- [Self-host LibreChat](https://envhaven.com/self-host/librechat)
- [Self-host AnythingLLM](https://envhaven.com/self-host/anythingllm)
- [Self-host Dify](https://envhaven.com/self-host/dify)
- [Self-host Langflow](https://envhaven.com/self-host/langflow)
- [AI agent hosting](https://envhaven.com/guides/ai-agent-hosting)

Source: https://envhaven.com/self-host/open-webui
