diff --git a/docs/features/access-security/interface/banners.md b/docs/features/access-security/interface/banners.md index c6de17b8..b6d9c2ae 100644 --- a/docs/features/access-security/interface/banners.md +++ b/docs/features/access-security/interface/banners.md @@ -16,7 +16,7 @@ You can configure banners in two ways: through the Admin Panel for a user-friend This is the most straightforward way to manage banners. 1. **Log in** to your Open WebUI instance as an administrator. -2. Navigate to the **Admin Panel** > **Settings** > **Interface**. +2. Navigate to the **Admin Panel** > **Settings** > **General**. 3. Locate the **"Banners"** section. 4. Click the **+** icon to add a new banner. diff --git a/docs/features/extensibility/plugin/development/events.mdx b/docs/features/extensibility/plugin/development/events.mdx index 14de486c..cad37472 100644 --- a/docs/features/extensibility/plugin/development/events.mdx +++ b/docs/features/extensibility/plugin/development/events.mdx @@ -120,7 +120,7 @@ Below is a comprehensive table of **all supported `type` values** for events, al | `source`,
`citation` | Add a source/citation, or code execution result | For code: See [below.](/features/extensibility/plugin/development/events#source-or-citation-and-code-execution) | | `notification` | Show a notification ("toast") in the UI | `{type: "info" or "success" or "error" or "warning", content: "..."}` | | `confirmation`
(needs `__event_call__`) | Ask for confirmation (OK/Cancel dialog) | `{title: "...", message: "..."}` | -| `input`
(needs `__event_call__`) | Request simple user input ("input box" dialog) | `{title: "...", message: "...", placeholder: "...", value: ...}` | +| `input`
(needs `__event_call__`) | Request simple user input ("input box" dialog) | `{title: "...", message: "...", placeholder: "...", value: ..., type: "password"}` (type is optional) | | `execute`
(needs `__event_call__`) | Request user-side code execution and return result | `{code: "...javascript code..."}` | | `chat:message:favorite` | Update the favorite/pin status of a message | `{"favorite": bool}` | @@ -375,6 +375,28 @@ await __event_emitter__( ) ``` +#### Masked / Password Input + +To hide sensitive input (e.g., API keys, passwords), set `type` to `"password"` in the data payload. The input field will be rendered as a masked password input with a show/hide toggle: + +```python +result = await __event_call__( + { + "type": "input", + "data": { + "title": "Enter API Key", + "message": "Your API key is required for this integration.", + "placeholder": "sk-...", + "type": "password" + } + } +) +``` + +:::tip +This uses the same `SensitiveInput` component used for user valve password fields, providing a familiar "eye" icon toggle for showing/hiding the value. +::: + --- ### `execute` (**requires** `__event_call__`) diff --git a/docs/getting-started/advanced-topics/index.md b/docs/getting-started/advanced-topics/index.md new file mode 100644 index 00000000..a5f0c5bc --- /dev/null +++ b/docs/getting-started/advanced-topics/index.md @@ -0,0 +1,13 @@ +--- +sidebar_position: 500 +title: "Advanced Topics" +--- + +# Advanced Topics + +This section covers advanced deployment and operational topics for Open WebUI. + +## Guides + +- **[Scaling Open WebUI](/getting-started/advanced-topics/scaling)** — Scale from a single instance to a production-ready multi-replica deployment with PostgreSQL, Redis, shared storage, and observability. +- **[Logging Configuration](/getting-started/advanced-topics/logging)** — Configure log levels, debug output, and structured JSON logging for production environments. diff --git a/docs/getting-started/advanced-topics/logging.md b/docs/getting-started/advanced-topics/logging.md index ace9159c..9fe25275 100644 --- a/docs/getting-started/advanced-topics/logging.md +++ b/docs/getting-started/advanced-topics/logging.md @@ -85,5 +85,49 @@ Setting `GLOBAL_LOG_LEVEL` configures the root logger in Python, affecting all l **Impact:** Setting `GLOBAL_LOG_LEVEL` to `DEBUG` will produce the most verbose logs, including detailed information that is helpful for development and troubleshooting. For production environments, `INFO` or `WARNING` might be more appropriate to reduce log volume. +### 📋 JSON Logging (`LOG_FORMAT`) + +For production environments using log aggregators (Loki, Fluentd, CloudWatch, Datadog, etc.), Open WebUI supports structured JSON logging. Set the `LOG_FORMAT` environment variable to `json` to switch all stdout logging to single-line JSON objects. + +**How to Enable:** + +- **Docker Parameter:** + + ```bash + --env LOG_FORMAT="json" + ``` + +- **Docker Compose (`docker-compose.yml`):** + + ```yaml + environment: + - LOG_FORMAT=json + ``` + +**JSON Log Fields:** + +| Field | Description | +|-------|-------------| +| `ts` | ISO 8601 timestamp | +| `level` | Log level (`debug`, `info`, `warn`, `error`, `fatal`) | +| `msg` | Log message | +| `caller` | Source location (`module:function:line`) | +| `extra` | Additional context data (if any) | +| `error` | Error details (if applicable) | +| `stacktrace` | Stack trace (if applicable) | + +**Example Output:** + +```json +{"ts": "2026-02-22T20:14:53.386+00:00", "level": "info", "msg": "GLOBAL_LOG_LEVEL: INFO", "caller": "open_webui.env"} +{"ts": "2026-02-22T20:15:02.245+00:00", "level": "info", "msg": "Context impl SQLiteImpl.", "caller": "alembic.runtime.migration"} +``` + +:::info +- Default behavior (no `LOG_FORMAT` set) is unchanged — plain-text output +- The ASCII banner is suppressed when `LOG_FORMAT=json` to keep the log stream parseable +- JSON logging covers both early startup logs (stdlib `logging`) and runtime logs (Loguru) +::: + By understanding and utilizing these logging mechanisms, you can effectively monitor, debug, and gain insights into your Open WebUI instance. diff --git a/docs/reference/env-configuration.mdx b/docs/reference/env-configuration.mdx index f8700ab4..a29cf6b2 100644 --- a/docs/reference/env-configuration.mdx +++ b/docs/reference/env-configuration.mdx @@ -548,17 +548,13 @@ WEBUI_BANNERS="[{\"id\": \"1\", \"type\": \"warning\", \"title\": \"Your message - Type: `list` of `dict` - Default: `[]` (which means to use the built-in default prompt suggestions) -- Description: List of prompt suggestions. The format for prompt suggestions are: +- Description: Sets global default prompt suggestions shown to users when starting a new chat. These apply when no model-specific prompt suggestions are configured. Prompt suggestions can also be configured per-model via the Model Editor (see [Prompt Suggestions](/features/ai-knowledge/models#prompt-suggestions)), or globally for all models using the [Global Model Defaults](/features/ai-knowledge/models#global-model-defaults) feature. The format is: ```json [{"title": ["Title part 1", "Title part 2"], "content": "prompt"}] ``` -:::warning -NEVER set this env var to `debug` in production. - -::: ### AIOHTTP Client @@ -669,6 +665,12 @@ See the [Model List Loading Issues](/troubleshooting/connection-error#️-model- - Default: `INFO` - Description: Sets the global logging level for all Open WebUI components. Valid values: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`. +#### `LOG_FORMAT` + +- Type: `str` +- Default: Not set (plain-text logging) +- Description: Controls the log output format. Set to `json` to switch all stdout logging to single-line JSON objects, suitable for log aggregators like Loki, Fluentd, CloudWatch, and Datadog. When set to `json`, the ASCII startup banner is also suppressed to keep the log stream parseable. Any other value (or unset) uses the default plain-text format. See the [JSON Logging documentation](/getting-started/advanced-topics/logging#-json-logging-log_format) for details on log fields and examples. + #### `ENABLE_AUDIT_STDOUT` - Type: `bool`