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

# Self-Hosting Overview

> Run the Charley API and dashboard on your own infrastructure

Charley can be deployed on your own infrastructure if you need data residency, custom network controls, or prefer not to use the managed cloud service.

## Architecture

A self-hosted Charley deployment consists of three components:

| Component     | What it is           | Suggested deployment                             |
| ------------- | -------------------- | ------------------------------------------------ |
| **API**       | Express/Node backend | Docker container (ECS, Cloud Run, Railway, etc.) |
| **Dashboard** | React SPA            | S3 + CDN, Netlify, Vercel, etc.                  |
| **Database**  | PostgreSQL 16        | AWS RDS, Supabase, self-managed Postgres         |

External services you'll need to provision:

* **Auth0** — authentication and user management
* **Stripe** — billing (or disable billing entirely for internal deployments)
* **AWS SES** — transactional email (or swap for another SMTP provider)

## Prerequisites

* Node.js 18+
* PostgreSQL 16
* Docker (for containerized deployments)
* An Auth0 tenant
* A Stripe account (optional)

## Sections

<CardGroup cols={2}>
  <Card title="Environment Variables" icon="sliders" href="/self-hosting/environment-variables">
    All required and optional configuration values
  </Card>

  <Card title="Database Setup" icon="database" href="/self-hosting/database">
    Schema initialization and seed data
  </Card>

  <Card title="Deployment" icon="cloud-arrow-up" href="/self-hosting/deployment">
    Docker, ECS, and frontend CDN deployment
  </Card>
</CardGroup>
