Installation
The operator definition is deploy/compose.yml: PostgreSQL, Payload Bay app,
worker and executor, plus a one-shot migrator. It uses prebuilt images and a
persistent database volume. It does not build source, install host Node/Bun,
mount the Docker socket or require gVisor for the default mode.
Images are published with each GitHub Release. Pin all four images to the digests of one release, and do not use an unversioned tag. The release migrator is the only supported way to change an operator database: do not substitute the preview schema-push service for it. The release checklist in release readiness distinguishes tested mechanisms from published installation evidence.
For a smaller setup that runs the app and worker in one container and builds from source, see single-container deployment. It supports forwarding to health-checked targets but not scripted endpoints.
To expose an instance publicly with invitation-only sign-up, follow the public instance checklist.
Prebuilt image archive
A release also supplies images.tar.gz, its SHA256 checksum, images.local.env
and compose.local.yml. This is the same coordinated prebuilt image set, for
operators who cannot pull from GHCR. It does not build source or require registry
credentials. PostgreSQL is still pulled from its public pinned registry image.
Verify the checksum against the release asset, then load the archive:
sha256sum --check images.tar.gz.sha256
docker image load --input images.tar.gz
docker compose --env-file /secure/operator.env --env-file images.local.env \
-f compose.yml -f compose.local.yml up -dThe local environment file pins Docker image configuration IDs and the override
prevents pulling those four images. The ordinary images.env file instead pins
registry manifest digests. Do not mix the two coordinate files or load an archive
from another release. Retain the archive/checksum and exact source revision with
your operator recovery material.
Configuration
Use one operator-owned environment file with Docker Compose's --env-file flag.
Store it outside Git with permissions limited to the operator. Configure:
| Setting | Purpose |
|---|---|
PAYLOADBAY_APP_IMAGE, PAYLOADBAY_WORKER_IMAGE, PAYLOADBAY_EXECUTOR_IMAGE, PAYLOADBAY_MIGRATOR_IMAGE | Digests from one coordinated release |
PUBLIC_URL | The externally reachable HTTPS origin used for links/authentication |
POSTGRES_PASSWORD | Privileged database credential, supplied to PostgreSQL and the migrator only |
PAYLOADBAY_APP_DATABASE_PASSWORD, PAYLOADBAY_WORKER_DATABASE_PASSWORD | Distinct runtime credentials of at least 32 characters |
BETTER_AUTH_SECRET, PAYLOADBAY_ENCRYPTION_KEY, PAYLOADBAY_BOOTSTRAP_SECRET | Independent secrets of at least 32 characters; retain the encryption key with recovery configuration |
PAYLOADBAY_EXECUTOR_TOKEN, PAYLOADBAY_BROKER_SECRET | Independent internal capability credentials of at least 32 characters |
SMTP_HOST, SMTP_PORT, SMTP_FROM | Real SMTP transport for passwordless sign-in and notification email |
SMTP_USER, SMTP_PASSWORD, SMTP_SECURE | Optional SMTP authentication and implicit TLS selection |
The release migrator provisions payloadbay_web and payloadbay_jobs logins
with the existing app/worker role privileges. Runtime processes receive their own
password through PGPASSWORD, keeping it out of connection URLs. The executor
receives neither a database login nor authentication/SMTP secrets. Do not reuse
the database administrator password for runtime credentials.
SMTP_SECURE=true selects implicit TLS, typically port 465. With port 587,
SMTP_SECURE=false uses the SMTP transport's STARTTLS negotiation. Development
Mailpit is intentionally absent from the operator stack.
Application policy is managed in Installation → Configuration and saved in the database. Registration defaults to invitation-only; organization onboarding allows verified customers to create their own organization without instance administration. Retention defaults to keeping history indefinitely. Request limits, deadlines, default retries and sign-in request limits use the same database source. Changes apply to new requests and worker attempts; retention is checked every minute. The Installation page shows these settings in plain units. The table maps each label to the stored value and what it controls.
| Label | Stored as | What it controls |
|---|---|---|
| Maximum request size | bodyLimit, bytes (shown in KB) | Largest request body ingress accepts; larger requests are rejected with HTTP 413 |
| Maximum size of request details | headerLimit, bytes (shown in KB) | Largest combined size of incoming request headers |
| Time to accept a request | ingressDeadlineMs, milliseconds (shown in seconds) | Ingress deadline: how long ingress may take to accept a request |
| Time to process an event | processingDeadlineMs, milliseconds (shown in seconds) | Processing deadline for one event |
| Time to wait for a reply | httpTimeoutMs, milliseconds (shown in seconds) | HTTP timeout for outgoing requests |
| Default delivery attempts | maxAttempts | Attempts for new events; replays keep the limit they started with |
| Keep completed events | eventRetentionDays | Days before completed events are deleted; 0 keeps them forever |
| Protection level | executor runtime | Standard (runc) or Hardened (runsc, kata); see executor |
| Service health: Email delivery | SMTP connection check | Working means the SMTP server accepted a connection; it does not prove a message was delivered |
SMTP, database connections, encryption/signing keys, service credentials and
runtime selection remain deployment environment settings. PAYLOADBAY_DEPLOYMENT_MODE (hosted or self-hosted) decides whether the instance owner can see customer organizations; the provided Compose files set self-hosted, an unset value means hosted, and web and worker must share it (see docs/permissions.md). PAYLOADBAY_LOGIN_HINT
is optional plain sign-in information and grants no privileges or bypass.
Startup and access
Once a coordinated release is available, run Docker Compose with that release's operator environment file. PostgreSQL readiness precedes the single migration service; the app and worker require its successful completion. The worker also validates executor protocol/SDK/date readiness before starting jobs. A failed migration or incompatible executor prevents job startup rather than silently continuing with an unsupported stack.
Port 3000 binds to loopback by default for a local reverse proxy. Set
PAYLOADBAY_BIND_ADDRESS/PAYLOADBAY_PORT for a different published binding;
Coolify can proxy the app's exposed port 3000 on the service network. Configure the
proxy for the public URL, forwarded request headers and long-lived SSE responses.
The executor, worker broker and database are not published host ports.
Open /setup for the one-time owner flow and supply the bootstrap secret. Email
codes must arrive through the configured SMTP transport. After verification, the
instance creates its default organization/workspace; public signup remains off
unless organization onboarding was explicitly selected.
Destinations are reached from the worker's network. A destination's localhost
refers to the worker container, not the Docker host or another application. Use a
reachable service DNS name, LAN address or host routing configured by the
operator. Private destinations are supported; ingress data cannot choose a
configured destination's URL and redirects remain disabled.
Updates and recovery
Use one coordinated app/worker/executor/migrator release. Stop ingress and worker consumption before a schema/image transition, take a complete backup, run the release migrator, then verify readiness before reopening traffic. Do not assume an arbitrary old image supports a new schema. At-least-once delivery and receiver deduplication still apply after replay or restore.
See upgrading an existing installation, database recovery, executor modes and
retention. PAYLOADBAY_EXECUTOR_RUNTIME is runc (default),
runsc (gVisor) or kata; the hardened two need a host-installed Docker runtime
and container recreation. Selecting one on an unsupported host fails container
creation. A hosted instance (PAYLOADBAY_DEPLOYMENT_MODE=hosted) requires a
hardened runtime and refuses to run scripts on runc. Configured mode is not
host isolation attestation. Installation steps and the Coolify options are in
executor modes.
Self-hosting
This page is the starting point for running your own Payload Bay instance: it lists the steps in order, from choosing a setup to backups and upgrades, and links to the guide for each one.
Single-container deployment
deploy/compose.single.yml runs Payload Bay as one application container plus PostgreSQL.