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

# Deploy the LLM Gateway on Easypanel

> Deploy the Manifest LLM Gateway with a Docker image app service, PostgreSQL, generated secrets, and HTTPS.

<Card title="Open Easypanel templates" icon="external-link" href="https://easypanel.io/templates">
  Self-hosted PaaS guide using Easypanel app services, PostgreSQL, and the
  Manifest Docker image.
</Card>

## Overview

Easypanel can run the gateway as a Docker image app service, proxy the dashboard over HTTPS, and provision PostgreSQL in the same project. The Manifest repository includes Easypanel template files that provision the app, database, generated secrets, and proxy port. Until that template is accepted into the Easypanel catalog, you can create the same services manually.

## Prerequisites

* A self-hosted Easypanel instance.
* A project with a server destination.
* A domain or generated Easypanel domain for the app.

This stack runs on infrastructure you control through Easypanel. Your server, storage, and bandwidth costs depend on your provider.

## Template deploy

If the gateway is available in your Easypanel template catalog:

1. Open your Easypanel project.
2. Choose **Templates**.
3. Search for **Manifest**.
4. Keep the default image `manifestdotbuild/manifest:6` unless you need another version.
5. Deploy the template.

The template provisions the gateway, PostgreSQL, generated secrets, and a domain proxy on port `2099`.

## Manual deploy

Create a PostgreSQL service named `manifest-db`, then create an App service from Docker image `manifestdotbuild/manifest:6`. Set the proxy port to `2099`, add a domain, and mark it as the primary domain.

Set the gateway environment:

```env theme={"theme":{"light":"github-light","dark":"github-dark"}}
PORT=2099
BIND_ADDRESS=0.0.0.0
DATABASE_URL=postgresql://postgres:<postgres-password>@$(PROJECT_NAME)_manifest-db:5432/$(PROJECT_NAME)
BETTER_AUTH_SECRET=<openssl-rand-hex-32>
MANIFEST_ENCRYPTION_KEY=<different-openssl-rand-hex-32>
BETTER_AUTH_URL=https://$(PRIMARY_DOMAIN)
MANIFEST_MODE=selfhosted
NODE_ENV=production
SEED_DATA=false
DB_POOL_MAX=10
AUTH_DB_POOL_MAX=5
MANIFEST_TELEMETRY_DISABLED=0
REQUEST_RECORDING_STORAGE=filesystem
REQUEST_RECORDING_FILESYSTEM_PATH=/data/request-recordings
```

Generate two different 64-character secrets with `openssl rand -hex 32`. Use an alphanumeric or hex PostgreSQL password in `DATABASE_URL`. If your password contains URL-reserved characters such as `@`, `:`, `/`, `%`, or `#`, percent-encode them before pasting the connection string.

Add an app volume named `recordings` mounted at `/data/request-recordings` so [request logs](/llm-gateway/docs/llm-gateway/docs/request-logs) survive restarts and redeploys. This volume is single-instance; move to S3-compatible storage before running more than one replica.

`AUTH_DB_POOL_MAX` is read by the gateway's Better Auth database pool. Set `MANIFEST_TELEMETRY_DISABLED=1` if you want to disable anonymous self-hosted telemetry.

## Open the gateway

Open the Easypanel domain and create the first admin account. Fresh installs redirect to `/setup`; the first account you create becomes the admin.

Verify the deployment:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -fsS https://<your-easypanel-domain>/api/v1/health
```

## Smoke test checklist

Before submitting a template upstream, verify:

* The app starts cleanly.
* PostgreSQL connection and migrations succeed.
* `/api/v1/health` returns OK.
* `/setup` opens on the generated domain.
* First admin account creation works.
* Login works on the Easypanel domain without an invalid-origin error.
* Restarting the app and database keeps data persisted in PostgreSQL.

## Production notes

* Back up the PostgreSQL service through Easypanel or your server provider.
* Use a real HTTPS domain before enabling OAuth providers.
* Keep `BETTER_AUTH_SECRET` and `MANIFEST_ENCRYPTION_KEY` as separate values.
* If you deploy more than one gateway replica, lower database pool sizes or upgrade PostgreSQL connection capacity.

Relevant Easypanel docs:

* [Easypanel App Service](https://easypanel.io/docs/services/app)
* [Easypanel Services](https://easypanel.io/docs/services)
* [Easypanel templates repository](https://github.com/easypanel-io/templates)
