RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Fredoline Eruo
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /How-to
  5. /How to enable authentication in Open WebUI
HOW-TO · SET

How to enable authentication in Open WebUI

intermediate·10 min·By Fredoline Eruo
Target environment
Ubuntu 24.04 · Ollama 0.4.xWindows 11 · Ollama 0.4.xmacOS 15 · Ollama 0.4.x
PREREQUISITES

Open WebUI installed and accessible

What this does

Enables user registration and login so that access to the local AI interface is restricted to authenticated users only. After completion, all traffic passes through a secure session-based login flow.

Steps

  1. Stop the Open WebUI service. The service must be halted before editing configuration to avoid overwriting changes on restart.

    docker stop open-webui
    

    Expected output: Container name returned, confirming it stopped.

  2. Add authentication environment variables. Set WEBUI_AUTH_ENABLED=true to activate the built-in auth module.

    docker run -d -p 3000:8080 \
      -e WEBUI_AUTH_ENABLED=true \
      --name open-webui \
      ghcr.io/open-webui/open-webui:main
    

    Expected output: Container starts with authentication active.

  3. Create the first admin account. Navigate to the web interface and register the initial user. This user becomes the admin.

  4. Adjust registration policy (optional). In Settings > Admin Panel > Security, toggle whether new signups require admin approval.

Verification

curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/
# Expected: 200 (redirects to /auth/login if auth is active)

Common failures

  • Auth variable not set — Environment variable not passed to the container. Double-check the -e flag placement.
  • Port 3000 already in use — Another service occupies the port. Map to a different port with -p 8080:8080.
  • Login page not rendering — Reverse proxy or firewall rules block the path. Ensure WebSocket headers are passed.
  • First user not admin — This occurs when auth was previously disabled and a database already exists. Reset the SQLite database.

Operator checkpoint

Before treating this as solved, write down the local runtime, model or package version, hardware/backend if relevant, and the verification output. This keeps the guide useful as a Will-It-Run style decision instead of a one-off command transcript.

Related guides

  • How to install Open WebUI with Docker
  • How to set up Open WebUI admin account
  • Course Local AI Fundamentals
RELATED GUIDES
SET
How to set up Open WebUI admin account
SET
How to install Open WebUI with Docker
← All how-to guidesCourses →