webui / README.md
Nerdur's picture
Upload 9 files
a76c39e verified
|
Raw
History Blame Contribute Delete
3.5 kB
---
title: Open WebUI
emoji: 🤖
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
app_port: 8080
---
# Open WebUI on Hugging Face Spaces
This Space is configured to keep secrets out of the image, restore data from a Hugging Face dataset backup, and auto-register OpenAI-compatible providers at startup.
## What you need to set
Put sensitive values in `Secrets`.
Put non-sensitive values in `Variables`.
If you want the simplest setup, you can also put everything in `Secrets`.
## Secrets
Required:
```text
WEBUI_ADMIN_EMAIL
WEBUI_ADMIN_PASSWORD
WEBUI_ADMIN_NAME
WEBUI_SECRET_KEY
```
Provider secrets:
```text
GROQ_API_KEY
CEREBRAS_API_KEY
POLLINATIONS_API_KEY
HF_INFERENCE_TOKEN
CLOUDFLARE_API_TOKEN
CLOUDFLARE_ACCOUNT_ID
GITHUB_TOKEN
OPENAI_API_KEY
ANTHROPIC_API_KEY
GOOGLE_API_KEY
MISTRAL_API_KEY
COHERE_API_KEY
DEEPSEEK_API_KEY
TOGETHER_API_KEY
NVIDIA_API_KEY
SAMBANOVA_API_KEY
OPENROUTER_API_KEY
FIREWORKS_API_KEY
XAI_API_KEY
TAVILY_API_KEY
OMDB_API_KEY
```
Backup secrets:
```text
HF_BACKUP_REPO
HF_TOKEN
```
## Variables
Recommended:
```text
HF_BACKUP_INTERVAL_SECONDS=60
```
Optional:
```text
OPENAI_API_BASE_URL=https://api.openai.com/v1
DEFAULT_PINNED_MODELS=pollinations/kimi
TASK_MODEL_EXTERNAL=pollinations/kimi
```
## Provider endpoints used by startup script
```text
Groq https://api.groq.com/openai/v1
Cerebras https://api.cerebras.ai/v1
Pollinations https://gen.pollinations.ai/v1
Hugging Face https://router.huggingface.co/v1
GitHub Models https://models.github.ai/inference
Cloudflare AI https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/ai/v1
OpenAI https://api.openai.com/v1
Anthropic https://api.anthropic.com/v1
Google Gemini https://generativelanguage.googleapis.com/v1beta/openai
Mistral https://api.mistral.ai/v1
Cohere https://api.cohere.ai/compatibility/v1
DeepSeek https://api.deepseek.com/v1
Together AI https://api.together.xyz/v1
NVIDIA https://integrate.api.nvidia.com/v1
SambaNova https://api.sambanova.ai/v1
OpenRouter https://openrouter.ai/api/v1
Fireworks https://api.fireworks.ai/inference/v1
xAI https://api.x.ai/v1
Tavily https://api.tavily.com
```
## Pollinations
Pollinations works without a key for anonymous calls.
If `POLLINATIONS_API_KEY` is empty, the Space still configures:
```text
https://gen.pollinations.ai/v1
```
Recommended model for coding:
```text
pollinations/kimi
```
## Backup
Backup uses the Hugging Face dataset repo named in `HF_BACKUP_REPO`.
Example:
```text
HF_BACKUP_REPO=Nerdur/webui-backup
```
The backup stores the main Open WebUI database as:
```text
webui.db
```
Default backup interval:
```text
HF_BACKUP_INTERVAL_SECONDS=300
```
Suggested value for frequent backups:
```text
HF_BACKUP_INTERVAL_SECONDS=60
```
## Setup order
1. Add all required secrets.
2. Add `HF_BACKUP_REPO` and `HF_TOKEN` if you want restore/backup.
3. Add `HF_BACKUP_INTERVAL_SECONDS` in Variables if you want frequent backups.
4. Add `DEFAULT_PINNED_MODELS=pollinations/kimi` if you want Pollinations as the default coding model.
5. Redeploy the Space.
## Notes
- The container disk is ephemeral.
- The repo auto-restores the backup on startup if backup secrets are set.
- The repo auto-registers provider endpoints on startup if the relevant secrets are present.
- If a provider secret is missing, that provider is skipped.