> For the complete documentation index, see [llms.txt](https://hollow-peak.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hollow-peak.gitbook.io/docs/installation/environment-configuration.md).

# Environment Configuration

What belongs in .env, and what does not.

{% hint style="info" %}
**The most important thing on this page.** Payment credentials, the Discord invite, branding, contact details, currency, tax and shipping are **not** environment variables. They are entered in the dashboard and stored in the database, with secrets encrypted.

Pasting an API key into `.env` will not make it work.
{% endhint %}

`.env` holds only what the application needs *before* it can reach its database.

## Application

```ini
APP_NAME="Your Company"
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_URL=https://your-domain.com
APP_TIMEZONE=UTC
```

| Variable    | Notes                                                                                               |
| ----------- | --------------------------------------------------------------------------------------------------- |
| `APP_ENV`   | `production` on a live site                                                                         |
| `APP_KEY`   | Generated by `php artisan key:generate`. **Back it up.**                                            |
| `APP_DEBUG` | **Must be `false` live.** True shows stack traces and configuration to anyone who triggers an error |
| `APP_URL`   | Full address with `https://`, no trailing slash. Used for email links and payment return URLs       |

{% hint style="danger" %}
`APP_KEY` encrypts your stored payment credentials. Lose it and every encrypted setting becomes unreadable and must be re-entered. Never change it on a live installation.
{% endhint %}

## Database

```ini
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=hollowpeak
DB_USERNAME=
DB_PASSWORD=
DB_ENGINE="InnoDB ROW_FORMAT=DYNAMIC"
DB_TIMEZONE=+00:00
```

These can also be changed from **Site Management → Database**, which tests a connection before saving it.

## Sessions, cache and queues

```ini
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_SECURE_COOKIE=false
CACHE_STORE=database
QUEUE_CONNECTION=sync
FILESYSTEM_DISK=local
```

The database defaults work on shared hosting with no extra services.

`SESSION_SECURE_COOKIE=true` once you are on HTTPS.

`QUEUE_CONNECTION=sync` runs queued work during the request — no worker needed.

## Mail

```ini
MAIL_MAILER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_SCHEME=tls
MAIL_FROM_ADDRESS="noreply@example.com"
MAIL_FROM_NAME="${APP_NAME}"
```

`MAIL_MAILER=log` writes to the log instead of sending — useful while testing.

The sender name and address shown to recipients can be overridden in **Site Management → Email**.

| Port | `MAIL_SCHEME` |
| ---- | ------------- |
| 587  | `tls`         |
| 465  | `ssl`         |
| 25   | `null`        |

## Logging

```ini
LOG_CHANNEL=stack
LOG_STACK=daily
LOG_DAILY_DAYS=14
LOG_LEVEL=error
```

Logs can contain customer email addresses. Keep retention short, and use `error` rather than `debug` in production.

## Public addresses

```ini
STORE_PREFIX=shop
PORTFOLIO_PREFIX=portfolio
```

Move the shop to `/products` or the portfolio to `/work` without editing code.

## Upload limits

```ini
STORE_FILE_MAX_KB=204800
PORTFOLIO_MODEL_MAX_KB=51200
PORTFOLIO_MODEL_WARN_KB=15360
```

In kilobytes. Your PHP configuration must allow at least as much — see `upload_max_filesize` and `post_max_size`.

## Optional

S3, Redis and the PayFast endpoint overrides are commented out in `.env.example` with explanations. Leave them alone unless you need them.

## After editing `.env`

```bash
php artisan optimize:clear
```

On a production site with cached configuration, changes have no effect until you do this.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hollow-peak.gitbook.io/docs/installation/environment-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
