PortGate

Blueprints · Docker & Databases

Production 15 min · Docker

Open WebUI on localhost

Publishes Open WebUI on 127.0.0.1. Point it at Ollama on 127.0.0.1:11434 from the container network you intend, not at a public address.

Why this should not be public

The first account created in a fresh Open WebUI becomes the admin, so a new public instance belongs to whoever reaches it first. It also stores chat history and the API keys of connected models.

Live config

Baked-in protections

Step 1 · yaml

Compose file

/opt/open-webui-loopback/compose.yaml

Written under the compose directory. It is not started. The image tag is the release this blueprint was checked with: look at the project's release notes and use the newest patched tag.

services:
  app:
    image: ghcr.io/open-webui/open-webui:v0.3.35
    ports:
      - "127.0.0.1:8080:8080"
    security_opt:
      - no-new-privileges:true
    restart: unless-stopped

Step 2 · bash

Start script

/opt/open-webui-loopback/up.sh

Review the image tag and the password, then run this yourself.

#!/bin/sh
set -eu
cd "/opt/open-webui-loopback"
if grep -q 'change-me' compose.yaml; then
  echo "Replace change-me before starting."
  exit 1
fi
docker compose up -d

Step 3 · bash

Read-only check

/root/portgate-blueprints/open-webui-loopback-check.sh

Prints status. It does not change the service.

#!/bin/sh
set -eu
if command -v docker >/dev/null 2>&1; then
  docker ps --format '{{.Names}} {{.Ports}}' || echo "Docker is installed but the daemon did not answer."
else
  echo "Docker is not installed. The compose file is staged only."
fi