Logs

Runtime logs come straight from the app container; build logs are stored with each deployment. Neither is a log archive.

Runtime logs in the dashboard

The Logs tab of an app streams what the container writes to standard output and standard error. It opens on the last 100 lines and follows new ones live; the viewer keeps the latest 1,000 lines.

  • Search logs and Filter logs... narrow the lines shown, with the number of matches.
  • Pause freezes the display while lines keep arriving in a buffer; Resume adds them back.
  • Toggle timestamps shows or hides the time Docker recorded for each line.
  • Copy logs and Download logs take the lines currently in the viewer (a .txt file); Clear logs empties the viewer only.
  • For an app made of several services, a selector chooses the container to read; the default is the Primary container.

The stream is a WebSocket at /api/v1/apps/<id>/logs, with the optional tail (at most 10,000 lines), follow and service parameters; a plain HTTP request to it is refused.

From the CLI

sh0 logs <app> prints the last 50 lines and exits; --tail N changes the count (actual output):

Terminal
$ sh0 logs my-api --tail 3
[*] Connecting to logs for my-api...
2026-10-02T03:07:16.015Z GET /
2026-10-02T03:07:16.070Z GET /health
2026-10-02T03:07:16.123Z GET /api/items

-f / --follow keeps the stream open and prints new lines as they arrive, until you press Ctrl+C.

Build logs

Each deployment keeps its own build and deployment log: open it from the Deployments tab of the app. sh0 push and sh0 deploy --wait show the progress of the deployment they start. Build logs are stored in sh0's database with the deployment and are not pruned automatically.

What is kept, and for how long

sh0 does not keep a copy of runtime logs. They live in Docker's log files for the container, with the limits sh0 sets when it creates the container:

LogKept
Runtime output of a containerDocker json-file driver, rotated at 10 MB, 3 files: at most about 30 MB per container, oldest lines dropped first
After a redeploymentThe previous container is removed, and its logs with it: the viewer starts again from the new container
Build and deployment logWith the deployment record, until the app is deleted
Cron job runsSee Cron Jobs: the run history is pruned per job
Terminal
$ docker inspect <container> --format '{{json .HostConfig.LogConfig}}'
{"Type":"json-file","Config":{"max-file":"3","max-size":"10m"}}
Note
The 10 MB × 3 limit applies to containers created by sh0 with this setting; a container created by an older version keeps the limits it was created with until it is recreated. Check with docker inspect as above (actual output).

Keeping logs longer

There is no log export, retention setting or log drain in sh0 v1.10.2. If you need history beyond the rotation window or across deployments, have the application send its logs to an external service (a logging SaaS, a syslog server, your own collector), or run a collector on the host that reads Docker's log files.