# How to Self-Host Open WebUI With Docker or One Click (2026)

> Open WebUI Docker setup in 2026: a safe Docker Compose file, NGINX and HTTPS, the one-click way on xCloud, and how to update and back it up.

An **Open WebUI Docker** setup runs the official `ghcr.io/open-webui/open-webui` image with a volume for its data, behind NGINX with HTTPS. To self-host it safely, you also create the admin account before anyone else can. Use a short **Docker Compose** file on any Ubuntu server, or deploy it from **xCloud One Click Apps**.

Both paths give you the same chat interface for **Ollama** or any OpenAI-compatible API, on a server you control. If you have not set up a model server yet, read [**how to self-host Ollama**](/self-host-ollama/) first.

The difference is who handles the parts around the container: the proxy, WebSockets, the certificate, the admin account, backups and updates. This guide walks through both ways, step by step.

![How to self-host Open WebUI with Docker or one click](/_landing/blog/self-host-openwebui-cover.jpg)

## TL;DR

- **Requirements:** a 64-bit Linux server with Docker, about 6.5 GB of disk for the image, plus room for chats, uploads and any models.
- **The trap:** Open WebUI makes **the first account that signs up the admin**. The quick-start command publishes the sign-up page on your server's IP before you have claimed it.
- **Docker Compose way:** bind the port to `127.0.0.1`, set `WEBUI_SECRET_KEY`, create the admin from environment variables, then add NGINX with WebSocket headers and Let's Encrypt.
- **One-click way:** on xCloud, pick **OpenWebUI** in **One Click Apps**, fill in **Admin Email Address** and **Admin Password**, and the domain, HTTPS and closed sign-up are set for you.
- **Updates:** with Docker Compose, `docker compose pull` then `docker compose up -d`, after a backup. On xCloud there is no Update button yet. Take a backup first, then contact xCloud support for help moving to a newer image.
- **Limit:** Open WebUI is only the interface. The model you connect does the thinking, so size that side separately.

## The First Account Becomes the Admin

If you only remember one line: **in Open WebUI, whoever signs up first owns the instance.** The [**Open WebUI FAQ**](https://docs.openwebui.com/faq) says it plainly: "The first account is automatically designated as the admin account."

That admin sees everyone's chats, stores the provider API keys, and can add **Functions**, which run Python inside the container. Now look at the official quick-start, which maps the app with `-p 3000:8080`.

That publishes port 3000 on every network interface, including the public one. A firewall rule may not help: as xCloud's own install form warns, **Docker ports can bypass the server firewall**. So between `docker run` and your first visit, a stranger who finds the port can create the admin account.

![Self-hosted Open WebUI: who becomes the admin with the Docker quick-start compared with xCloud One Click Apps](/_landing/blog/self-host-openwebui-image-1.png)

xCloud's installer closes this gap. A new Open WebUI site on xCloud starts with **sign-up turned off**, and the admin account is created from the email and password you type in the install form. Any account you later let sign up waits for your approval.

xCloud also makes the app reachable only through your domain, not by server IP and port. If you install by hand, make the same two choices yourself. Step 2 below shows how.

## What You Need to Self-Host Open WebUI

**Open WebUI** is a self-hosted chat interface. It talks to Ollama and to OpenAI-compatible APIs, keeps users, chats and uploaded files in its own database, and serves the web app on port 8080 inside the container.

| What | What you need | Where the number comes from |
|---|---|---|
| Operating system | 64-bit Ubuntu LTS (24.04 in our test) | xCloud test install, November 2026 |
| Docker | Docker Engine with the Compose plugin | Open WebUI quick start |
| Disk for the image | About 6.5 GB once pulled (`:main` tag) | xCloud test install |
| Free disk before install | 5 GB (15 GB with Ollama) | xCloud's installer check |
| RAM | No published minimum for the interface | Open WebUI quick start |
| Ports | 80 and 443 for your domain; keep 8080/3000 private | This guide |
| Web server (xCloud) | NGINX stack (OpenLiteSpeed servers cannot run Docker) | [Enable Docker on an NGINX server](/docs/enable-docker-on-an-nginx-server-in-xcloud/) |

Upstream measured the smaller `:slim` image at about 300 MiB of memory when idle, and says that is not a minimum. The model side is what needs real RAM. A model running in Ollama on the same server needs more memory than the interface ever will.

## Option 1: Self-Host Open WebUI With Docker Compose

This path works on any Ubuntu server from any provider. You need SSH access as a sudo user; see [**how to add SSH keys**](/docs/how-to-generate-and-add-ssh-keys-in-xcloud/) if you have not set them up. We have not run this exact file on a bare server, so treat it as a starting point.

### Step 1: Install Docker

Install Docker Engine and the Compose plugin from Docker's official repository, then check both:

```bash
docker --version
docker compose version
```

New to Compose files? [**What Docker Compose is**](/what-is-docker-compose/) explains the format in a few minutes.

### Step 2: Write a Compose file that stays private

Create a folder such as `/opt/openwebui` and add a `docker-compose.yml`:

```yaml
services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    restart: unless-stopped
    ports:
      - "127.0.0.1:3000:8080"
    volumes:
      - open-webui:/app/backend/data
    env_file:
      - .env

volumes:
  open-webui:
```

Then a `.env` file next to it, readable only by root (`chmod 600 .env`):

```bash
WEBUI_SECRET_KEY=paste-the-output-of-openssl-rand-hex-32
WEBUI_URL=https://chat.example.com
WEBUI_ADMIN_EMAIL=you@example.com
WEBUI_ADMIN_PASSWORD=a-long-unique-password
```

Three choices matter here:

- **`127.0.0.1:3000:8080`** keeps the app reachable from the server only. NGINX will be the public door.
- **`WEBUI_SECRET_KEY`** must stay the same. The quick start warns that without a fixed key, every recreated container logs everyone out.
- **`WEBUI_ADMIN_EMAIL` and `WEBUI_ADMIN_PASSWORD`** create the admin on the first start, and the [**environment reference**](https://docs.openwebui.com/reference/env-configuration) says sign-up is then switched off automatically.

The `open-webui` volume holds the database, uploads and settings. Never run without it, or your chats vanish with the container.

### Step 3: Start it and check it

```bash
docker compose up -d
docker compose logs -f open-webui
curl -I http://127.0.0.1:3000
```

The first start takes a while because the image is large. In our xCloud test install, the domain answered **502** for about a minute after the container started, then **200**. A short 502 right after a start is normal.

### Step 4: Add a domain, NGINX and HTTPS

Point a DNS record at the server, install NGINX and Certbot, and proxy your domain to `127.0.0.1:3000`. Open WebUI streams answers over WebSockets, so the `location` block needs the upgrade headers from its NGINX guide:

```nginx
location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
}
```

Then run `sudo certbot --nginx -d chat.example.com`. If answers hang or arrive all at once, the WebSocket headers are the first thing to check.

### Step 5: Connect a model

Sign in with your admin email. In Open WebUI's admin settings, add a connection: an OpenAI-compatible API URL and key, or your Ollama server.

To run Ollama on the same server, add it as a second service in the same file and set `OLLAMA_BASE_URL=http://ollama:11434` on Open WebUI. Keep Ollama's port private too, because its API has no login.

## Option 2: One-Click Open WebUI on xCloud

This runs the same Open WebUI image without writing any of the files above. xCloud limits the app to 1 GB of memory and a fifth of one CPU core. The full click-by-click walkthrough is in 👉 [**How to Deploy OpenWebUI With xCloud One Click Apps**](/docs/deploy-openwebui-with-xcloud/).

### Step 1: Pick a server with NGINX

Use an existing **NGINX** server or create one. Docker apps need NGINX, and xCloud installs Docker the first time a container app needs it ([**details here**](/docs/enable-docker-on-an-nginx-server-in-xcloud/)).

### Step 2: Choose OpenWebUI in One Click Apps

Click **New Site**, choose the server, open **One Click Apps** and pick **OpenWebUI**. Enter a **Site Title**, then choose **Go Live** with your domain or **Demo Site** for a temporary subdomain.

Under **Admin User**, fill in **Admin Email Address** and **Admin Password**. That is the only account that can log in when the install finishes.

If this server already runs an Ollama site, turn on **Enable Ollama** and pick up to 3 models under **Select Ollama Models**. If not, install Open WebUI first and add Ollama later from **OpenWebUI → Enable Ollama** (Step 4 below).

### Step 3: Let the installer run

Behind the click, the installer does most of the work from Option 1:

- checks for **5 GB of free disk** (15 GB when Ollama is included) and stops if it is not there
- generates the secret keys and writes the `.env` and `docker-compose.yml` for you
- pulls the official Open WebUI image and makes the app reachable only through your domain, not by server IP and port
- limits the app to 1 GB of memory and a fifth of one CPU core
- closes sign-up and creates your admin account on the first start
- sets up the domain, the proxy and the HTTPS certificate

In our test install on an 8 GB, 2 vCPU NGINX server, every install step finished in **about 3 minutes**. Disk use went from 3.6 GB to 11 GB once the image was pulled. The domain then answered 502 for about a minute while the app started, and signing in at `/auth` worked.

### Step 4: Add Ollama later

Open the site and go to **OpenWebUI → Enable Ollama**. xCloud creates an Ollama site on the same server, connects the two and restarts Open WebUI.

In our test this took about 3 minutes, and the domain answered 502 for about two minutes during the restart. Plan it for a quiet moment. You can then pull models from the **Management** page and remove them there too; the [**Ollama doc**](/docs/deploy-ollama-with-xcloud/) covers it.

Settings such as the OpenAI base URL live in **OpenWebUI → Environment**.

![Open WebUI with Docker Compose compared with xCloud One Click Apps: who does each task](/_landing/blog/self-host-openwebui-image-2.png)

## Updates, Backups and Security After Install

Open WebUI ships often, and its database changes with it. The [**update guide**](https://docs.openwebui.com/getting-started/updating/) warns that "Database migrations are one-way". Each update can change Open WebUI's database for good, so you cannot go back to an older version without a backup. Back up first, every time.

### Updating with Docker Compose

```bash
cd /opt/openwebui
docker compose pull
docker compose up -d
```

Your data stays in the volume. Upstream recommends pinning a version tag (`:vX.Y.Z`) for shared instances, so updates happen when you choose.

### Updating on xCloud

There is no Update button yet. Take a backup first, then contact xCloud support for help moving to a newer image. xCloud runs the app from its own copy of the compose file, and the `docker-compose.yml` in your site folder is only there for you to read. So running `docker compose` from the site folder is not the way to update it.

### Backups

- **Docker Compose:** stop the app or accept a live copy, then archive the volume with the `tar` command from the update guide. Copy the archive off the server.
- **xCloud:** Open WebUI is a Docker app, so it has **Backup → Previous Backups** with on-demand and scheduled snapshots, kept locally or sent to S3-compatible storage or SFTP. See [**Backup and restore Docker apps**](/docs/backup-and-restore-docker-apps/).

### Security checklist

- Keep sign-up off, and approve each new user by hand.
- Keep the container port on `127.0.0.1`; only NGINX should face the internet.
- Treat the admin account like a server password. It can run code through Functions.
- Remember that a hosted API provider receives every prompt you send it. Pair Open WebUI with Ollama if prompts must stay on your server.

## Docker Compose vs One-Click: Which to Choose

| | Docker Compose by hand | xCloud One Click Apps |
|---|---|---|
| Setup time | An afternoon, if NGINX and Certbot are new to you | About 3 minutes of install in our test |
| Resources | Whatever you give the container | Limited to 1 GB of memory and a fifth of one CPU core |
| Admin account | You must claim it or set env vars | Created from the form, sign-up closed |
| HTTPS and WebSockets | You configure NGINX | Set up for you |
| Ollama on the same server | You add and wire a second service | **Enable Ollama** page |
| Updates | `docker compose pull` and `up -d` | No Update button yet; back up, then contact support for help |
| Backups | Your own script | Docker app backups, local or remote |
| Cost | Your server plus your time | An xCloud plan (see [**pricing**](/pricing/)) |

✅ **Choose Docker Compose if** you already run NGINX, enjoy owning every file, and want to pin versions and tune every setting yourself.

✅ **Choose one click if** you want the chat screen live on your domain today, with the admin account and HTTPS handled for you. See [**OpenWebUI hosting**](/openwebui-hosting/) for server sizes.

## Honest Limits: What xCloud Does Not Do for Open WebUI

- **No Update button yet** (see Updating on xCloud).
- **No model speed promises.** Open WebUI is only the interface; xCloud has not benchmarked any model on any plan.
- **You manage Open WebUI's own settings.** xCloud looks after the server; Open WebUI's settings, users and chats are yours to manage.
- **A short outage on restarts.** Expect a minute or two of 502 after install and after Enable Ollama.
- **Undoing it:** **Delete Site** removes the app. Take a backup first if you want your chats later.

## Get Your Own Open WebUI Running Today

If you like knowing every moving part, the Docker Compose path is one file, one `.env` and an NGINX block. Bind the port to `127.0.0.1`, create the admin from environment variables, and you have a private chat interface.

If you would rather skip the proxy, the certificate and the race for the admin account, [**deploy Open WebUI on xCloud**](/openwebui-hosting/) and spend that time choosing a model. Browse the other [**One Click Apps**](/one-click-apps/), compare [**self-hosted LLM options**](/self-hosted-llm/), or read [**how to self-host DeepSeek R1**](/how-to-self-host-deepseek-r1-on-a-managed-server/) for a model to put behind it.

Either way, claim the admin account first, keep the port private, and set a backup schedule this week.

If you have found this blog helpful, feel free to [**subscribe to our blogs**](https://xcloud.host/blog/) for valuable tutorials, guides, knowledge, and tips on web hosting and server management. You can also join our [**Facebook community**](https://www.facebook.com/groups/xcloud.community) to share insights and engage in discussions.

## Frequently Asked Questions

### Is Open WebUI free to self-host?

The source is public and there is no fee to run it, but it uses a custom Open WebUI License, not a standard open-source one. It adds a branding condition for larger deployments, so read the licence before you rebrand it. You pay for the server and for any model API you connect.

### How much RAM does Open WebUI need?

Open WebUI publishes no minimum. The interface itself is light, but the full image takes about 6.5 GB of disk once pulled. If you run Ollama on the same server, the models decide the RAM, so size the server for them.

### Who becomes the admin in Open WebUI?

The first account that signs up. Open WebUI's FAQ says the first account is automatically the admin. Create it before the page is public, or set WEBUI_ADMIN_EMAIL and WEBUI_ADMIN_PASSWORD so the admin exists from the first start.

### How do I update Open WebUI in Docker?

Back up the data volume, then run docker compose pull and docker compose up -d from the folder with your compose file. Your chats stay in the volume. Each update can change Open WebUI's database for good, so you cannot go back to an older version without a backup.

### Can Open WebUI use Ollama on the same server?

Yes. With Docker Compose, run Ollama as a second service and set OLLAMA_BASE_URL to it. On xCloud, open the Open WebUI site and use Enable Ollama, which adds an Ollama site and connects the two for you.

### Does xCloud update Open WebUI for me?

There is no Update button yet. Take a backup first, then contact xCloud support for help moving to a newer image. xCloud runs the app from its own copy of the compose file, not the one in your site folder.
