# Logs

Tail the logs of a deployed app.

### Syntax

```
$ vela logs
```

```
$ vela logs -f -n 500
```

Reads the systemd journal for the target's service over SSH. By default it prints the last 100 lines and exits. There are no logs for the copy on your own machine — [`vela dev`](/dev) prints those as it runs.

### Options

- `-t, --target <target>` - Which copy of the app to act on, defaults to `production`
- `--server <ssh>` - Server this target runs on, recorded on first use
- `-f, --follow` - Keep streaming new output
- `-n, --lines <count>` - How many lines of history to show, defaults to `100`
- `--pocketbase` - Show the PocketBase service instead of the app
- `-i, --identity <file>` - SSH private key to authenticate with
- `--ssh-port <port>` - SSH port
- `--accept-host-keys` - Trust an unknown host key on first connect (CI)

### The two services

Each deployed target runs the Node server and the database as separate systemd units. Logs shows the app by default; pass `--pocketbase` for the database:

```
$ vela logs --pocketbase -f
```

A target deployed without a backend has no database service, so `--pocketbase` fails there and says so.