ClawEngine.ai
All posts
Hosting

OpenClaw Logs for Company Teams and How Long They Last

OpenClaw writes one JSON log file per day and prunes dated files after 24 hours by default. Here is where logs live, what is in them and what keeping them costs a team per year.

ClawEngine hosts OpenClaw for teams, and the search "openclaw logs" usually comes from someone who has an agent in production and wants to know what it did and where the evidence lives. The short answer: the gateway writes one JSON-lines file per day under its state directory, you read it with openclaw logs --follow or the Control UI Logs tab, and by default old daily files are pruned after 24 hours. This article covers where logs sit, what is in them, what that retention means for a company, and what keeping them yourself costs against a managed instance from $24 a month billed yearly.

Where does OpenClaw write its logs?

The OpenClaw logging guide names two surfaces: file logs written by the gateway, and console output in the terminal running it. With the default state directory the file is ~/.openclaw/logs/openclaw-YYYY-MM-DD.log. A named profile gets its own directory and a profile-qualified filename, and OPENCLAW_STATE_DIR moves state and logs together.

Two details matter for operations. The date uses the gateway host's local timezone, so a host set to UTC and a team reading in Eastern time will disagree about which file holds a 9 pm event. And an explicit logging.file setting overrides all of the defaults, which is the hook for pointing the file at a path a collector already watches.

How long do OpenClaw logs last?

The guide says dated log files are pruned after 24 hours. Each file also rotates when the next write would exceed logging.maxFileBytes, 100 MB by default, and up to five numbered archives are kept beside the active file. At defaults that caps one day's gateway log at roughly 600 MB: the active file plus five archives of 100 MB.

SettingDefault per the guideWhat it means for a team
Daily fileopenclaw-YYYY-MM-DD.logOne file per day, host-local date
RetentionDated files pruned after 24 hoursAn incident found two days later has no gateway log
Rotation size100 MB (logging.maxFileBytes)Fresh active file, diagnostics not suppressed
ArchivesUp to five numbered filesAbout 600 MB ceiling per day
Control UI Logs tabLatest 2,000 lines retainedGood for live checks, not for audits

Guide facts as read on December 2, 2026. The practical reading is simple: the defaults are built for debugging today's problem, not for answering a question next week. If a customer asks what the agent said to them on Tuesday, the gateway log alone will not settle it.

How do you read OpenClaw logs?

The recommended route is openclaw logs --follow, which tails the gateway file over RPC and reconnects with backoff. Useful flags are --limit (200 lines by default), --json for line-delimited output and --utc to stop the timezone argument. Passing an explicit --url means you must also pass --token, or the call fails with a credentials error.

For one channel, openclaw channels logs --channel whatsapp filters the stream, and the default --channel all shows everything. If the gateway is unreachable, the guide's own hint is to run openclaw doctor. On a host where the gateway runs as a user service, openclaw logs --follow on Linux follows the active systemd journal by process ID when it can.

What is inside the log lines?

Each file line is a JSON object with time, level, subsystem and message. The guide lists machine-filterable fields when available: hostname, message, agent_id, session_id and channel. That is enough to answer "which agent, on which channel, in which session" with a filter instead of a guess.

Voice and managed-room activity writes lifecycle records with event type, transport, provider and size or timing, and the guide says these omit transcript text and audio payloads. So the log is an operations record, not a conversation archive. Teams that need to review what an agent wrote should pair it with the security checklist approach of approvals and audit, not lean on the gateway file.

The same fields help with money questions. A spike in one agent_id is the first place to look when the model bill jumps, which ties back to controlling OpenClaw model costs. A small aside for teams whose agents handle procurement-style jobs: if the agent shortlists or tracks names for an online brand, an AI agent that brokers domain purchases is a separate tool, and the log fields above are how you would check what your own agent actually did with the task.

What does it cost a team to keep logs properly?

To keep gateway logs beyond 24 hours, someone has to point logging.file at a watched path, ship it to storage, set retention and alert on errors. Here is a worked example with assumptions you can change: 4 hours to set up a collector and one alert, then 1 hour a month to check it still runs after OpenClaw updates, valued at $60 an hour.

LineSelf-hosted log pipelineClawEngine Team
Setup (4 h at $60)$240Instance created from the plan
Monthly check (12 h a year at $60)$720Gateway monitoring handled for you
First year, your hours$960$0 of your hours
Plan or storageStorage bill, separately$288 billed yearly, or $588 monthly

Halve the hours and you still spend $480 against $288. If your company already runs a log stack and adding one file path takes minutes, the self-hosted figure is far lower and you should keep logs there. Model tokens are billed by your own provider either way.

What does ClawEngine handle, and what does it not?

ClawEngine runs the gateway in its own cloud, in an isolated container with hard CPU and RAM limits, one instance per customer. Updates and gateway monitoring are handled for you, and daily backups of memory, workspace and configuration are kept for 7 days on Team. You bring a model key from your own provider.

To be plain about the limit: this article does not promise raw gateway log shipping into your own logging system. A team with a hard requirement to forward every gateway line to its own store is better served by running the gateway itself, for example on a Hetzner server or in rootless Podman, where journalctl --user -u openclaw.service -f is the log source for a Quadlet unit. Plans are on the OpenClaw pricing page.

Who should run their own log pipeline, and who should not?

Run your own if the agent touches regulated data, an auditor asks for gateway-level evidence, or you already operate a log stack. Skip it if the agent drafts replies in Slack for a five-person ops team and the real need is "tell me when it breaks". For the second group, monitoring handled by the host is the smaller job, and the update process is the other recurring chore a managed instance removes.

Frequently asked questions

Where are OpenClaw logs stored?

By default in ~/.openclaw/logs/openclaw-YYYY-MM-DD.log, one JSON-lines file per day in the gateway host's local time. Named profiles use their own state directory, and OPENCLAW_STATE_DIR or an explicit logging.file setting can move the files.

How do I view OpenClaw logs?

Run openclaw logs --follow to tail the gateway log, add --json for line-delimited output or --utc for UTC timestamps. The Control UI Logs tab shows the same file and retains the latest 2,000 lines, with filter and export.

How long does OpenClaw keep logs?

The logging guide says dated log files are pruned after 24 hours by default. Files rotate at 100 MB with up to five numbered archives. Keeping logs longer means collecting them yourself, for example by setting logging.file to a watched path.

Can I filter OpenClaw logs by channel?

Yes. Use openclaw channels logs --channel whatsapp, or any channel name. The default is all channels, and --lines (default 200) and --json are available. File log entries also carry agent_id, session_id and channel fields.

Build the agent you just read about

Describe the job on our home page and get its workspace files, its first reply and the instance we would host for it.

Build your agent

Run OpenClaw without running servers

Isolated instances, updates, daily backups, monitoring, roles, approvals and spend caps, from one panel.