Add missing files & use Docusaurus admonitions

This commit is contained in:
Self Denial
2024-04-10 22:54:43 -06:00
parent 0b34aee0dc
commit 5f5fd258e5
3 changed files with 254 additions and 8 deletions

View File

@@ -0,0 +1,33 @@
# Environment Variable Configuration
## App/Backend ##
Here is a list of supported enviornment variables ready by `backend/config.py` intended to provide Open WebUI configuration. See also the [logging environment variables](/getting-started/logging#appbackend).
| Environment Variable | App/Backend |
| --------------------------------- | --------------------------------------------------------------------------- |
| `CUSTOM_NAME` | Sets `WEBUI_NAME` but polls _api.openwebui.com_ for metadata |
| `DEFAULT_MODELS` | Set a default Language Model, default: `None` |
| `ENABLE_SIGNUP` | Toggle user account creation, default: `"True"` |
| `ENV` | Environment setting, default: `"dev"` |
| `K8S_FLAG` | Support Kubernetes style Ollama hostname `.svc.cluster.local` |
| `MODEL_FILTER_ENABLED` | Toggle Language Model filtering, default: `"False"` |
| `MODEL_FILTER_LIST` | Set Language Model filter list |
| `OLLAMA_API_BASE_URL` | Deprecated, see `OLLAMA_BASE_URL` |
| `OLLAMA_BASE_URL` | Configure Ollama backend URL, default: `"http://localhost:11434"` |
| `OLLAMA_BASE_URLS` | Configure load balanced Ollama backend hosts, see `OLLAMA_BASE_URL` |
| `OPENAI_API_KEY` | Set OpenAI API key |
| `OPENAI_API_KEYS` | Support multiple Open API keys |
| `OPENAI_API_BASE_URL` | Configure OpenAI base API URL |
| `OPENAI_API_BASE_URLS` | Support balanced OpenAI base API URLs |
| `RAG_EMBEDDING_MODEL` | Configure a Sentence-Transformer model, default: `"all-MiniLM-L6-v2"` |
| `RAG_EMBEDDING_MODEL_AUTO_UPDATE` | Toggle automatic update of the Sentence-Transformer model, default: `False` |
| `USE_CUDA_DOCKER` | Build docker image with NVIDIA CUDA support, default: `False` |
| `USE_OLLAMA_DOCKER` | Build Docker image with bundled Ollama instance, default: `"false"` |
| `USER_PERMISSIONS_CHAT_DELETION` | Toggle user permission to delete chats, default: `"True"` |
| `WEBHOOK_URL` | Set webhook for integration with Slack/Microsoft Teams |
| `WEBUI_AUTH_TRUSTED_EMAIL_HEADER` | Define trusted request header for authentication |
| `WEBUI_NAME` | Main WebUI name, default: `"Open WebUI"` |
| `WEBUI_SECRET_KEY` | Override randomly generated string used for JSON Web Token |
| `WEBUI_VERSION` | Override WebUI version, default: `"v1.0.0-alpha.100"` |
| `WHISPER_MODEL_AUTO_UPDATE` | Toggle automatic update of the Whisper model, default: `False` |

View File

@@ -174,11 +174,13 @@ For more details on networking in Docker and addressing common connectivity issu
<details>
<summary>Rootless (Podman) local-only Open WebUI with Systemd service and auto-update</summary>
> [!IMPORTANT]
> Consult the Docker documentation because much of the configuration and syntax is interchangeable with [Podman](https://github.com/containers/podman). See also [rootless_tutorial](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md). This example requires the [slirp4netns](https://github.com/rootless-containers/slirp4netns) network backend to facilitate server listen and Ollama communication over localhost only.
:::note
Consult the Docker documentation because much of the configuration and syntax is interchangeable with [Podman](https://github.com/containers/podman). See also [rootless_tutorial](https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md). This example requires the [slirp4netns](https://github.com/rootless-containers/slirp4netns) network backend to facilitate server listen and Ollama communication over localhost only.
:::
> [!WARNING]
> Rootless container execution with Podman (and Docker/ContainerD) does **not** support [AppArmor confinment](https://github.com/containers/podman/pull/19303). This may increase the attack vector due to [requirement of user namespace](https://rootlesscontaine.rs/caveats). Caution should be exercised and judement (in contrast to the root daemon) rendered based on threat model.
:::warning
Rootless container execution with Podman (and Docker/ContainerD) does **not** support [AppArmor confinment](https://github.com/containers/podman/pull/19303). This may increase the attack vector due to [requirement of user namespace](https://rootlesscontaine.rs/caveats). Caution should be exercised and judement (in contrast to the root daemon) rendered based on threat model.
:::
1. Pull the latest image:
```bash
@@ -186,8 +188,9 @@ For more details on networking in Docker and addressing common connectivity issu
```
2. Create a new container using desired configuration:
> [!NOTE]
> `-p 127.0.0.1:3000:8080` ensures that we listen only on localhost, `--network slirp4netns:allow_host_loopback=true` permits the container to access Ollama when it also listens strictly on localhost. `--add-host=ollama.local:10.0.2.2 --env 'OLLAMA_BASE_URL=http://ollama.local:11434'` adds a hosts record to the container and configures open-webui to use the friendly hostname. `10.0.2.2` is the default slirp4netns address used for localhost mapping. `--env 'ANONYMIZED_TELEMETRY=False'` isn't necessary since Chroma telemetry has been disabled in the code but is included as an example.
:::note
`-p 127.0.0.1:3000:8080` ensures that we listen only on localhost, `--network slirp4netns:allow_host_loopback=true` permits the container to access Ollama when it also listens strictly on localhost. `--add-host=ollama.local:10.0.2.2 --env 'OLLAMA_BASE_URL=http://ollama.local:11434'` adds a hosts record to the container and configures open-webui to use the friendly hostname. `10.0.2.2` is the default slirp4netns address used for localhost mapping. `--env 'ANONYMIZED_TELEMETRY=False'` isn't necessary since Chroma telemetry has been disabled in the code but is included as an example.
:::
```bash
podman create -p 127.0.0.1:3000:8080 --network slirp4netns:allow_host_loopback=true --add-host=ollama.local:10.0.2.2 --env 'OLLAMA_BASE_URL=http://ollama.local:11434' --env 'ANONYMIZED_TELEMETRY=False' -v open-webui:/app/backend/data --label io.containers.autoupdate=registry --name open-webui ghcr.io/open-webui/open-webui:main
@@ -222,8 +225,9 @@ For more details on networking in Docker and addressing common connectivity issu
podman auto-update --dry-run
```
> [!NOTE]
> This process is compatible with Windows 11 WSL deployments when using Ollama within the WSL environment or using the Ollama Windows Preview. When using the native Ollama Windows Preview version, one additional step is required: enable [mirrored networking mode](https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking).
:::tip
This process is compatible with Windows 11 WSL deployments when using Ollama within the WSL environment or using the Ollama Windows Preview. When using the native Ollama Windows Preview version, one additional step is required: enable [mirrored networking mode](https://learn.microsoft.com/en-us/windows/wsl/networking#mirrored-mode-networking).
:::
### Enabling Windows 11 mirrored networking