---
url: https://docs.puppetflow.com/self-hosting/installation.md
---
# Installation

This page covers the complete self-hosted installation. Read the [Self-Hosted Quick Start](/self-hosting/quick-start) first for the deployment overview.

## Requirements

* A Linux server with `curl`
* A server with at least 2 GB RAM (4 GB recommended for Chromium sessions)

The installer checks for Docker Engine and Docker Compose v2. If Docker is missing, it installs the supported Docker version automatically. A domain name, reverse proxy, and HTTPS are only needed when the instance must be publicly accessible.

The automated installation uses SQLite and is intended for a single-host deployment. Use PostgreSQL when you need higher write concurrency, horizontal scaling, or managed database features. See [Database](/self-hosting/database) before choosing a backend.

## Quick install

```bash
curl -fsSL https://puppetflow.com/install.sh | bash
```

The installer:

* verifies Docker Engine and Docker Compose v2
* creates a `puppetflow` directory in the current directory
* downloads the production SQLite Compose file
* creates `.env` from the minimal template
* generates `APP_KEY`, `BROWSER_STREAM_SECRET`, and `PINOKIO_TOKEN`
* asks whether to run `docker compose up -d`

If you choose not to start immediately:

```bash
cd puppetflow
docker compose up -d
```

The application is available on `http://localhost:8000`. For a public installation, edit `APP_URL`, `BROWSER_STREAM_PUBLIC_URL`, and `BROWSER_STREAM_ALLOWED_ORIGINS` in `puppetflow/.env` before starting, then configure HTTPS.

## Manual PostgreSQL installation

Save the PostgreSQL production example from [Docker Compose](/self-hosting/docker-compose) as `docker-compose.yml`. Copy the [minimal `.env`](/self-hosting/environment#minimal-env) next to it, switch its database block to PostgreSQL, and configure the required secrets.

```bash
docker compose pull
docker compose up -d
```

## First-time setup

The automated SQLite stack runs a one-shot `migrate` service before the application starts. For a manual stack without a migration service, run:

```bash
docker compose exec app php artisan migrate --force
```

Open the application in your browser. When no users exist, the login page redirects to registration and the first registered user becomes the instance administrator.

## Services overview

The production stack includes:

| Service | Description | Port |
| --- | --- | --- |
| **app** | Puppetflow application | Host port 8000 |
| **queue-1**, **queue-2** | Flow workers for the indexes configured by `APP_QUEUES_COUNTER` | - |
| **scheduler** | Cron scheduler for triggers | - |
| **pinokio** | Chromium gateway | 3000 |
| **stream-server** | Live browser stream service | 6080 |
| **mailbox-smtp** | SMTP server for receiving emails | Host port 2525 |
| **redis** | Ephemeral browser stream coordination | 6379 |
| **postgres** | PostgreSQL database | 5432 |
| **init-volumes** | One-shot volume initialization | - |
| **migrate** | One-shot database migration | - |

## Updating

```bash
docker compose pull
docker compose up -d
docker compose exec app php artisan migrate --force
```

## Custom domain and HTTPS

For production, place a reverse proxy such as Nginx, Caddy, or Traefik in front of the application and browser stream service.

Configure:

* `APP_URL` with the public application origin
* `BROWSER_STREAM_PUBLIC_URL` with the public browser-stream origin
* `BROWSER_STREAM_ALLOWED_ORIGINS` with the application origin

## Email receiving

To receive emails on custom domains:

1. Set up a [mailbox integration](/guide/integrations#mailbox-integration).
2. Point your domain's MX record to the server's public IP.
3. Set `MAILBOX_SMTP_PORT=25` in `.env` and ensure host port 25 is publicly accessible.

Received emails become available to mailbox watchers and flows.
