# ed machines docker logs

> ed machines docker logs in the Edith ed command line reference. Streams one container's logs to your terminal.

- Canonical URL: https://getedith.pro/docs/cli/machines-docker/logs
- Updated: 2026-12-02

Streams one container's logs to your terminal.

```
ed machines docker logs [--tail <n>] [--follow] [--json] <machine> <container>
```

## Arguments

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<machine>` | machine name, ssh alias, id, or any unambiguous prefix | required | Which machine to ask. |
| `<container>` | container name or id, full or short | required | Which container's logs to read. Passed to docker as given. |

## Options

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--tail` | integer, 0 or more | `200` | How many trailing lines to show. `0` shows none, which is what you want with `--follow`. |
| `--follow`, `-f` | flag | off | Keep streaming until interrupted. |
| `--json` | flag | off | Capture the bounded log and print one JSON document. Cannot be combined with `--follow`. |
| `--help`, `-h` | flag | off | Print the help for this command on stdout and exit 0. |

There is no `--since` or `--until`. Without `--json` this passes docker's own
output through. `--json` waits for the bounded log, then prints
`{"machine","container","lines"}`.

```
$ ed machines devbox docker logs lobe-chat --tail 3
2026-08-08T07:38:18.342112977Z Warning: Cannot polyfill `DOMMatrix`, rendering may be broken.
2026-08-08T07:38:18.342116199Z Warning: Cannot polyfill `ImageData`, rendering may be broken.
2026-08-08T07:38:18.342119077Z Warning: Cannot polyfill `Path2D`, rendering may be broken.
```

## Examples

```
ed machines devbox docker logs lobe-chat
ed machines devbox docker logs devbox-api --tail 50
ed machines devbox docker logs open-webui --tail 0 --follow
```

## Behaviour notes

The remote command is
`docker logs --timestamps --tail <n> [--follow] <container>`. Timestamps are
always on and cannot be turned off, which is the one way this differs from
typing `docker logs` yourself.

Without `--json`, output is streamed line by line as it arrives, with the
container's stdout going to your stdout and its stderr going to your stderr, so
redirecting one does not swallow the other. There is no timeout: `--follow` runs
until you interrupt it or the container stops. `--json` cannot follow, and a
remote failure on that path exits 1 with the docker error in the hint.

This is one of the two verbs on this page that propagate the remote exit code
instead of mapping it into the 0 to 4 table. A container that does not exist is
docker's error, on stderr, with docker's status, usually 1. `--tail` is
validated before anything is sent: a negative value exits 2, though you have to
write `--tail=-1` to reach the check because `--tail -1` is read as a missing
value and exits 2 for that reason instead.

```
$ ed machines devbox docker logs open-webui --tail=-1
error: --tail cannot be negative
hint: pass 0 or more
```

## Where to go next

- [`ed machines docker`](https://getedith.pro/docs/cli/machines-docker), the rest of this group
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
