Self-Hosting
Run Appstrate on your own infrastructure with the one-line installer or Docker Compose.
Self-hosting gives you control over your data, your network and your configuration. Appstrate has no third-party service dependency at boot: the database, queue, cache and storage all have in-process fallbacks, and everything else (Google or GitHub sign-in, SMTP, LLM providers, OpenTelemetry) is opt-in through environment variables.
Install
curl -fsSL https://get.appstrate.dev | bashThis downloads the appstrate CLI for your OS and architecture, verifies it against a minisign-signed checksum manifest, and puts it on your PATH (default ~/.local/bin). It then prints the next step:
appstrate installappstrate install asks for a tier and an install directory (default ~/appstrate). On a fresh Docker-tier install it also asks for an optional owner email, a public URL (Enter keeps http://localhost:<port>) and the agent execution backend. It asks for a port only if the default one is taken. It generates the secrets, writes .env and docker-compose.yml, starts the stack, waits for the health check and opens the dashboard. Press Enter at the tier prompt to take the recommended Tier 2 stack (PostgreSQL and Redis, files on a persisted volume). If Docker is not reachable, the default becomes Tier 0.
For unattended installs (CI, cloud-init, Ansible), pass --yes. The script then installs and starts everything in one command:
curl -fsSL https://get.appstrate.dev | bash -s -- --yesEvery appstrate install flag (--tier, --dir, --port, --app-url, --run-adapter) passes through. Details, the verification options and the lifecycle commands (appstrate start, stop, logs, status, uninstall) are in the self-hosting README. To manage the Compose files yourself, see Docker Compose.
Requirements
| Tier | Host dependencies | What runs |
|---|---|---|
| 0 | Bun 1.3.14 or later (the installer fetches Bun if it is missing, but does not check its version) | PGlite, filesystem storage, runs as host subprocesses |
| 1 | Docker Engine 20+ with Compose v2 (recommended, not checked by the installer), access to the Docker socket | PostgreSQL |
| 2 | Same as Tier 1 | PostgreSQL and Redis |
| 3 | Same as Tier 1 | PostgreSQL, Redis and bundled MinIO |
The self-hosting README recommends at least 4 GB of available RAM for the Docker tiers. The shipped root docker-compose.yml caps the platform container at 8 GiB, PostgreSQL at 1 GiB, Redis at 256 MiB and MinIO at 512 MiB. Agent runs are separate sibling containers, each bounded by the run limits (1536 MiB and 2 vCPU by default), so size the host for your expected concurrency. See Isolation and Security.
On Windows, run the installer inside WSL2.
How the pieces fit
- Tiers decide which data services you run. Each missing service is replaced by an in-process fallback. See Progressive Infrastructure.
- Execution backends decide where agent runs execute:
docker(one isolated container pair per run),process(host subprocesses, no isolation, the code default) orfirecracker(microVMs, opt-in). They are independent of the tiers. - Modules are optional features loaded at boot from the
MODULESvariable. The default set isoidc,webhooks,mcp,core-providersand@appstrate/module-chat. Others are opt-in. See Modules.
First run and auth modes
Appstrate ships in open mode by default: anyone who can reach the instance can sign up, and creating an organization is an explicit step in the onboarding flow (the creator becomes its owner).
For a private deployment, use closed mode: signup is disabled, organizations are created by invitation or by an operator, and the first owner claims the instance with a single-use bootstrap token.
- If you enter an owner email at the interactive prompt, or set
APPSTRATE_BOOTSTRAP_OWNER_EMAILfor a non-interactive install, the installer writes closed-mode settings and a freshAUTH_BOOTSTRAP_TOKENinto.env. - An unattended install with
--yesand no owner email is closed by default too on the Docker tiers (1 to 3). It generates a token, disables signup and prints a banner with the claim URL. Tier 0 stays in open mode unless you setAPPSTRATE_BOOTSTRAP_OWNER_EMAIL. - Open
<APP_URL>/claim, paste the token and choose the owner email and password. The root organization is created in the same step. - Remove
AUTH_BOOTSTRAP_TOKENfrom.envonce the instance is claimed.
The token only works if the container receives it, and a Compose file forwards only the variables it lists. The Compose files shipped since 1.0.0-beta.65 list AUTH_BOOTSTRAP_TOKEN. A file that predates that release does not: add a bare - AUTH_BOOTSTRAP_TOKEN line under appstrate.environment and restart before you open /claim (see Compose forwards only what it lists).
Two rules about the named accounts:
- When
AUTH_BOOTSTRAP_OWNER_EMAILis set, the claim accepts that address only. Any other address is refused with403 bootstrap_owner_email_mismatch. - The token works only while the instance has no organization. Once one exists,
/claimanswers410. An address named inAUTH_BOOTSTRAP_OWNER_EMAILorAUTH_PLATFORM_ADMIN_EMAILSthat has no account yet is not created by the sign-up form: it gets its account from a magic link (SMTP required) or from a Google or GitHub sign-in whose provider asserts the address as verified. The claim itself creates one account, the owner's.
The full matrix of flags, recipes, known limits and recovery procedures is in AUTH_MODES.md. The variables are listed in Environment Variables.
Guides
Progressive Infrastructure
Tiers 0 to 3, execution backends and modules.
Docker Compose
Run the shipped Compose files without the installer.
Environment Variables
Every variable, with defaults.
Production Checklist
What to verify before taking the instance live.
Isolation and Security
Networks, credentials and egress rules.
Rate Limits
Per-endpoint limits and run limits.
Upgrading
Back up, read the operator notes, upgrade.
Troubleshooting
Common boot, run and network problems.