# How to View Service Logs Using the Dream CLI

> Easily view service logs with the Dream CLI. Stream real-time Docker output for any service using the dream logs command. Learn more about this essential feature.

- Repository: [Light Heart Labs/DreamServer](https://github.com/Light-Heart-Labs/DreamServer)
- Tags: how-to-guide
- Published: 2026-05-18

---

**You can view logs for a specific service by running `dream logs <service> [N]` (or `.\dream.ps1 logs <service> [N]` on Windows), which streams real-time Docker output from the container with an optional line limit that defaults to 100 lines.**

The Dream CLI in the Light-Heart-Labs/DreamServer repository provides a consistent interface for monitoring your LLM infrastructure across Linux, macOS, and Windows. Whether you are debugging the Llama server or checking the Dashboard API status, the logs command offers direct access to Docker Compose container output without manual `docker` commands.

## Cross-Platform Command Syntax

The Dream CLI implements identical syntax across all supported platforms, with platform-specific script wrappers handling the underlying Docker calls.

### Linux and macOS

On Linux and macOS systems, execute the appropriate shell script with the `logs` sub-command:

```bash
./dream logs <service> [N]

```

For macOS specifically, you may need to use the dedicated macOS installer script:

```bash
./dream-macos.sh logs <service> [N]

```

The `<service>` parameter corresponds to the Docker Compose service name defined in your DreamServer configuration, such as `llama-server`, `dashboard`, or `whisper`. The optional `[N]` parameter specifies the number of trailing log lines to display; if omitted, the command defaults to **100** lines.

### Windows PowerShell

Windows users utilize the PowerShell wrapper with identical arguments:

```powershell
.\dream.ps1 logs <service> [N]

```

Both platform implementations validate the service name and translate your command into the underlying Docker Compose log invocation.

## Implementation Details and Source Files

According to the DreamServer source code, the logs functionality is implemented in platform-specific installer scripts that standardize Docker log access.

### macOS Implementation

In [`dream-server/installers/macos/dream-macos.sh`](https://github.com/Light-Heart-Labs/DreamServer/blob/main/dream-server/installers/macos/dream-macos.sh), the `logs` sub-command parses the service name and optional line count, then invokes `docker compose logs -f --tail <N> <service>`. This implementation streams real-time output with automatic following of new entries, matching the behavior of the native Docker CLI.

### Windows Implementation

The PowerShell script at `dream-server/installers/windows/dream.ps1` provides equivalent functionality for Windows environments, including usage help messages and parameter validation before calling the underlying Docker Compose command.

### Supporting Infrastructure

The [`dream-server/installers/lib/compose-failure-report.sh`](https://github.com/Light-Heart-Labs/DreamServer/blob/main/dream-server/installers/lib/compose-failure-report.sh) file contains diagnostic logic that references log location strategies, offering guidance on using `docker compose logs -f` for troubleshooting startup failures. Additionally, [`dream-server/installers/lib/ui.sh`](https://github.com/Light-Heart-Labs/DreamServer/blob/main/dream-server/installers/lib/ui.sh) provides standardized UI helper messages that reference log viewing commands across the installer ecosystem.

## Practical Usage Examples

The following examples demonstrate common log inspection scenarios for DreamServer services:

**View the last 100 lines of the Llama server (default):**

```bash
./dream logs llama-server

```

**Stream the last 200 lines of the Dashboard container:**

```bash
./dream logs dashboard 200

```

**Inspect the Dashboard API with 250 lines of history:**

```bash
./dream logs dashboard-api 250

```

**Windows PowerShell: Check the last 50 lines of the Whisper service:**

```powershell
.\dream.ps1 logs whisper 50

```

All commands automatically append the `-f` (follow) flag to the underlying Docker command, meaning they continue to stream new log entries until you terminate the process with `Ctrl+C`.

## Summary

- The Dream CLI provides a unified `logs` sub-command across Linux, macOS (`dream` or [`dream-macos.sh`](https://github.com/Light-Heart-Labs/DreamServer/blob/main/dream-macos.sh)), and Windows (`dream.ps1`).
- Command syntax requires a **service name** (e.g., `llama-server`, `dashboard`, `whisper`) and accepts an optional **line count** parameter that defaults to 100.
- Underlying implementation invokes `docker compose logs -f --tail <N> <service>` to stream real-time output.
- Key source files include [`dream-server/installers/macos/dream-macos.sh`](https://github.com/Light-Heart-Labs/DreamServer/blob/main/dream-server/installers/macos/dream-macos.sh) and `dream-server/installers/windows/dream.ps1`.

## Frequently Asked Questions

### Can I view logs for all services at once using the Dream CLI?

The Dream CLI is designed for per-service log retrieval to reduce noise, but you can view all service logs by using native Docker Compose commands directly. The scripts in [`dream-server/installers/lib/compose-failure-report.sh`](https://github.com/Light-Heart-Labs/DreamServer/blob/main/dream-server/installers/lib/compose-failure-report.sh) reference strategies for combined log viewing during troubleshooting scenarios.

### What is the default number of log lines displayed?

If you omit the optional `[N]` parameter, the Dream CLI defaults to displaying the last **100** lines of the container's log history. This default is consistent across the macOS shell script and Windows PowerScript implementations.

### Does the logs command work on macOS Apple Silicon?

Yes, the [`dream-macos.sh`](https://github.com/Light-Heart-Labs/DreamServer/blob/main/dream-macos.sh) script located in `dream-server/installers/macos/` provides native support for macOS systems, including Apple Silicon Macs. The script handles service log streaming identically to the Linux version.

### How do I stop following the logs once the command starts?

Since the Dream CLI invokes `docker compose logs -f` (follow mode) under the hood, the command continues streaming indefinitely. Terminate the process by pressing `Ctrl+C` in your terminal or PowerShell window to return to the command prompt.