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

# Logs

> View pod logs from the CLI.

View container and application logs for your pods.

## Basic Usage

```bash theme={null}
instapods logs my-app
```

Outputs the most recent log entries from the pod.

## Flags

| Flag | Description                   | Default      |
| ---- | ----------------------------- | ------------ |
| `-n` | Number of log lines to return | 100          |
| `-s` | Filter by service name        | All services |

## Examples

```bash theme={null}
# Last 50 lines
instapods logs my-app -n 50

# Only application logs
instapods logs my-app -s app

# Only nginx access logs
instapods logs my-app -s nginx

# System logs
instapods logs my-app -s system
```

## Service Filters

The available service filters depend on the pod's preset:

| Preset      | Available Services           |
| ----------- | ---------------------------- |
| **Static**  | `nginx`, `system`            |
| **PHP**     | `nginx`, `php-fpm`, `system` |
| **Node.js** | `app`, `system`              |
| **Python**  | `app`, `system`              |

If you've installed database services, their logs are also available:

```bash theme={null}
instapods logs my-app -s mysql
instapods logs my-app -s postgresql
instapods logs my-app -s redis
```
