Open WebUI on SovereignEG
Goal: run a ChatGPT-style web chat on your own machine that uses SovereignEG models.
Time: 10 minutes. Needs: Docker.
Open WebUI is a self-hosted chat UI. It can talk to any OpenAI-compatible API, so you point it at SovereignEG and every model your plan allows appears in the model picker.
Step 1 — Start Open WebUI (one command)
docker run -d -p 3000:8080 \
--name open-webui --restart always \
-v open-webui:/app/backend/data \
-e WEBUI_SECRET_KEY="$(openssl rand -hex 32)" \
-e OPENAI_API_BASE_URL="https://backend.sovereigneg.com/v1" \
-e OPENAI_API_KEY="sk-YOUR_SOVEREIGNEG_KEY" \
-e ENABLE_OLLAMA_API=false \
ghcr.io/open-webui/open-webui:mainPowerShell (Windows) — same thing on one line:
docker run -d -p 3000:8080 --name open-webui --restart always -v open-webui:/app/backend/data -e WEBUI_SECRET_KEY="change-me-to-a-long-random-string" -e OPENAI_API_BASE_URL="https://backend.sovereigneg.com/v1" -e OPENAI_API_KEY="sk-YOUR_SOVEREIGNEG_KEY" -e ENABLE_OLLAMA_API=false ghcr.io/open-webui/open-webui:mainWhat the variables do:
| Variable | Meaning |
|---|---|
OPENAI_API_BASE_URL | https://backend.sovereigneg.com/v1 |
OPENAI_API_KEY | Your sk-... key |
ENABLE_OLLAMA_API=false | Turns off the local-Ollama tab you do not need |
WEBUI_SECRET_KEY | Signs login sessions; keep it the same across restarts |
Step 2 — Open it and create the admin
- Go to http://localhost:3000.
- Sign up. The first account becomes the admin.
- Pick a model from the dropdown at the top (for example
SovereignEG/Qwen3.8-27B-FP8) and say hello.
Step 3 — Or add SovereignEG from the UI instead of env vars
Avatar (bottom-left) → Admin Panel → Settings → Connections (newer builds: Settings → Admin → Connections) → Manage OpenAI API Connections → +:
- URL:
https://backend.sovereigneg.com/v1 - Key:
sk-... - Click the refresh icon to verify → Save.
The model list is fetched from /v1/models, so you see exactly what your key is allowed to use.
Step 4 — Turn on document chat (RAG) through SovereignEG
By default Open WebUI runs a local SentenceTransformers embedding model (all-MiniLM-L6-v2) inside the container, which costs CPU and up to ~1 GB RAM. Use SovereignEG embeddings instead — lighter, and metered like any other request:
-e RAG_EMBEDDING_ENGINE=openai \
-e RAG_OPENAI_API_BASE_URL="https://backend.sovereigneg.com/v1" \
-e RAG_OPENAI_API_KEY="sk-YOUR_SOVEREIGNEG_KEY" \
-e RAG_EMBEDDING_MODEL="embeddinggemma-300m" \
-e RAG_EMBEDDING_BATCH_SIZE=100 \Add those lines to the docker run command (or set them in Admin Panel → Settings → Documents). Then upload a PDF with the + in the chat box and ask questions about it.
Keep RAG_EMBEDDING_BATCH_SIZE=100. Open WebUI's default is one embeddings request per chunk, all sent at once: a 20-page PDF becomes 60+ requests in the same second, which is more than the default plan's 60 requests per minute, and Open WebUI does not retry a 429, so the upload fails. Batches of 100 turn that into one request.
Step 5 — Lock it down (optional, but do it if others can reach the port)
-e ENABLE_SIGNUP=false \
-e ENABLE_PERSISTENT_CONFIG=false \ENABLE_SIGNUP=false— no new accounts after yours.ENABLE_PERSISTENT_CONFIG=false— env vars stay authoritative; otherwise a setting saved in the UI silently overrides later env changes.
Update / stop / remove
docker pull ghcr.io/open-webui/open-webui:main && docker rm -f open-webui && <same docker run command>
docker stop open-webui # stop
docker rm -f open-webui # remove (chats stay in the open-webui volume)Troubleshooting
| Problem | Fix |
|---|---|
| Model dropdown is empty | Wrong key or URL. Test: curl -H "Authorization: Bearer sk-..." https://backend.sovereigneg.com/v1/models |
| "OpenAI: Network Problem" | The URL must end with /v1 and have no trailing slash |
| Container never gets healthy / uses 1 GB RAM | Local embeddings downloading — set RAG_EMBEDDING_ENGINE=openai (Step 4) |
| Changed an env var but nothing happened | UI settings override env; set ENABLE_PERSISTENT_CONFIG=false or change it in the Admin Panel |
Next: OpenCode