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

# Configuration

> Every one of Lekalao's environment variables.

Lekalao is configured through the `.env` file. The defaults live in `config/lekalao.php`. After every change:

```bash theme={null}
php artisan config:cache
php artisan horizon:terminate
```

The settings that belong to each team (name, sender, postal address, providers, domains, brand) are made in the interface, not here.

## Laravel

The usual Laravel variables apply. The ones that matter for Lekalao:

| Variable                        | Role                                                                                                                                                                             |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `APP_URL`                       | The public address of the installation. The base of every link sent out, unless a team sets its own **Public URL**.                                                              |
| `APP_KEY`                       | The encryption key. Back it up.                                                                                                                                                  |
| `APP_LOCALE`                    | The default language: `fr` or `en`. The language of API messages and of Lekalao's own e-mails for whoever has not chosen one.                                                    |
| `DB_*`                          | PostgreSQL.                                                                                                                                                                      |
| `QUEUE_CONNECTION`              | `redis` in production.                                                                                                                                                           |
| `REDIS_QUEUE_RETRY_AFTER`       | 3,660 seconds by default. It must stay **longer than the longest job** (an import, an hour), or a job still running is handed to a second worker and an e-mail can go out twice. |
| `CACHE_STORE`, `SESSION_DRIVER` | `redis` is advised.                                                                                                                                                              |
| `MAIL_*`                        | Lekalao's own e-mails (invitations, passwords) while no team has a default provider.                                                                                             |
| `FILESYSTEM_DISK`, `AWS_*`      | File storage; media live on the `public` disk.                                                                                                                                   |

## Sending

### Sending safety

| Variable                            | Default | Role                                                                                                                                                                                                   |
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `LEKALAO_REQUIRE_VERIFIED_DOMAIN`   | `false` | The sender must be on a domain the team added **and verified**. **Switch it on for any installation with more than one customer.** See [Security](/self-hosting/security#who-may-write-in-whose-name). |
| `LEKALAO_AUTO_PAUSE_AFTER`          | `500`   | How many e-mails go out before the rates are watched.                                                                                                                                                  |
| `LEKALAO_AUTO_PAUSE_COMPLAINTS`     | `0.1`   | The complaint rate (in %) that pauses a campaign.                                                                                                                                                      |
| `LEKALAO_AUTO_PAUSE_MIN_COMPLAINTS` | `3`     | How many complaints there must be before the rate counts.                                                                                                                                              |
| `LEKALAO_AUTO_PAUSE_BOUNCES`        | `5.0`   | The bounce rate (in %) that pauses a campaign.                                                                                                                                                         |
| `LEKALAO_AUTO_PAUSE_MIN_BOUNCES`    | `10`    | How many bounces there must be before the rate counts.                                                                                                                                                 |

The per-mailbox rates (Gmail 300 a minute, Outlook 200, Orange 120, 600 for the rest…) are in `config/lekalao.php`, key `sending.recipient_limits`. See [Sending safety](/deliverability/sending-safety).

### SMTP relay

| Variable                 | Default | Role                                             |
| ------------------------ | ------- | ------------------------------------------------ |
| `LEKALAO_SMTP_ADVERTISE` | `false` | Shows the relay in **Settings → Documentation**. |
| `LEKALAO_SMTP_HOST`      |         | The host announced to the teams.                 |
| `LEKALAO_SMTP_PORT`      | `2525`  | The port announced.                              |

The relay itself is started with its own options: see [Processes](/self-hosting/processes#the-smtp-relay).

## API

| Variable                 | Default | Role                                             |
| ------------------------ | ------- | ------------------------------------------------ |
| `LEKALAO_API_PER_MINUTE` | `120`   | Calls a minute per token. `0` removes the limit. |

## Media

| Variable                | Default | Role                                                   |
| ----------------------- | ------- | ------------------------------------------------------ |
| `LEKALAO_MEDIA_CDN_URL` |         | Serves images from a CDN: same paths, another address. |

## Data

| Variable                                | Default | Role                                                                                                                 |
| --------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
| `LEKALAO_PURGE_KEEP_DAYS`               | `365`   | How long the detail of opens, clicks, transactional e-mails and webhook calls is kept. The campaigns' counters stay. |
| `LEKALAO_WEBHOOK_KEEP_DAYS`             | `30`    | How long the calls received from providers are kept.                                                                 |
| `LEKALAO_ERASE_UNSUBSCRIBED_AFTER_DAYS` | `0`     | Forget people who left after this many days, for teams that set nothing of their own. `0`: never.                    |
| `LEKALAO_CONSENT_LOG_DAYS`              | `1825`  | How long consent records are kept, for teams that set nothing of their own.                                          |
| `LEKALAO_ATTRIBUTION_DAYS`              | `14`    | The window in which a sale is credited to an e-mail.                                                                 |

## Registration, billing, licence

| Variable                                                     | Default               | See                                             |
| ------------------------------------------------------------ | --------------------- | ----------------------------------------------- |
| `LEKALAO_SIGNUP_ENABLED`                                     | `false`               | [Online-service mode](/self-hosting/cloud-mode) |
| `LEKALAO_SIGNUP_PLAN`                                        | `starter`             |                                                 |
| `LEKALAO_SIGNUP_TRIAL_DAYS`                                  | `0`                   |                                                 |
| `LEKALAO_BILLING_ENABLED`                                    | `false`               |                                                 |
| `LEKALAO_BILLING_GATEWAY`                                    | `manual`              |                                                 |
| `LEKALAO_BILLING_CURRENCY`                                   | `XAF`                 |                                                 |
| `LEKALAO_BILLING_GRACE_DAYS`                                 | `7`                   |                                                 |
| `WAJUB_SECRET_KEY`, `WAJUB_WEBHOOK_SECRET`, `WAJUB_BASE_URL` |                       |                                                 |
| `LEKALAO_LICENCE_REQUIRED`                                   | `false`               | [Licence](/self-hosting/licence)                |
| `LEKALAO_LICENCE_PUBLIC_KEY`                                 |                       |                                                 |
| `LEKALAO_LICENCE_SERVER`                                     | `https://lekalao.app` |                                                 |
| `LEKALAO_LICENCE_SIGNING_KEY`                                |                       |                                                 |

## Interface languages

`config/lekalao.php`, key `locales`: the languages offered to users. Each one has its `lang/{code}.json` file. The languages of **subscribers** are not limited in the same way: see [Languages](/content/languages).
