Self-host Appwrite
Open-source backend server that provides authentication, databases, storage, functions and hosting for apps, run as a Docker Compose stack. Run your own Appwrite on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.
Updated November 23, 2026
Running your own Appwrite usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Appwrite behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.
Just ask your agent
Open a Plus workspace (Appwrite runs in Docker, which Plus and Pro include), tap Launch to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:
Set up Appwrite on this workspace and give me the link. Follow https://envhaven.com/self-host/appwrite.md
Then open the link it sends and create your Appwrite account straight away, before anyone else finds the address. That is the whole request: the address in it is this page’s Markdown copy, and the agent follows the instructions for it further down, with every setting Appwrite’s docs require.
Or keep it private with Tailscale
The preview URL puts Appwrite on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Appwrite an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace’s Vars pane as TS_AUTHKEY, and ask the agent:
Set up Appwrite on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/appwrite.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
- A Tailscale container runs beside Appwrite, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
- Anything other services have to reach, such as a webhook, still needs a public address. Keep self-hosted apps private with Tailscale covers both, and what Tailscale’s free plan includes.
| At a glance | |
|---|---|
| What it is | Databases, backends and analytics |
| License | BSD-3-Clause |
| Runs as | Docker (appwrite/appwrite) |
| Memory | 4 GB (plus 2 GB swap) minimum (docs) |
| Plan that fits | Plus or larger |
| Web port | 80 |
| Documentation | appwrite.io/docs/advanced/self-hosting/installation |
What your agent takes care of
- Installing it. Appwrite runs from the official image,
appwrite/appwrite, with its data in folders under~/apps/appwrite. - Putting it on an HTTPS address. The workspace’s preview URL serves it, and your own domain can too.
- Locking it down first. What Appwrite’s docs say to set before it faces the internet, below.
- Telling you what to back up: Docker volumes appwrite-postgresql (or appwrite-mariadb / appwrite-mongodb), appwrite-redis, appwrite-clickhouse, appwrite-uploads, appwrite-functions, appwrite-sites, appwrite-builds, appwrite-certificates, appwrite-config and the appwrite/ directory holding docker-compose.yml and .env (docs).
The settings it needs behind a proxy
- Setup wizard: Hostname and Use HTTPS: Hostname is the domain or IP Appwrite is reached at; Use HTTPS must be on when the domain is HTTPS, including behind a reverse proxy. (docs)
_APP_DOMAIN: Appwrite’s domain; on a public suffix domain Traefik tries to obtain a certificate automatically (needs ports 80/443 reachable), default localhost. (docs)_APP_CONSOLE_URL(>= 2.3.0): Origin of the Console used in OAuth defaults and email links; set it when the Console is served from a different host than the API. (docs)_APP_OPTIONS_FORCE_HTTPS(deprecated since 1.7.0): Redirects HTTP to HTTPS and adds Strict-Transport-Security; only works on default ports 80 and 443, so it can fight a TLS-terminating tunnel. (docs)_APP_TRUSTED_PROXIESand_APP_TRUSTED_HEADERS: Which proxy addresses may set X-Forwarded-For for the client IP; default covers loopback and private ranges, add a public load balancer range. (docs)_APP_DOMAIN_TARGET_CNAME,_APP_DOMAIN_TARGET_A,_APP_DOMAIN_TARGET_AAAA: DNS targets customers point custom domains at (default localhost, 127.0.0.1, ::1). (docs)_APP_DOMAIN_FUNCTIONSand_APP_DOMAIN_SITES: Wildcard-style preview domains for functions and sites (defaults functions.localhost and sites.localhost); empty turns previews off. (docs)_APP_SYSTEM_SECURITY_EMAIL_ADDRESS: Email used when issuing SSL certificates for custom domains. (docs)_APP_HTTP_PORTand_APP_HTTPS_PORT: Host ports Traefik publishes (default 80 and 443); also under Advanced settings in the wizard. (docs)
Before it faces the internet
- The encryption key _APP_OPENSSL_KEY_V1 must be set and never changed; changing it loses stored passwords, OAuth secrets and API keys. The wizard generates one and shows it once. (docs)
- The wizard shows the generated secret key a single time. (docs)
- Manual installs must replace the encryption key and executor secret. (docs)
- Only the first Console user can register by default; others need invitations (_APP_CONSOLE_WHITELIST_ROOT, _EMAILS and _IPS restrict it further). The first visitor to the wizard or Console becomes the owner, so finish setup before exposing it. (docs)
- Installer wizard needs a one-time secret printed to the terminal. (docs)
- Default database credentials are shipped in the example variables. (docs)
- Environment defaults to development. (docs)
- Executor secret must be changed. (docs)
- Rate limiting is on by default; disabling is discouraged. (docs)
Things to ask next
Everything after the install is one more sentence to the agent. Some that come up:
- “Create the tables for a simple CRM: companies, contacts and deals.”
- “Seed it with sample data so I can try the interface.”
- “Move Appwrite to app.example.com.” Add the domain on the dashboard’s Domains page with a CNAME to
domains.envhaven.app, and the agent changes Appwrite’s address settings to match. - “Update Appwrite to the latest release.” It pulls the new image and recreates the container, data kept.
Instructions for the agent
The agent reads these from the page’s Markdown copy. They also work pasted on their own, if you would rather give them in your own words.
Set up Appwrite on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, appwrite/appwrite, starting from the docs' compose file: https://github.com/appwrite/appwrite/blob/main/docker-compose.yml. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- The docs' setup includes: Traefik (reverse proxy, ports 80/443, MQTT 8883/8084); Redis; ClickHouse (required in every install); PostgreSQL (appwrite/postgres, default), or MariaDB, or MongoDB, chosen once in the setup wizard; OpenRuntimes executor and orchestrator (functions); Appwrite API, console, realtime and MQTT containers, plus one combined worker (appwrite-worker) and one scheduler (appwrite-task-scheduler) by default; helper containers: browser, exiftool, autogravity, geo, and two maintenance and interval tasks.
- Keep the compose file in ~/apps/appwrite and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Appwrite's port 80.
- The preview URL terminates HTTPS in front of Appwrite: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/appwrite.md for the preview URL, as Appwrite's docs describe for running behind a proxy; skip any that apply only when Appwrite serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/appwrite.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Appwrite up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.
What to know
- In Docker, Appwrite’s containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
- Setup wizard listens on port 20080; docs say open it in the firewall, while the README binds it to 127.0.0.1 with a one-time secret and says to SSH-tunnel for remote hosts. (docs)
- Push-notification MQTT is raw TCP and MQTT-over-WebSocket on extra ports (8883, 8084) terminated by Traefik; an HTTP-only tunnel will not carry the 8883 listener. (docs)
- Automatic certificates need Traefik reachable on 80/443 for the public domain; behind a TLS-terminating tunnel let the tunnel own TLS and turn the wizard’s Use HTTPS on. (docs)
- File upload limit defaults to 30 MB (the value is set in bytes), below a 100 MB tunnel cap. (docs)
- No mail is sent until SMTP is configured; the default SMTP host is empty. (docs)
- Heavy footprint: Traefik, ClickHouse, Redis, a database and about a dozen Appwrite containers (17 by default in the repo compose with the combined worker topology); docs require 4 GB RAM plus 2 GB swap. (docs)
- The installer and Traefik mount the Docker socket; functions run through an executor and orchestrator. (docs)
- A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.
Without a workspace
The manual route, on a server you run:
- Rent a Linux VPS, secure SSH, and create a user for the app.
- Install Docker and write a compose file from the official image.
- Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
- Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
- Keep the firewall closed except for the proxy, and schedule backups and updates.
Appwrite’s own documentation covers each step for its install methods.
Sources
Facts about Appwrite come from its own documentation, checked on 2026-11-23:
- appwrite.io/docs/advanced/self-hosting/installation
- appwrite.io/docs/advanced/self-hosting/configuration/environment-variables
- github.com/appwrite/appwrite/blob/main/docker-compose.yml
- github.com/appwrite/appwrite/blob/main/README.md
- appwrite.io/docs/advanced/self-hosting/production/backups
- appwrite.io/docs/advanced/self-hosting/production/security
- appwrite.io/docs/advanced/self-hosting/configuration/databases