Skip to content

How to Self-Host Open WebUI and Get a Private ChatGPT Interface for Your Local Models

Self-host Open WebUI with Docker and Ollama for a private ChatGPT interface that runs entirely on your hardware. Access it from any device with a Localtonet HTTPS tunnel.

Summary in your language
In this article 10 sections
🤖 Open WebUI · Ollama · Self-Hosted AI · Localtonet · 2026

Run a familiar AI chat interface on hardware you control

Open WebUI provides a browser-based interface for models served by Ollama, and Docker gives the application a repeatable deployment with persistent storage. This guide covers two architectures: host-installed Ollama with Open WebUI in Docker, and a Docker Compose stack that contains both services. It also covers local verification, privacy boundaries (including Ollama cloud models), backups, updates, security hardening and troubleshooting. Finally, it shows how to add optional remote access through a Localtonet HTTP tunnel, along with the access controls we provide for that tunnel.

🔒 Loopback-only web publication 💾 Persistent Docker volumes 🌐 Optional public HTTPS access

Understand the architecture and privacy boundaries

Open WebUI running on a local host and accessed from a computer and phone.
Open WebUI provides the chat interface while Ollama runs model inference on the local host.

Open WebUI is a self-hosted web application for interacting with language models. In this tutorial, Ollama is the model-serving component. Open WebUI provides the browser interface, account and conversation storage, and the connection to the model service. Ollama loads a compatible model and performs inference on the CPU, GPU or another accelerator supported by the host and the installed Ollama build.

Self-hosting gives you control over where these components run. It does not automatically mean that every byte stays on the host. The actual data path depends on how you configure the application, which models you select, and how you access the interface.

Architecture of browsers, Open WebUI, Ollama, local model storage, and an optional HTTPS tunnel.
Open WebUI forwards chat requests to Ollama, which loads and runs local models on the private host.
💻 Local browser access A browser on the host connects to Open WebUI through 127.0.0.1:3000. Open WebUI sends model requests to the Ollama service.
🧠 Local inference When you select a locally downloaded Ollama model (not a cloud model) and no external integration is involved, inference runs on the machine hosting Ollama.
☁️ Ollama cloud models Ollama can also run cloud models on Ollama's servers. In the CLI, a cloud model name ends in :cloud, for example gemma4:cloud. Prompts sent to these models leave the host.
🌐 Remote tunnel access A remote browser reaches a Localtonet server through the assigned public HTTPS address. The Localtonet client keeps an outbound connection that carries requests to Open WebUI.
🔌 Optional external services Cloud model APIs, web search, image generation, tools and similar integrations can send prompts, files, retrieved text or generated content outside the host.

A useful trust-boundary model treats the browser, the Localtonet server, Open WebUI, Ollama, the persistent volumes and every optional integration as separate components. Remote traffic through Localtonet traverses our server infrastructure before it reaches the outbound client connection on your host. TLS for an HTTP tunnel ends at the Localtonet server, and the request then travels through the tunnel to your device. Using a managed relay therefore is not the same as keeping the complete network path on one machine.

Ollama cloud models and local inference

Ollama now runs open models in two ways: locally on your computer, or in Ollama's cloud, where cloud models run on Ollama's servers and need no download. Cloud models require you to sign in with ollama signin or to use an API key, and they need usage credits or a paid plan. Because both kinds of model can appear in the same Ollama installation, selecting a model "through Ollama" does not by itself guarantee local inference.

If you want inference to stay on the host, choose models whose names do not end in :cloud, download them with ollama pull, and do not sign in to Ollama or configure an Ollama API key on that machine. That way a cloud model cannot be selected by accident from the Open WebUI model list.

"Local model" does not guarantee an entirely local workflow

Review each enabled connection, model and tool. A model name ending in :cloud runs on Ollama's servers even though you reach it through your local Ollama. A local model can still be given information returned by an external search service, and any cloud model connection sends requests to that provider. Uploaded documents may also be transmitted if a tool, connector or cloud model processes them. Do not submit sensitive material until you understand every active data path and the applicable provider policies.

Choose between the deployment paths

Path Best fit Important networking detail
Ollama on the host, Open WebUI in Docker Desktop installations, especially when native Ollama has direct access to supported host acceleration The container must be able to reach Ollama on the host. Host addressing and Ollama binding behavior vary by operating system.
Ollama and Open WebUI in Docker Compose A contained, repeatable two-service deployment Open WebUI reaches Ollama over the private Compose network. Ollama does not need a published host port.
Ollama on another trusted LAN host Separating the lightweight interface from a more capable inference machine The Ollama endpoint must be deliberately exposed on the trusted network and restricted by host firewall policy.

This guide publishes Open WebUI on loopback only. Docker syntax such as -p 3000:8080 normally publishes the port on all host interfaces, which can make the application reachable from the local network and possibly from other routed networks, depending on the host firewall. The safer default used below is -p 127.0.0.1:3000:8080.

Plan the host, storage, model, and network

Complete the following checks before downloading a model. Large model files and container images can consume substantial storage, and a model that does not fit available memory may fail to load or run too slowly for interactive use.

Supported host environment

  • Operating system: use a current Linux, macOS or Windows host that is supported by both your Docker distribution and the Ollama release you intend to install.
  • Docker: install Docker Engine with the Compose plugin on a supported Linux host, or a current Docker Desktop release on macOS or Windows.
  • Ollama: the official Ollama download page offers a shell installer for macOS and Linux (curl -fsSL https://ollama.com/install.sh | sh), a PowerShell installer for Windows (irm https://ollama.com/install.ps1 | iex), and a "Download manually" option. Check the minimum operating system version for your platform on that page or in the Ollama documentation before installing, because this guide does not state one.
  • Hardware check: compare the host's GPU and memory against the Ollama GPU documentation before choosing a model.
  • Browser: use a current browser for first-run setup and local verification.
  • Localtonet: remote access requires the Localtonet client installed on the device that can reach the loopback-bound Open WebUI port and connected with an AuthToken. A Random subdomain needs nothing extra. A Custom subdomain or Custom domain requires balance on your account, and a Custom domain also requires a domain added in DNS Manager.

Confirm Docker and Docker Compose work before continuing:

docker version
docker compose version

If either command fails, finish the Docker installation first. On Linux, also verify that the current account has permission to use Docker, or run Docker through the administrative method approved for that host. Membership in a Docker administration group is security-sensitive because it can grant broad control over the machine.

Memory and model selection

Model requirements vary with architecture, parameter count, quantization, context size and runtime overhead. Do not choose a model from its name alone. Check the model's published requirements and select a quantization that fits the available system memory or accelerator memory, with headroom for the operating system, Ollama, Open WebUI and the context cache.

  • Start with a smaller compatible model to validate the installation.
  • Leave memory headroom instead of planning to consume every available gigabyte.
  • Expect longer prompts and larger context windows to require additional memory.
  • Expect CPU-only inference to perform differently from supported GPU acceleration. Ollama notes that large models are slow on a computer without a strong GPU.
  • For local inference, pick a model whose name does not end in :cloud.

Hardware performance cannot be predicted accurately from parameter count alone. Processor generation, memory bandwidth, quantization, context length, accelerator support, thermal limits and concurrent requests all matter. Test the exact model and workload on your own hardware before relying on it for a shared service.

Disk space and persistence

Reserve space for Docker images, the Open WebUI data volume, Ollama model files, uploaded documents, generated indexes, logs and backups. Model storage can be much larger than the Open WebUI application itself. Keep backups on a different disk or system so a single storage failure does not destroy both the active data and its backup.

Docker named volumes survive an ordinary container restart and normally remain after the container is removed. Data stored only in a container's writable layer is at risk when that container is removed or replaced. The volume mounts in this guide preserve application data across container recreation, but they are not a substitute for backups.

Optional GPU support

Native Ollama can use supported host acceleration when the operating system, hardware, drivers and Ollama release are compatible. The Ollama GPU documentation is the reference for which accelerators are supported. Containerized GPU access requires additional runtime configuration. For example, an NVIDIA-based Linux deployment generally needs compatible drivers and the NVIDIA container runtime components before a container can access the GPU.

Validate CPU operation before adding GPU complexity

First prove that Ollama responds, Open WebUI starts and the model connection works. Then configure container GPU access using the current instructions for your hardware vendor, Docker release and Ollama version. Do not copy an unverified Compose GPU block, because the correct syntax and prerequisites differ across platforms.

Install Ollama and verify model inference

Use this section if Ollama will run directly on the host. If you want both components in Docker Compose, you can skip ahead to Path B in the next section.

1

Install the current Ollama package

On macOS or Linux, run the shell installer shown below. On Windows, run the PowerShell installer shown below. If you prefer not to pipe a script into a shell, use the "Download manually" option on the official download page and review the package before installing it.

2

Confirm the Ollama executable is available

Open a new terminal and ask Ollama for its version. If the shell cannot find the command, complete the platform installation or restart the terminal so it picks up the updated environment.

3

Download a compatible local test model

Choose a current model from Ollama's model catalog that fits the host, checked against the GPU and memory guidance. Replace MODEL_NAME in the commands below with that model's exact Ollama name. For local inference, use a name that does not end in :cloud, and do not run ollama signin. Model availability and tags change, so this guide does not hardcode a catalog entry.

4

Run a terminal inference test

Start the model and send a harmless test prompt. Do not install Open WebUI until Ollama can produce a response directly. This separates model or hardware failures from later container networking problems.

5

Check the local Ollama API

Query Ollama's local model endpoint from the host. A response listing models confirms that the service is listening locally. Keep this API private unless another trusted host genuinely needs it.

macOS and Linux installer:

curl -fsSL https://ollama.com/install.sh | sh

Windows installer, run in PowerShell:

irm https://ollama.com/install.ps1 | iex

Version, model and API checks:

ollama --version
ollama pull MODEL_NAME
ollama run MODEL_NAME
curl http://127.0.0.1:11434/api/tags

Exit the interactive model session using the method shown by the installed Ollama version. Keep Ollama running while you configure Open WebUI. When you review the output of ollama list or the API response later, confirm that no entry ends in :cloud if you intend the deployment to be local-only.

Do not publish the Ollama API without a reason

Open WebUI needs to reach Ollama, but remote browsers do not. Avoid router port forwarding and avoid publishing port 11434 to all host interfaces. If Ollama must listen beyond loopback so a Docker bridge or another trusted machine can reach it, restrict access with the host firewall and verify exactly which networks can connect.

Deploy Open WebUI with Docker

Path A: Host-installed Ollama with Open WebUI in one container

This path keeps Ollama native while placing Open WebUI in Docker. The command publishes Open WebUI only on IPv4 loopback, adds a route to the Docker host, stores application data in a named volume, and supplies the Ollama endpoint expected from inside the container.

docker run -d \
  -p 127.0.0.1:3000:8080 \
  --add-host=host.docker.internal:host-gateway \
  -e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
  -v open-webui_data:/app/backend/data \
  --name open-webui \
  --restart unless-stopped \
  ghcr.io/open-webui/open-webui:main

Docker Desktop normally provides the host.docker.internal hostname. The host-gateway mapping supports the same name on compatible Docker Engine installations. This route does not guarantee that Ollama will accept a connection from the container. If Ollama listens only on the host loopback interface, a bridge-network container may still be unable to connect.

When that happens, use the troubleshooting section before changing firewall or bind settings. The safest resolution depends on the operating system. You can either configure the host service to accept traffic from the relevant Docker network while blocking untrusted networks, or use the Compose path so Open WebUI and Ollama communicate on an internal container network.

Image version strategy

The main tag is convenient for an initial test but is a moving target. For repeatable operation, replace it with a specific release tag or immutable digest published by the Open WebUI project after reviewing that release. Record the selected value with your deployment files. Apply the same policy to the Ollama image if you use Compose.

Path B: Open WebUI and Ollama in Docker Compose

This Compose file places both services on the private default Compose network. Open WebUI addresses Ollama by the service name ollama. Ollama has no ports entry, so its API is not published on the host. Only Open WebUI is published, and only on loopback.

services:
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    restart: unless-stopped
    volumes:
      - ollama_data:/root/.ollama

  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    restart: unless-stopped
    depends_on:
      - ollama
    ports:
      - "127.0.0.1:3000:8080"
    environment:
      OLLAMA_BASE_URL: http://ollama:11434
    volumes:
      - open-webui_data:/app/backend/data

volumes:
  ollama_data:
    name: ollama_data
  open-webui_data:
    name: open-webui_data

Save the file as compose.yaml in a dedicated deployment directory. Start the services and inspect their state:

docker compose up -d
docker compose ps
docker compose logs --tail=100 ollama
docker compose logs --tail=100 open-webui

Pull a compatible model inside the Ollama container:

docker compose exec ollama ollama pull MODEL_NAME
docker compose exec ollama ollama run MODEL_NAME

Replace MODEL_NAME with a current Ollama model name selected for your hardware. For local-only inference, choose a name without the :cloud suffix and do not sign the containerized Ollama in to an Ollama account. Test the model in the terminal before opening the web interface.

Review floating tags before production use

Both latest and main can point to newer images over time. They do not update a running container automatically, but the next pull and recreation can change the software. After validating the deployment, pin reviewed release tags or immutable image digests and keep a record of the previously working versions.

Complete first-run setup and verify local operation

Verification panels for Ollama inference, the Open WebUI container, and a local browser chat.
A successful local check confirms Ollama inference, container health and browser access before any tunnel exists.

Do not create a public tunnel yet. Finish the initial account setup and prove that the complete local request path works first.

1

Confirm the port is bound to loopback

Inspect Docker's published ports. The result for Open WebUI should show 127.0.0.1:3000 mapped to the container's port 8080, not 0.0.0.0:3000.

2

Open the local interface

Visit http://127.0.0.1:3000 from a browser on the host. Complete the setup presented by your installed Open WebUI release.

3

Create and protect the administrator account

Use a unique, strong password and confirm which account has administrative privileges. Finish administrator setup while the service remains local. Do not reuse a cloud API password or a Localtonet credential.

4

Confirm that the expected Ollama model is visible

Use the model selector or connection controls displayed by the installed Open WebUI release. Interface labels and paths can change. If no model appears, inspect the configured Ollama base URL and test connectivity from the Open WebUI container. If a model ending in :cloud appears and you did not intend it, remove it and review the Ollama sign-in state.

5

Send a low-sensitivity test prompt

Select the local model and ask a simple question. Confirm that a response is generated and that Ollama logs show the request. Do not use confidential text for the initial test.

6

Verify persistence across container recreation

Restart the service and confirm the administrator account and local test conversation remain available. A normal restart does not remove the volume. The point of this check is to catch an incorrect or missing volume mount before real data accumulates.

docker port open-webui
curl -I http://127.0.0.1:3000
docker logs --tail=100 open-webui
docker restart open-webui

For Compose, use the equivalent service commands:

docker compose ps
docker compose logs --tail=100 open-webui
docker compose restart open-webui

Harden accounts, integrations, files, and host exposure

Open WebUI becomes an application security boundary as soon as it stores conversations, documents, connection details or API credentials. Remote publication increases the importance of authentication and lifecycle discipline.

Control account creation

Create the administrator account before enabling remote access. Review the user-registration controls available in the exact Open WebUI release you installed. If that release provides a public signup setting and you do not need open registration, disable it before publishing the service. If you cannot confirm the registration behavior, keep the service local until you can restrict enrollment or otherwise limit who can reach it.

Environment variable names are release-dependent

Open WebUI can be configured through environment variables, including settings that control signup and the secret key used for sessions. We could not verify the exact variable names for every current release while preparing this guide, so we do not list them here. Look them up in the Open WebUI documentation for the release you pinned, and confirm each setting takes effect by testing signup and login from a private browser window. Store any secret key outside files that are committed to source control.

  • Use a unique administrator password generated and stored through an approved password manager.
  • Do not share one administrator account among several people.
  • Give additional users only the privileges they need.
  • Remove accounts promptly when access is no longer required.
  • Test the logged-out experience from a private browser window before distributing a tunnel address.

Treat integrations as separate trust decisions

Open WebUI releases can support different model connections and optional capabilities. Exact interface paths and provider support can change, so use the documentation that matches your pinned release. An OpenAI-compatible endpoint does not automatically mean every provider's native API is directly compatible. Do not assume that an Anthropic endpoint can be entered into an OpenAI-compatible connection without an explicitly supported adapter or compatibility layer.

Before enabling cloud models (including Ollama cloud models), web search, external image generation, functions, pipelines or custom tools, document:

  • which service receives the request;
  • whether prompts, conversation history, uploaded files or retrieved text are transmitted;
  • which credentials are stored by Open WebUI or by Ollama;
  • who can invoke the integration;
  • what retention and logging rules apply at the external provider;
  • how the integration can be disabled and its credentials revoked.

Protect uploaded documents and credentials

Uploaded content and application configuration reside in the Open WebUI data volume or in other storage configured by the application. Protect the host filesystem, Docker socket, backups and administrator account accordingly. Avoid placing raw API keys in deployment files that are committed to source control, and restrict access to the Compose directory if it contains secrets.

Keep host ports private

Confirm the Open WebUI mapping remains loopback-only. Do not add a host port for the Compose Ollama service unless another host genuinely requires it. If a broader bind is necessary, use host firewall rules to permit only intended source networks and test those rules from both allowed and disallowed machines.

Layer tunnel access controls over Open WebUI login

When you publish Open WebUI through a Localtonet HTTP tunnel, the tunnel settings panel adds controls that act before a request reaches your host. Treat them as defense in depth on top of Open WebUI authentication, never as a replacement for it. You open these settings with the settings button in the Actions column of your tunnel.

Setting What it does How it helps an Open WebUI deployment
Is Only Https? Serves the public URL over HTTPS only and redirects http:// requests to https://. While off, the address answers on both. Turn it on. Open WebUI carries logins and private conversations.
Basic Authentication? Asks visitors for a username and password before the request reaches your service. Adds a second credential prompt in front of the Open WebUI login screen. Test login and chat afterward.
IP Restriction Controls which client IP addresses can access the tunnel. Useful when remote users connect from known, stable addresses.
SSO Providers Visitors sign in with one of your identity providers before they can open the tunnel. The SSO button at the top of the page manages providers. Ties access to an existing identity provider for a team.
Web Application Firewall The WAF button in the Actions column opens WAF Setting and shows whether the firewall is not configured, active or inactive. Adds request filtering in front of the application.
Expiration Date, Speed Limits, Bandwidth Limit Stop the tunnel on a date, cap its speed and cap its data. An expiration date ensures temporary remote access does not stay public by accident.
Request Log, Activity Log, Tunnel Health Inspect requests, review starts, stops and setting changes, and see health checks. Verify who reached the instance and diagnose failures.

The details of each control are described in the access control, single sign-on, WAF, limits and logging pages linked from the Localtonet HTTP tunnel documentation. Enable one layer at a time and repeat the logged-out test after each change, so you know which setting caused any behavior change.

A public URL is an exposure boundary

Anyone who obtains the assigned address can attempt to reach the application unless a tunnel-level control stops them. Open WebUI authentication remains essential. Do not expose an unconfigured first-run screen, a weak administrator account or an instance with uncontrolled signup. Stop the tunnel when remote access is no longer required, or set an Expiration Date.

Add remote access with a Localtonet HTTP tunnel

Remote browsers reaching local Open WebUI through a Localtonet HTTPS tunnel.
The outbound tunnel exposes Open WebUI over HTTPS without forwarding a router port.

Once local operation and authentication are verified, Localtonet can expose the loopback-bound Open WebUI service without inbound router port forwarding, firewall changes, VPN setup or a public IP address. The Localtonet client on the host establishes an outbound connection to a Localtonet server, and the HTTP tunnel gives the local web service a public HTTPS address. Visitors reach it over HTTPS with a certificate that we provide and renew. TLS ends at the Localtonet server, the request travels through the tunnel to your device, and the Localtonet app passes it to Open WebUI. That is why Open WebUI can stay on plain HTTP at 127.0.0.1:3000.

Before you start

  • The Localtonet client is installed on the Open WebUI host and connected with an AuthToken. If it is not, follow the Quick start in the Localtonet documentation. Use the current download and installation instructions there rather than an unverified command or service flag.
  • Open WebUI is running and you know its local port. In this guide that is 3000 on 127.0.0.1.
  • For a Custom subdomain or Custom domain, your account has balance. For a Custom domain, you have also added the domain in DNS Manager.
  • The AuthToken is a device-specific secret. Do not paste it into public command history, screenshots or shared configuration files.

Create and start the tunnel

1

Open the HTTP page

In the dashboard, open My Tunnels › HTTP and select Create HTTP Tunnel to open the form.

2

Choose the URL type

Select Random subdomain for a generated name such as https://<RANDOM_NAME>.localto.net, Custom subdomain for a name you type (letters, digits and hyphens are allowed), or Custom domain for a domain of your own. Custom subdomain needs balance; Custom domain needs balance and a domain in DNS Manager.

3

Choose the device and the region

In Device token, select the token used by the Localtonet app on the Open WebUI host. In Server region, choose a region close to that device for lower latency. Use the regions shown in your dashboard rather than a value copied from another guide.

4

Enter the local address and create the tunnel

Set Domain to localto.net or one of your own domains (for Custom domain the list contains only your domains). Fill in Subdomain only for Custom subdomain. Set Local IP address to 127.0.0.1 and Local port to 3000, then select Create tunnel. The tunnel appears under Your tunnels as Tunnel # followed by its ID.

5

Start the tunnel

Select the start button in the Actions column. When the tunnel runs, its address in the URL column becomes a link. Open it in a browser; requests to that address now reach Open WebUI on your host.

If the Localtonet app for the selected token is offline when you press start, a dialog tells you so. You can start the app, or select Start anyway and the tunnel goes live when the app connects.

How the public address behaves

  • The address is https:// followed by the host name in the URL column. It has no port number, so visitors open it like any other website.
  • An HTTP tunnel keeps its subdomain until you delete the tunnel. Stopping and starting does not change it, so you can stop the tunnel between remote sessions without redistributing a new address.
  • WebSocket connections pass through an HTTP tunnel. This matters because Open WebUI streams model responses to the browser as they are generated.
  • Is HTTP/3 Active? is on for a new tunnel. Turn it off only if a client has trouble with HTTP/3.
  • Your service receives the host name the visitor used, which is the tunnel address. Open WebUI on its own does not normally select a site by host name, but if you place a local reverse proxy in front of it that does, open Headers in the tunnel settings and add a request header named Host with the name your server expects.
  • The documentation describes a warning page that applies on the Free plan. See the warning page section of the HTTP tunnel documentation for how it works.

The Localtonet HTTP tunnel documentation is the companion reference for these fields and settings. The HTTP tunnel dashboard page is an authenticated page and redirects to sign-in when you are not logged in.

Verify the complete remote path

  • Confirm the local address still works before testing the public address.
  • Check that the Localtonet client on the host is connected.
  • Check that the tunnel is running, not merely created: its URL column entry should be a link.
  • Turn on Is Only Https? and confirm that an http:// request redirects to https://.
  • Load the assigned HTTPS address from a different network.
  • Confirm unauthenticated visitors cannot access conversations or administration.
  • Send a harmless prompt and verify the selected local Ollama model streams a response.
  • Open the Request Log to confirm your test requests arrived, and check Tunnel Health.
  • Stop the tunnel and confirm the public endpoint is no longer available when remote access is not needed.
Separate application restarts from tunnel availability

Docker's restart policy controls the containers. It does not prove that the Localtonet client is running or that the tunnel is started. A tunnel is available only while the selected client is connected and the tunnel is running. After a reboot, verify Open WebUI, Ollama, the Localtonet device connection and the tunnel state independently. Do not use undocumented Localtonet service-installation flags.

Operate, back up, update, restore, and remove the stack

Routine health checks

A useful health check covers all layers rather than only the browser page:

docker compose ps
docker compose logs --tail=100 open-webui
docker compose logs --tail=100 ollama
curl -I http://127.0.0.1:3000
docker compose exec ollama ollama list

For the single-container path, replace the Compose log commands with docker logs --tail=100 open-webui and run ollama list on the host. Also test a small model request periodically. A working HTML response does not prove that Open WebUI can reach Ollama or that the selected model can load. While reviewing ollama list, confirm no unintended :cloud model has been added. If the tunnel is published, review the Activity Log for unexpected starts, stops or setting changes.

Back up persistent volumes

Stop the application before making a filesystem-level archive so changing files are not captured in an inconsistent state. The commands below use a temporary Alpine container to archive each named volume into the current directory. They may download the Alpine image if it is not already present.

docker compose stop

docker run --rm \
  -v open-webui_data:/source:ro \
  -v "$PWD":/backup \
  alpine \
  sh -c 'cd /source && tar czf /backup/open-webui-data.tgz .'

docker run --rm \
  -v ollama_data:/source:ro \
  -v "$PWD":/backup \
  alpine \
  sh -c 'cd /source && tar czf /backup/ollama-data.tgz .'

docker compose start

The Ollama volume can be large because it contains model files. You may choose to back up only Open WebUI data and download models again, but document that decision and keep the exact model names and tags needed to reproduce the deployment. Protect archives, because they can contain conversations, uploaded content, account data and configuration.

Test restoration

A backup is not proven until it has been restored in a controlled test. Before a real restore, stop the stack and preserve the current volumes until the recovered service has been verified. Restoring over a nonempty volume can combine incompatible data, so use a clean replacement volume.

Restore commands are destructive when applied to active volume names

Confirm the archive path and volume names before proceeding. Keep the original volume or a verified copy until the restored application starts, accepts login and can read the expected conversations and settings.

A clean Open WebUI volume can be restored with the following pattern after the stack has been stopped and the original volume has been safely retained or renamed through your normal Docker administration process:

docker volume create open-webui_data

docker run --rm \
  -v open-webui_data:/target \
  -v "$PWD":/backup:ro \
  alpine \
  sh -c 'cd /target && tar xzf /backup/open-webui-data.tgz'

Start the stack, inspect logs, open the local interface, and verify accounts and content. Restore the Ollama volume using the same pattern only if you backed it up. Otherwise, pull the recorded model versions again.

Update safely

Read the release notes for both projects before updating. Back up Open WebUI data, record current image references, pull the intended images and recreate the containers. Avoid combining an application update, model change, GPU driver update and remote-access change in one maintenance event, because that makes failures harder to isolate.

docker compose images
docker compose pull
docker compose up -d
docker compose ps
docker compose logs --tail=100 open-webui
docker compose logs --tail=100 ollama

Validate local login, model discovery, a test prompt and persistence before testing the Localtonet address. If you pin release tags, edit the Compose file to the reviewed tags before running docker compose pull. For host-installed Ollama, update it through the same installation method you originally used.

Rollback considerations

Reverting the image tag does not always reverse data migrations. If a new Open WebUI version changes its persistent data format, an older image may not understand the updated volume. A safe rollback uses both the previously working image reference and the pre-update backup. Keep the tunnel stopped while repairing or restoring the application.

Stop or remove the deployment

Stop the Localtonet tunnel first so maintenance pages or first-run screens are not exposed. Then stop the containers:

docker compose stop

Remove containers and the Compose network while preserving named volumes:

docker compose down

Remove the single-container deployment while retaining its named volume:

docker stop open-webui
docker rm open-webui

Do not use docker compose down -v or delete the named volumes unless you intentionally want to destroy stored application data and Ollama models. Verify backups before permanent deletion. If you no longer need remote access at all, delete the tunnel in the dashboard; note that deleting it releases its subdomain.

Troubleshoot startup, models, networking, and remote access

The Open WebUI container exits or keeps restarting

Inspect its state and logs rather than repeatedly recreating it:

docker ps -a
docker inspect open-webui
docker logs --tail=200 open-webui

Common causes include an unavailable image, invalid environment syntax, a port conflict, insufficient disk space and volume permission problems. For Compose, run docker compose config to render and validate the effective configuration, then inspect the logs for both services. If the image fails to pull, check that the name is exactly ghcr.io/open-webui/open-webui; text copied from rich editors can carry invisible characters that break image, container and volume names.

Port 3000 is already in use

Another process or container may already own the port. Identify the conflict using the host's normal networking tools or inspect Docker port mappings. You can choose a different loopback host port, such as 127.0.0.1:3001:8080, but then update the browser address and the tunnel's Local port consistently. The Local port can be changed under Tunnel Details in the tunnel settings panel.

Do not solve the conflict by removing 127.0.0.1 from the mapping. That would broaden network exposure rather than resolve the underlying issue.

Open WebUI loads but shows no Ollama models

First prove the model exists:

ollama list

For containerized Ollama:

docker compose exec ollama ollama list
docker compose logs --tail=200 ollama

Then test the configured path from Open WebUI. In the Compose deployment, service-name resolution should point to http://ollama:11434. In the host-installed deployment, the intended endpoint is http://host.docker.internal:11434. A model installed in host Ollama does not automatically appear in a separate containerized Ollama volume, and the reverse is also true.

The container cannot reach host-installed Ollama

Verify that the special host name resolves inside the container:

docker exec open-webui getent hosts host.docker.internal

If name resolution works but the connection is refused, Ollama may be listening only on the host loopback interface. Review the current Ollama documentation for the supported bind configuration on your operating system. If you broaden the bind address, restrict the resulting network access with the firewall. Alternatively, switch to the Compose architecture so the services communicate privately without exposing the Ollama API on the host.

Volume permission or storage errors appear

Check Docker's free space, the host filesystem's free space and volume details:

docker system df
docker volume inspect open-webui_data
docker volume inspect ollama_data

Do not recursively change ownership inside a volume without identifying the user expected by the image. An incorrect ownership change can make the problem worse or expose sensitive files. Preserve a backup before attempting repairs.

GPU acceleration is unavailable

Compare your hardware with the Ollama GPU documentation and confirm the installed Ollama build supports the platform. For containerized Ollama, also confirm Docker has access to the accelerator through the current vendor-supported runtime. Review Ollama logs for fallback or initialization messages. CPU inference may still work, which helps separate model and networking issues from accelerator configuration.

A model responds quickly but you expected local inference

Check the exact model name selected in Open WebUI. A name ending in :cloud runs on Ollama's servers. Remove that model if you want local-only inference, pull a local model instead, and review whether Ollama on this host has been signed in to an account or configured with an API key.

Local access works but remote login fails

Test the assigned public address in a private browser window. If the page loads but authentication fails, inspect Open WebUI logs and verify the account works through http://127.0.0.1:3000. Change one setting at a time. Confirm browser cookies are accepted for the assigned HTTPS origin and that you are using the exact current address from the URL column. If you recently enabled Basic Authentication, IP Restriction, SSO Providers or the WAF, disable that layer temporarily to see whether it is the cause, then re-enable it once you understand the interaction.

The Localtonet address is unavailable

Check the layers in order:

  1. Open http://127.0.0.1:3000 on the host.
  2. Confirm the Open WebUI container is running.
  3. Confirm the Localtonet client on the host is connected.
  4. Confirm the tunnel's Device token is the token used by that client.
  5. Confirm the tunnel's Local IP address is 127.0.0.1 and its Local port is 3000.
  6. Confirm the tunnel was started with the start button in the Actions column and that its URL column entry is a link.
  7. Check whether an Expiration Date or Bandwidth Limit has stopped the tunnel.
  8. Use the exact HTTPS address shown in the URL column.

A tunnel stops being available when the selected client disconnects or the tunnel is stopped. Docker restart settings do not change that lifecycle. If the tunnel cannot connect with the normal method, the Legacy Connect? setting connects it with the legacy method; changing it on a running tunnel restarts the tunnel, so the app must be connected.

Requests fail, stall or streamed responses are cut off remotely

Open the Request Log to see whether the failing requests reached the tunnel and what response they received, and check Tunnel Health for failed health checks. If one particular browser or network has trouble while others work, turn off Is HTTP/3 Active? and test again. If long model generations stop before completing, the server may be waiting longer than allowed for a response from your local application. The HTTP Timeout setting controls how long the server waits, from 1 to 600 seconds. Raise it to suit your slowest expected generation rather than to the maximum by default.

The interface works but responses are slow

Compare a terminal request through Ollama with the same model through Open WebUI. If both are slow, investigate model size, available memory, context length, CPU or GPU utilization and accelerator support. If only remote access is affected, compare local and remote browser tests, check that the Server region is close to the host, and inspect the host's network connection. Also confirm that no Speed Limits are set on the tunnel. Do not assume a fixed tunnel latency or performance level, because network paths, region selection, host load and response size vary.

Frequently asked questions

Does self-hosting Open WebUI keep every prompt and file on my machine?

Not necessarily. Inference stays on the Ollama host only when you select a locally downloaded model and no external integration processes the request. Ollama also offers cloud models, whose names end in :cloud (for example gemma4:cloud); these run on Ollama's servers and require sign-in with ollama signin or an API key, plus usage credits or a paid plan. To keep inference on the host, choose non-cloud models and do not sign in. Cloud model APIs, web search, external image generation, tools and other connectors can also transmit prompts, files, retrieved text or generated content to third parties. Remote requests through Localtonet traverse a Localtonet server, where TLS ends, on their way to the outbound client connection.

Why bind Open WebUI to 127.0.0.1 instead of publishing port 3000 normally?

A mapping such as 3000:8080 normally publishes the service on all host interfaces. Using 127.0.0.1:3000:8080 restricts the default exposure to the host's loopback interface. The Localtonet client running on that host can still forward the local service without making port 3000 directly reachable from the LAN.

Should I publish Ollama port 11434 in Docker Compose?

Not for the two-container setup in this guide. Open WebUI reaches Ollama through the private Compose network using http://ollama:11434. Publish Ollama's API only when another host genuinely needs it, and then restrict access with appropriate firewall rules.

Will restarting the Open WebUI container delete my conversations?

A normal restart does not delete the named volume. Data becomes vulnerable when it exists only in the container's writable layer and the container is removed or replaced. Mounting /app/backend/data to the named open-webui_data volume preserves that data across container recreation, but you should still create separate backups.

Can Open WebUI use local and cloud models together?

Open WebUI releases can support Ollama and additional model connections, including supported OpenAI-compatible endpoints, and Ollama itself can offer both local and :cloud models. Exact provider support and configuration paths depend on the installed release. Do not assume that a provider's native API, including Anthropic's native API, is directly interchangeable with an OpenAI-compatible endpoint. Verify the connection type against current Open WebUI documentation, and remember that cloud requests leave the host.

Why does Open WebUI show no models even though Ollama has one installed?

Open WebUI may be connected to a different Ollama instance or may not be able to reach the configured endpoint. Host-installed Ollama and containerized Ollama have separate model stores. Verify the model with ollama list in the correct environment, check OLLAMA_BASE_URL, and inspect both Open WebUI and Ollama logs.

Do Localtonet access controls replace the Open WebUI login?

No. Is Only Https?, Basic Authentication, IP Restriction, SSO Providers, the Web Application Firewall and an Expiration Date add layers in front of the application, but Open WebUI authentication and controlled signup remain essential. Use the tunnel controls as defense in depth and confirm the result with the Request Log.

Does my tunnel address change when I stop and start it, or after a reboot?

An HTTP tunnel keeps its subdomain until you delete the tunnel; stopping and starting does not change it. Availability is a separate question: the tunnel works only while the selected Localtonet client is connected and the tunnel is running. A Docker restart policy applies only to the containers, so after a reboot verify Open WebUI, Ollama, the Localtonet device connection and the tunnel state separately.

Can several people use the same self-hosted instance?

Multi-user behavior and administration options depend on the installed Open WebUI release. Even when multiple accounts are supported, practical concurrency depends on the model, available memory, accelerator resources and Ollama's current scheduling behavior. Test simultaneous workloads on your own hardware, use separate accounts, and restrict public signup before remote publication.

Make your locally hosted AI interface available when you need it

Verify Open WebUI and Ollama locally with non-cloud models, protect the administrator account, and then create a Localtonet HTTP tunnel to 127.0.0.1:3000. Turn on Is Only Https?, add the access controls that fit your users, start the tunnel for remote sessions and stop it when public access is no longer required.

Get Started Free →

Corrections & updates

Substantive changes approved by the Localtonet editorial team are listed transparently below.

Corrected broken Open WebUI commands, updated Ollama install steps, added Ollama cloud model privacy notes, and aligned tunnel steps and access controls with current Localtonet docs.

Reviewed and updated for accuracy and completeness.

Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.

Support