> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# logs

> Fetch logs from a CVM

<Note>
  This command is marked as unstable and may change in future releases.
</Note>

### Command: `phala logs`

#### Syntax

```
phala logs [options] [<container-name>]
```

#### Description

Fetch logs from a CVM

#### Arguments

| Argument | Description |
| - | - |
| `<container-name>?` | Container name to fetch logs from |

#### Options

| Option | Description |
| - | - |
| `--serial` | CVM serial console (boot, kernel, docker-compose) |
| `--cvm-stdout` | CVM stdout channel |
| `--cvm-stderr` | CVM stderr channel |
| `--stderr` | Include container stderr (container mode only) |
| `-n, --tail <value>` | Number of lines from end |
| `-f, --follow` | Stream in real-time |
| `-t, --timestamps` | Show timestamps |
| `--since SINCE` | Start time (RFC3339 or relative, e.g. 42m) |
| `--until UNTIL` | End time (RFC3339 or relative) |

#### Global Options

| Option | Description |
| - | - |
| `-h, --help` | Show help information for the current command |
| `-v, --version` | Show CLI version |
| `--api-token TOKEN, --api-key TOKEN` | API token for authenticating with Phala Cloud |
| `-j, --json, --no-json` | Output in JSON format |
| `-i, --interactive` | Enable interactive mode |
| `--cvm-id <value>` | CVM identifier (UUID, app\_id, instance\_id, or name) |
| `--profile PROFILE` | Temporarily use a different auth profile for this command |
| `--api-version <value>` | API version to use (e.g. 2026-01-21, 2026-05-22, 2026-06-23) |
| `--timeout SECONDS` | Request timeout in seconds (default 60) |

#### Examples

* Container stdout

```bash theme={"system"}
phala logs my-service
```

* Container stderr

```bash theme={"system"}
phala logs my-service --stderr
```

* Follow container logs

```bash theme={"system"}
phala logs my-service -f
```

* CVM serial console

```bash theme={"system"}
phala logs --serial
```

* CVM stdout channel

```bash theme={"system"}
phala logs --cvm-stdout
```

* CVM stderr channel

```bash theme={"system"}
phala logs --cvm-stderr
```

* Last 100 lines

```bash theme={"system"}
phala logs my-service -n 100
```

* Specify CVM

```bash theme={"system"}
phala logs my-service --cvm-id app_abc123
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.