Open WebUI logging and structured JSON logs

Open WebUI logging decides what your operations team can see during an incident and what sensitive prompt data ends up in your log platform. This page covers log levels, JSON output and the controls that keep prompt content out of logs.

On this page

Why Open WebUI logging needs a plan before go-live

A self-hosted Open WebUI instance is only as manageable as its logs, and the operations or security team needs to answer two questions before users arrive: what logs exist, and where do they go? Open WebUI logging comes down to three controls. The first is log verbosity, set through the GLOBAL_LOG_LEVEL environment variable. The second is output format, which decides whether entries are plain text lines or structured JSON. The third is the shipping path, meaning how those entries reach your collector, whether that is Loki, Datadog, CloudWatch or another platform. Each of these should be a deliberate decision recorded in your deployment configuration, not a default someone discovers during an incident.

Structured JSON matters once logs leave the container and must be queried, alerted on or retained under a policy. Plain text is usually enough for a single developer checking a container. Teams that feed Loki, Datadog or CloudWatch generally want JSON so that fields such as level, timestamp and logger name can be filtered without fragile parsing rules. Confirm the exact variable names, accepted values and the switch that enables JSON output against the Open WebUI configuration documentation for the release you run, because these settings have changed between versions and the names used here must not be copied from memory. Record the release number alongside the configuration so that a later upgrade does not silently change log behavior.

Decide the prompt content question before go-live, not after. Application logs at verbose levels can capture request details that include user prompts, attached file text or model responses, and those records then sit in a log platform with its own access list and retention settings. Ask who can read the collector, how long entries are kept, and whether anyone reviews what is written at the level you choose. Test with a non-sensitive prompt, search the shipped logs for it, and confirm the result before real users sign in. Pair this check with your data handling policy so the logging design matches what the organization has agreed to store.

Logging options and when each one fits

This table compares the logging choices a team makes for Open WebUI: log level, output format, collection path and destination backend. Read each row for the setting that fits your environment, then weigh the detail you gain against the noise and data exposure it adds. Confirm the exact GLOBAL_LOG_LEVEL values and JSON behavior in the current docs for your release before you standardize on them.

OptionWhen it fitsTrade-offWhat to confirm
INFO level (default posture for shared use)Shared company deployments where operators need startup, errors and admin events without per-request contentLess detail for tracing a failed chat or tool callConfirm the accepted GLOBAL_LOG_LEVEL values and which modules log at INFO
DEBUG levelShort, controlled troubleshooting by an admin on a non-production or time-boxed basisCan expose request content, prompts and file excerpts in log linesConfirm what DEBUG records and whether it includes user message bodies
Plain text outputSingle host or small team reading logs with docker logs or journalctlHarder to filter by field in Loki, Datadog or CloudWatchConfirm whether plain text is the default output format for your release
JSON output to stdoutAny environment that ships logs to a central backend and needs field-based queriesRequires the collector to parse JSON and map fields consistentlyConfirm the JSON field names, timestamp format and whether tracebacks are nested
Container runtime collectionDocker or Kubernetes hosts where the runtime already captures stdoutLogs rotate or disappear with the container unless a driver or agent forwards themConfirm the log driver or runtime retention settings on each host
Node agent collection (Promtail, Grafana Agent, Datadog Agent, CloudWatch agent)Teams that already run a collector on every node and want parsing and labels set at the edgeAnother component to upgrade, secure and monitorConfirm the agent parsing rules match the JSON field names your release emits
Loki destinationTeams already on Grafana, with label-based queries and object-storage retention they controlLabel cardinality must stay low or queries and storage sufferConfirm which JSON fields to promote to labels and which to keep in the log body
Datadog or CloudWatch destinationOrganizations that standardize on those platforms for alerting and access controlPer-volume ingestion and retention costs grow with chat-level detailConfirm the retention period, redaction options and who can read the log stream

How Open WebUI log lines reach your log platform

Open WebUI writes its log lines to standard output, and the container runtime or host service captures them. A collector or agent on the same host reads that stream, adds labels and forwards it across the trust boundary to the log platform. Redaction or filtering should run before storage, so prompt content and secrets never land in the index. Check each hand-off separately, because a log line can be lost, duplicated or stored unredacted at any of them.

The path from Open WebUI stdout to log storage, with the redaction step and trust boundary marked.

Setting up structured logging for Open WebUI

This sequence sets the log level, switches on JSON output where the release supports it, and confirms that your log platform parses and indexes the fields your team needs. Each step ends with a check so you can verify that prompt text stays out of the logs before the configuration goes into production.

  1. Confirm the release and image tag

    The platform engineer records the Open WebUI version in use from the container image tag or the installed package version, then checks it against the project's GitHub releases page. Log settings and output formats can change between releases, so the logging configuration must be written against the version you actually run. Done when the tag appears in your change record and matches the version printed in the container's startup output.

  2. Set the global log level in the deployment

    Set GLOBAL_LOG_LEVEL in the environment file, Compose file or Helm values so it is part of the versioned deployment, not typed into a running container. Choose a baseline level for shared deployments and document the reason for any more verbose level. Done when a restart applies the change and printenv GLOBAL_LOG_LEVEL inside the container returns the value you set.

  3. Enable JSON output where the release supports it

    Check the release documentation and changelog for a setting that switches log output to JSON. If your release has no such setting, plan to parse the plain text lines in the collector and record that decision in the runbook. Done when the first lines after a restart are valid JSON objects, which you can confirm by piping the output through jq without errors.

  4. Send a test request and capture the lines

    Use a test account to send a short chat message through the interface or the API. Include a unique marker string in the prompt, such as a random token written for this test, so you can search for it later. Capture container output for the time window of the request. Done when you can find the request in the captured lines with its timestamp, level and message fields.

  5. Scan the sample lines for prompt content

    The security or platform engineer searches the captured output for the marker string and for other prompt or response text used in the test. If the marker appears at the chosen log level, identify which logger writes it and address that before go-live, either by changing the level or by raising the issue with the vendor. Also search for API keys and tokens used in the test. Done when the marker and the secret values are absent from every line at the level you intend to run.

  6. Configure the collector to parse JSON fields

    Configure your collector for your destination: Grafana Loki with a JSON pipeline stage, Datadog log processing for the agent, or the CloudWatch agent with a JSON log configuration. Keep high-cardinality fields such as user identifiers out of Loki labels, and confirm this with the collector documentation for your version. Done when a parsed field, such as the level, appears as a separate field on the test line in the destination.

  7. Confirm the destination indexes the required fields

    Run a query in Loki (LogQL), Datadog Logs or CloudWatch Logs Insights that filters on the level, the timestamp and the logger name for the test request. Confirm the fields are searchable and that the team's dashboards and alerts use the same field names. Done when the query returns the test lines and the field names match the list your operations team wrote down.

  8. Confirm the log level change after restart

    Change GLOBAL_LOG_LEVEL to a different value in the deployment file, restart the service and repeat the test request. Compare line counts for the same request before and after the change. Done when the output volume changes in the expected direction and the change, the restart time and the result are recorded in the runbook for the next upgrade or audit review.

Shipping Open WebUI JSON logs to Loki, Datadog or CloudWatch

Grafana Loki indexes only labels and stores log lines as compressed chunks, so the label set decides both query speed and storage growth. Every unique combination of label values creates a separate stream, which means a label that changes with each request can multiply streams faster than most teams expect. The design goal is a small, stable set of labels for routing, with per-request detail kept inside the JSON body.

  • Pick a small label set: Use labels such as namespace, container, app and level. Check the number of distinct values for each label before go-live.
  • Keep identifiers out of labels: User IDs, chat IDs, session identifiers and prompt text belong in the JSON line. Filter on them at query time with LogQL parsing.
  • Confirm the push path: Your team provides the Loki push endpoint, a tenant ID if multi-tenancy is enabled, and credentials for the gateway or collector that sends the logs. Confirm the current collector and push API in Grafana's documentation.
  • Set retention on the Loki side: Retention and object storage lifecycle rules are configured in the Loki deployment and its storage. Confirm the retention options available in your version.
  • Test label cardinality: Review the label values Grafana shows for a sample day of traffic, then remove any label that grows with users or conversations.

Before you enable shipping in production, run a sample of chat traffic and confirm that every stream label is low-cardinality and that user identifiers appear only in the log body.

Security risks in Open WebUI log pipelines

Logs from a shared Open WebUI deployment can hold more sensitive material than the application database, and they often travel further and live longer. The cards below cover the risks that appear most often when structured JSON logs are shipped to Loki, Datadog or CloudWatch, and the control that addresses each one.

Prompt and response text in logs

Verbose or debug output can record the full text of user prompts, model responses and attached document excerpts. Once that text reaches a log backend, it inherits a retention and access profile nobody reviewed for chat content. Before enabling any level below INFO in production, test a non-sensitive prompt and search the collector output for it. Control: filter or drop message fields at the collector before they reach the backend, and keep application log levels at the lowest level your troubleshooting needs.

Open WebUI features

Credentials echoed in error output

Stack traces and error payloads from provider calls, OAuth exchanges or tool integrations can include API keys, bearer tokens or connection strings. A single failed request during an incident can write these values into every downstream index. Review a sample of error events from each provider and integration you use, and confirm that secrets do not appear. Control: scrub known key patterns and header fields at the collector, and rotate any credential found in a log store.

User identifiers and IP addresses kept too long

Structured logs usually carry user IDs, email addresses, client IP addresses and session identifiers so that events can be traced to a person. Those fields are personal data in most jurisdictions, and a default retention period set by the log platform rarely matches your policy. Agree a retention period with your privacy and security owners, then configure it on each backend that receives Open WebUI logs. Control: set retention limits per index, stream or log group, and hash or truncate identifiers where investigations do not need the raw value.

Log access granted to too many people

Logs are often readable by every engineer with dashboard access, which can be far more people than have access to the admin console or the database. Chat excerpts and identifiers in logs can therefore be seen by staff who would never be granted access to those conversations directly. Map who can query the Open WebUI log index or stream today and compare that list with your data access policy. Control: restrict log read roles by team, separate production from staging, and record query access where the platform supports it.

Logs shipped over unencrypted paths

Forwarders such as Promtail, Fluent Bit, the OpenTelemetry Collector or the CloudWatch agent may send log lines to a backend over plain HTTP or an unverified connection. Any sensitive field in those lines is then exposed to anyone who can observe that network segment. Confirm the transport settings for each forwarder and endpoint in your environment, and check that the backend certificate is validated. Control: use TLS to the backend, verify server certificates, and keep the collector on a network path you control.

Debug settings left on after incidents

Raising GLOBAL_LOG_LEVEL to a verbose value during an outage is a normal step, but it is often forgotten once service returns. Debug output then keeps recording more request detail than the normal baseline for weeks. Record the previous value before any change and set a reminder or ticket to revert it. Control: revert the log level to its documented baseline after the incident, and review the environment configuration as part of change closure.

Keeping prompt content out of logs

Prompt text, attached file excerpts and model responses are often the most sensitive data that passes through a shared Open WebUI deployment. Users paste contracts, patient notes, source code and internal figures into chats, and a log line that echoes any of it lands in a system with broader read access than the chat itself. Treat logs as a data store with its own classification, and confirm before go-live that no prompt or response text reaches stdout, the log aggregator or any collector buffer at the level you run. Ask your team to name where Open WebUI logs go in your environment, who can query them and how long they are kept.

Use a layered approach rather than relying on one setting. Start with the least verbose level that still supports operations, set through GLOBAL_LOG_LEVEL, and raise it only for a bounded investigation with a documented owner and an end time. Then test on a release candidate with synthetic prompts that contain unique marker strings, such as a made-up token in a chat message and in an uploaded file. Search the container output and the aggregator for the markers at each level you plan to use, including the error path, which is where teams most often find verbatim request bodies. Where your collector supports it, drop or redact the fields that carry request or message content before they are forwarded, and restrict raw log access to a small group with its own audit trail.

The exact fields Open WebUI emits can change between releases, so the marker test is a verification step for the version you run, not a one-time property of the product. Record the release, the log level, the collector configuration and the marker results in your change record. Repeat the test after every upgrade and after any change to logging, proxy or middleware settings, because new debug output can appear in a minor release. If you cannot confirm a field's contents from the release notes or your own test, treat it as sensitive until you have seen it absent from the logs.

Limits to confirm in your environment

Structured logging looks simple on paper, but the output depends on the release you run, the log lines the application actually emits, and the systems that receive them. The cards below list the points to confirm with the documentation and your own platform team before you commit to a logging design.

Configuration keys in your release

Confirm the exact logging keys, such as GLOBAL_LOG_LEVEL, and the values each accepts in the Open WebUI release you run. Open WebUI publishes releases often, and v0.12.3 followed v0.12.0 within a few days, so a key name or default can change between upgrades. Test the settings in a staging instance on the same version, then record the version alongside the configuration so future upgrades are checked against it.

Open WebUI features docs

Coverage of JSON output

Check whether JSON formatting applies to every log line the process writes, or only to some of them. Startup messages, library output, database migration logs and access logs can follow different formatters, and a mixed stream breaks parsers that expect one structure. Capture a sample from each container and each worker process, and confirm that every line parses as JSON before you build alerts on those fields.

Volume and cost in your log platform

Ask how much log volume the destination can ingest and what it costs to keep. Verbose levels such as debug can multiply volume quickly on a busy instance, especially when many users stream responses. Estimate volume from a staging run with realistic request patterns, set a sampling or level policy, and agree on index and retention settings for Loki, Datadog or CloudWatch with the team that pays for them.

Field parsing by your collector

Confirm that your collector, such as Grafana Alloy, Fluent Bit, the Datadog agent or the CloudWatch agent, can read the emitted fields and map them to labels or attributes. Field names that change between releases, or nested objects that the collector flattens differently, can silently drop data from dashboards. Build a parsing test with a sample file and keep it in version control so a release upgrade shows parsing failures early.

Retention and access requirements

Ask your compliance team how long logs must be kept, who may read them, and whether logs can leave a region or account. Log retention can conflict with privacy rules for stored conversations, and broad read access to a log platform can expose user activity. Write these requirements down before you set retention periods, and restrict access to the log destination by role.

Prompt content in log lines

Verify that no log line contains prompt text, model responses, uploaded file content or API keys. Run test conversations with unique marker strings, then search the log destination for those markers at each log level you plan to use. A logging design is only as safe as the most verbose level you permit in production, so repeat the check after each upgrade.

Questions teams ask about Open WebUI logging

How much does structured logging setup cost for Open WebUI?

The cost depends on the work involved more than on any fixed amount, and no price is published here. The main components are collector work (getting logs out of containers or pods), backend account and configuration work in Loki, Datadog or CloudWatch, parsing rules that turn JSON fields into searchable attributes, redaction testing to confirm prompt content stays out of logs, and access reviews that decide who can read what. Some of this is one-time setup, while retention costs, log volume and ongoing rule maintenance recur. When requesting a quote, ask for each component listed separately, state which log backend you already run, and ask whether the quote covers redaction testing and a written handover. A fixed-scope quote follows from a written scope agreed before work starts.

How long does an Open WebUI logging setup take?

Duration is set by the number of environments, the log platform's readiness and how much sign-off the security team requires, so no timeline is given here. Schedule drivers include whether accounts, API tokens and network paths to the log backend already exist, how many deployment targets need collectors (a single Docker host differs from a multi-replica Kubernetes cluster), and how long the test plan takes to run against real traffic patterns. Teams often lose more time waiting for access approvals than for configuration itself. Confirm with your own environment owners which dependencies are open, and ask any partner to tie milestones to those dependencies in the written scope.

What does the client need to provide before logging work starts?

Expect to supply several things before configuration begins:

  • Platform access to the Open WebUI hosts, containers or Kubernetes namespace, with rights to change environment variables and restart services
  • Log platform accounts and API credentials for Loki, Datadog or CloudWatch, with clear ownership of the destination index, tenant or log group
  • Network paths from the Open WebUI runtime to the log endpoint, including any proxy or egress rules
  • A written test plan covering which events must appear, which must not, and how redaction is checked
  • Sign-off from security on the fields that may be logged and on who may read prompt-adjacent data

Confirm each item with the owning team early, because missing approvals are a common cause of delay.

Can an internal team set up Open WebUI JSON logging without outside help?

Yes, a team with the right skills can usually do it internally, and the work is mostly configuration rather than code. The skills needed are familiarity with the Open WebUI environment variables such as GLOBAL_LOG_LEVEL, comfort with container or Kubernetes log collection, working knowledge of the chosen backend's query and retention model, and enough security judgment to test redaction against real prompts. Teams often underestimate the redaction testing and the access review, which need a second person from security or compliance to sign off. An outside partner adds value when the team lacks one of these skills or needs an independent test record. Whichever route you choose, agree the test plan and the list of permitted log fields before starting.

What breaks most often in Open WebUI log pipelines?

Most failures fall into three groups. Collection failures happen when a collector does not read the container or pod stdout stream, or when multi-line output is split so JSON records cannot be parsed. Parsing failures appear when field names differ between backends, so dashboards and alerts return empty results. Redaction failures are the most serious: a higher log level or a debug setting can record request bodies, and a raw prompt may reach a backend that has broader read access than the chat application. Check each pipeline with a known test prompt, search the backend for that text, and confirm that the query returns nothing before you trust the setup.

Do Open WebUI logging settings change after an upgrade?

Logging behavior can change between releases, so every upgrade should include a logging check. Review the release notes for changes to log output, default levels, or the names of environment variables before you roll out a new version. Then rerun the test plan: confirm JSON records still parse, field names still match your dashboards and alerts, and prompt content still does not appear in the backend. Treat any new log field as unreviewed until security approves it. Keep the previous configuration in version control so you can roll back the logging change independently of the application image. The release history is published on the project's GitHub releases page.

Who is responsible for access to the logs once they are shipped?

The organization that owns the log backend is responsible for access, and that responsibility should be written down before shipping begins. Logs can carry user identifiers, model names, error details and, if redaction fails, fragments of prompts. Define which roles can query the Open WebUI log stream, how long records are retained, and who approves exceptions. Run an access review on a set schedule and remove accounts that no longer need the data. Retention periods should follow your own policy and any legal obligations you carry, so confirm them with your privacy or compliance lead rather than copying a default.

How DeployOpen works on this

DeployOpen plans, implements and documents Open WebUI logging inside your own infrastructure, so log levels, JSON output and prompt-content controls are agreed before any collector is changed. The work is scoped in writing, built against your log platform, and handed over with the settings and evidence your operations and security teams need to review.

How we scope

  • Confirm which log platform receives output, such as Loki, Datadog or CloudWatch, and who operates it.
  • Agree the target GLOBAL_LOG_LEVEL for production, staging and troubleshooting windows, with who may change it.
  • Define how prompt and response content is kept out of logs and which fields must still be retained for audits.

How we build

  • Configure the Open WebUI container or Helm values for JSON output and the agreed log level.
  • Route container output through your collector and verify parsed fields, labels and timestamps in the target platform.
  • Test that user prompts, uploaded file text and API keys do not appear in captured log lines before go-live.

How we hand over

  • Deliver the configuration, collector pipeline definitions and a field reference for the JSON log schema.
  • Document the log levels, retention settings and redaction checks, with a runbook for changing them safely.
  • Walk your operations and security staff through dashboards, alert queries and the retest procedure.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and re-testing after Open WebUI version changes are available as a retainer.
  • Ask for a quote built from the written scope, which lists each deliverable, the environments covered and any open items to confirm.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.