Runs where your data has to live.
One machine is enough: the control plane, Postgres and an object store, started with Docker Compose. Put workers inside a client's network when the work must stay there. The same image runs everywhere, offline included, and nothing reports back to anyone.
- one image
- Docker Compose
- no call home
- works offline
What an instance is.
Back up Postgres and the object store, and keep the master key. That's the whole instance.
| Part | What it does | What it keeps |
|---|---|---|
| Control plane | The API, the console, the scheduler, the queue and the flow engine, in one image | Nothing |
| Postgres 16 or later | Platform records, the queue, and tenants' tables | Everything but files |
| An S3-compatible object store | Bundles, uploaded files and large payloads | Files |
| Workers | Run tenants' scripts. The instance starts them, or you run your own | Nothing |
Up in two commands.
Docker with Compose and a machine with 2 GB of memory. Fill in the settings, start the stack, and the database is created and migrated on the first start.
- Put a reverse proxy with TLS in front before anyone else can reach it. The control plane listens on localhost for that reason.
- Give apps written as code a second address, so their code never runs where the console's sign-in counts.
- Bring your own Postgres or object store if you have them. The database user needs no superuser rights.
- A Fly.io configuration is in the repository too.
$ cp deploy/compose/.env.example deploy/compose/.env
# PUBLIC_URL, MASTER_KEY, AUTH_SECRET, passwords…
$ docker compose -f deploy/compose/compose.yaml up -d --wait From the self-hosting guide. Keep a copy of MASTER_KEY somewhere safe: without it, stored secrets can't be read.
Tenant code, kept at arm's length.
Scripts are code your tenants' developers wrote. The default setup runs them where they can reach the control plane and the internet, and not the database, the files or the instance's own settings.
- A worker host starts workers on a network of their own, as an unprivileged user, with firewall rules that refuse private addresses and cloud metadata.
- Every attempt is its own process, held to its memory limit and stopped at its timeout.
- A worker elsewhere makes only outbound HTTPS requests, so nothing has to be opened toward it. Its credential never reaches the scripts it runs.
- A tenant can run nothing on the instance at all, and keep every run on its own workers.
Running it, week to week.
The self-hosting guide covers each of these step by step, with the settings that go with them.
| Task | What to know |
|---|---|
| Backups | Postgres with point-in-time recovery or pg_dump, the object store taken close to it, and the master key kept somewhere else. |
| Upgrades | Pull and restart. Migrations run on start, forward only, and you can jump from any earlier version straight to the newest. Bundles deployed before keep running. |
| The master key | Rotate it with a second key held alongside, on one replica or many, with no secret lost. Older backups keep needing the key they were sealed with. |
| Sizing | Run slots are worked out from memory, and tenants take turns when the machine is busy. Each tenant gets a share of the database's connections, so one tenant's slow searches leave the others room. |
| A full disk | If the database turns read-only, the instance keeps serving what reads alone can and picks up by itself when writes come back. |
| A bad day | Pause every trigger on the instance at once, from the console or from where it runs, and cancel a workspace's backlog in one command. |
| Moving a tenant | Export it with a passphrase, and import it elsewhere. The import is checked before anything is written, lands whole or not at all, and arrives with its triggers paused. |
One image, wherever it has to run.
What differs between these is configuration, never the software. Moving between them is the same export and import.
- On your own machine
- A single host on a plant network or in a back office, with no route to the internet if you like.
- In your cloud
- Any container host, with a managed Postgres for anything that matters. No provider is locked in.
- Many tenants
- One instance for many businesses, each with its own people, data and keys.
- A database per tenant
- Give a tenant's tables a Postgres of its own when they must live apart. If it's down, every other tenant keeps working.
- Hybrid
- The instance in the cloud and a worker on the client's network, for reaching local systems without hosting the platform there.
- Under your name
- Brand the console for the instance, and let each tenant brand its own apps and sign-in pages.
The instance, from the console.
Operators get pages of their own: tenants, database locations and whether each answers, workers and what waits where, triggers across the instance, and the master key's status.
Related
Put it where it needs to be.
One image, the same everywhere, under Apache 2.0.