Skip to main content

Logs, health, and diagnostics

Is the server up?

curl http://127.0.0.1:8000/api/health

Returns JSON with status, uptime_seconds, and pid. No authentication is required, so you can point uptime monitors, systemd health checks, or Docker healthchecks at it.

Server logs

Computer logs to stdout. Two variables control it (restart to apply, like all env vars):

VariableDefaultPurpose
CPTR_LOG_LEVELINFOSet DEBUG for more detail.
CPTR_LOG_FORMATtextSet json for structured output that log collectors can parse.

Audit logging

Off by default. Turn it on when you want a durable record of who changed what:

CPTR_AUDIT_LOG_LEVEL=METADATA cptr run
VariableDefaultPurpose
CPTR_AUDIT_LOG_LEVELNONEMETADATA records who/what/when for each mutation; REQUEST adds redacted request bodies; REQUEST_RESPONSE adds redacted response bodies.
CPTR_AUDIT_LOG_PATH<data>/logs/audit.jsonlWhere the JSONL audit file goes.
CPTR_AUDIT_LOG_ROTATION10 MBRotation size.
CPTR_AUDIT_MAX_BODY_SIZE2048Max bytes of body captured per entry.
CPTR_AUDIT_EXCLUDED_PATHS/api/chats,/v1/chatPaths skipped by the audit log.

What it captures: HTTP mutations (settings changes, user changes, uploads, and so on), with sensitive values redacted. What it doesn't: terminal input/output is not HTTP traffic and never appears here, and chat routes are excluded by default. For evidence of what an agent actually did, read the chat itself and its terminal output.

Upstream request logging

When a model behaves strangely and you want to see exactly what Computer sent to the provider:

CPTR_LOG_UPSTREAM_REQUESTS=true cptr run

Model API requests are written to <data>/logs/upstream-requests.jsonl (rotation at 50 MB, configurable via CPTR_UPSTREAM_REQUEST_LOG_PATH and CPTR_UPSTREAM_REQUEST_LOG_ROTATION). Turn it off when you're done: the file grows fast and contains prompt content.

CORS

CPTR_CORS_ALLOWED_ORIGINS controls which browser origins may call the API. Default is *. Set an explicit comma-separated list if you host a separate frontend on another origin:

CPTR_CORS_ALLOWED_ORIGINS=https://computer.example.com cptr run

Full variable list, including chat tuning and scheduler settings: Environment variables.

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.