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

# Self-Hosting

> Deploy Placet on your own infrastructure with Docker Compose.

## Requirements

* Docker & Docker Compose v2
* At least 2 GB RAM

## Docker Compose Deployment

Placet ships with a production-ready `docker-compose.yml` that includes all required services.

<Steps>
  <Step title="Clone and configure">
    `git clone https://github.com/placet-io/placet.git && cd placet && cp .env.example .env`
    Edit `.env` with your production settings: - Set strong passwords for `POSTGRES_PASSWORD`,
    `MINIO_ROOT_PASSWORD` - Set `JWT_SECRET` to a secure random string - Configure
    `INITIAL_USER_EMAIL` and `INITIAL_USER_PASSWORD` - Set `NEXT_PUBLIC_WS_URL` and
    `NEXT_PUBLIC_APP_URL` to your domain
  </Step>

  <Step title="Start services">`docker compose up -d`</Step>
  <Step title="Run migrations">`docker compose exec backend npx prisma migrate deploy`</Step>
</Steps>

## Services

| Service      | Port | Description                  |
| ------------ | ---- | ---------------------------- |
| **Frontend** | 3000 | Next.js web application      |
| **Backend**  | 3001 | REST API server              |
| **Postgres** | 5432 | PostgreSQL database          |
| **MinIO**    | 9000 | S3-compatible object storage |

## Reverse Proxy

A Traefik configuration is included in `docker-compose.traefik.yml` for production deployments with TLS/SSL.

```
docker compose -f docker-compose.yml -f docker-compose.traefik.yml up -d
```

## Environment Variables

<Note>
  See `.env.example` in the repository for a complete list of all available environment variables
  with descriptions.
</Note>

### Core Settings

| Variable                | Description                    | Default                 |
| ----------------------- | ------------------------------ | ----------------------- |
| `DATABASE_URL`          | PostgreSQL connection string   | —                       |
| `JWT_SECRET`            | Secret for JWT token signing   | —                       |
| `INITIAL_USER_EMAIL`    | Initial admin user email       | `admin@placet.local`    |
| `INITIAL_USER_PASSWORD` | Initial admin user password    | `changeme`              |
| `NEXT_PUBLIC_WS_URL`    | WebSocket URL for the frontend | `http://localhost:3001` |
| `NEXT_PUBLIC_APP_URL`   | Public URL of the frontend     | `http://localhost:3000` |

### File Storage (MinIO/S3)

| Variable           | Description   | Default     |
| ------------------ | ------------- | ----------- |
| `MINIO_ENDPOINT`   | MinIO/S3 host | `localhost` |
| `MINIO_PORT`       | MinIO/S3 port | `9000`      |
| `MINIO_ACCESS_KEY` | Access key    | —           |
| `MINIO_SECRET_KEY` | Secret key    | —           |
| `MINIO_BUCKET`     | Bucket name   | `placet`    |
