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

# Configuration

> Configure the environment, database, and LaraOwl-specific settings.

LaraOwl is configured through the `.env` file in the project root, following standard Laravel conventions. This page covers the variables that matter most for a LaraOwl deployment.

<Note>
  After changing any `.env` value in production, clear the cached configuration so the new values take effect: `php artisan optimize:clear` (Composer) or `docker compose restart` (Docker).
</Note>

## Application

```dotenv theme={null}
APP_NAME=LaraOwl
APP_ENV=production
APP_KEY=              # set with `php artisan key:generate`
APP_DEBUG=false
APP_URL=https://your-domain.com
APP_HOSTNAME=your-domain.com

# Allow public sign-ups. Keep false and create users manually for a private instance.
ALLOW_REGISTRATION=false
```

<Warning>
  Always set `APP_DEBUG=false` in production. Debug mode can expose sensitive configuration and stack traces.
</Warning>

## Database

LaraOwl defaults to PostgreSQL. To use MySQL, set `DB_CONNECTION=mysql` and adjust the port to `3306`.

<CodeGroup>
  ```dotenv PostgreSQL theme={null}
  DB_CONNECTION=pgsql
  DB_HOST=127.0.0.1
  DB_PORT=5432
  DB_DATABASE=laraowl
  DB_USERNAME=laraowl
  DB_PASSWORD=your-secure-password
  ```

  ```dotenv MySQL theme={null}
  DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=laraowl
  DB_USERNAME=laraowl
  DB_PASSWORD=your-secure-password
  ```
</CodeGroup>

<Info>
  When using Docker, `DB_HOST` is the Compose service name (`db`), not `127.0.0.1`.
</Info>

## Queue, cache, and broadcasting

For production performance, back the queue, cache, and broadcasting with Redis and Reverb:

```dotenv theme={null}
QUEUE_CONNECTION=redis
CACHE_STORE=redis
BROADCAST_CONNECTION=reverb

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=your-secure-password
REDIS_PORT=6379
```

<Info>
  Under Docker, `REDIS_HOST` is the `redis` service name. The queue connection **must** be a durable driver (`redis` or `database`) — the `sync` driver would process every ingested record in the request lifecycle and defeat LaraOwl's asynchronous ingestion.
</Info>

## Reverb (real-time WebSockets)

Reverb powers the live dashboard. Generate a random app ID, key, and secret for each deployment — never reuse the defaults.

```dotenv theme={null}
REVERB_APP_ID=000000               # 6-digit ID
REVERB_APP_KEY=xxxxxxxxxxxxxxxxxxxxx   # 20-character key
REVERB_APP_SECRET=xxxxxxxxxxxxxxxxxxxxx # 20-character secret

# Backend connection (Laravel → Reverb)
REVERB_HOST=localhost
REVERB_PORT=8080
REVERB_SCHEME=http

# The address Reverb binds to
REVERB_SERVER_HOST=0.0.0.0
REVERB_SERVER_PORT=8080
```

The frontend reads its own set of `VITE_` variables at build time so the browser can open the WebSocket connection:

```dotenv theme={null}
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="ws.${APP_HOSTNAME}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
```

<Warning>
  `VITE_` variables are compiled into the frontend bundle. After changing any of them you must rebuild assets with `npm run build` (or rebuild the Docker image) — clearing the config cache is not enough.
</Warning>

## Mail (for alerts and team invitations)

LaraOwl sends email for team invitations and email-channel alerts. Point the mailer at your SMTP provider:

```dotenv theme={null}
MAIL_MAILER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=your-username
MAIL_PASSWORD=your-password
MAIL_FROM_ADDRESS="alerts@your-domain.com"
MAIL_FROM_NAME="${APP_NAME}"
```

## Client-side variables

The following variables are **not** set on the LaraOwl server — they belong in the `.env` file of each Laravel application you monitor, provided by the `laraowl/client` package:

```dotenv theme={null}
LARAOWL_SERVER_URL=https://your-laraowl-server.com
LARAOWL_TOKEN=your_project_api_token

# Optional: forward application logs to LaraOwl
LOG_STACK=stack,laraowl
```

You can find each project's API token in **Project Settings → API Keys** in the dashboard. See [Getting started](/quickstart) for the full client setup.
