Self-host Plausible Community Edition

Cookie-free web analytics: a small tracking script on your sites and a dashboard of traffic stats, self-hosted as the Community Edition. Run your own Plausible Community Edition 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 Plausible Community Edition 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 Plausible Community Edition 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 (Plausible Community Edition 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 Plausible Community Edition on this workspace and give me the link. Follow https://envhaven.com/self-host/plausible.md

Then open the link it sends and create your Plausible Community Edition 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 Plausible Community Edition’s docs require.

Or keep it private with Tailscale

The preview URL puts Plausible Community Edition 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 Plausible Community Edition 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 Plausible Community Edition on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/plausible.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
  • A Tailscale container runs beside Plausible Community Edition, 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 isDatabases, backends and analytics
LicenseAGPL-3.0-or-later
Runs asDocker (ghcr.io/plausible/community-edition)
Memory2 GB recommended (ClickHouse and Plausible together) (docs)
Plan that fitsPlus or larger
Web port8000
Documentationgithub.com/plausible/community-edition/blob/v3.2.1/README.md

What your agent takes care of

  • Installing it. Plausible Community Edition runs from the official image, ghcr.io/plausible/community-edition, with its data in folders under ~/apps/plausible.
  • Putting it on an HTTPS address. The workspace’s preview URL serves it, and your own domain can too.
  • Locking it down first. What Plausible Community Edition’s docs say to set before it faces the internet, below.
  • Telling you what to back up: Docker volume db-data (PostgreSQL), Docker volume event-data and event-logs (ClickHouse analytics events), Docker volume plausible-data (/var/lib/plausible) and the .env file (BASE_URL and SECRET_KEY_BASE) (docs).

The settings it needs behind a proxy

  • BASE_URL: Public URL of the instance, with scheme; used for link generation and WebSocket origin checks. Required, no default; must match the domain users visit. (docs)
  • BASE_URL matches the real domain: README: set it to the actual hosting domain; it also drives Let’s Encrypt issuance when ports 80 and 443 are used. (docs)
  • HTTP_PORT and HTTPS_PORT: Listen ports; HTTP_PORT defaults to 8000. Setting 80 and 443 turns on built-in Let’s Encrypt; leave HTTP_PORT alone behind a proxy or tunnel. (docs)
  • Reverse proxy is optional: Since 2.1.2 the container can serve HTTPS itself; the nginx and Apache samples are community-contributed and untested by maintainers. (docs)
  • WebSocket path /live/websocket: The dashboard live view uses it; the proxy must upgrade it (nginx sample sets Upgrade and Connection headers). (docs)
  • X-Forwarded-For header: Proxy passes the visitor IP; the nginx sample sets it with $proxy_add_x_forwarded_for. (docs)
  • compose.override.yml port binding: The proxy guide binds the container to loopback only. (docs)

Before it faces the internet

  • The first visitor creates the first user (admin); do this right after start-up, before the URL is public. (docs)
  • Registration is invite-only by default (DISABLE_REGISTRATION=invite_only); true blocks it entirely, false opens it. (docs)
  • SECRET_KEY_BASE has no default and must be at least 64 bytes. (docs)
  • The compose file ships a default Postgres password of postgres (database not published to the host by default). (docs)
  • TOTP secrets are encrypted with a key derived from SECRET_KEY_BASE unless TOTP_VAULT_KEY is set. (docs)
  • Secrets can be supplied as files under /run/secrets instead of environment variables. (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 Plausible Community Edition to app.example.com.” Add the domain on the dashboard’s Domains page with a CNAME to domains.envhaven.app, and the agent changes Plausible Community Edition’s address settings to match.
  • “Update Plausible Community Edition 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 Plausible Community Edition on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, ghcr.io/plausible/community-edition, starting from the docs' compose file: https://github.com/plausible/community-edition/blob/v3.2.1/compose.yml. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- The docs' setup includes: PostgreSQL 16 (postgres:16-alpine): users, sites and settings; ClickHouse (clickhouse/clickhouse-server:24.12-alpine): analytics events.
- Keep the compose file in ~/apps/plausible 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 Plausible Community Edition's port 8000.
- The preview URL terminates HTTPS in front of Plausible Community Edition: 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/plausible.md for the preview URL, as Plausible Community Edition's docs describe for running behind a proxy; skip any that apply only when Plausible Community Edition serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/plausible.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 Plausible Community Edition 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, Plausible Community Edition’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.
  • Without SMTP_HOST_ADDR Plausible sends mail directly, which needs outbound port 25 plus SPF or DKIM records; otherwise use an SMTP relay (port 587 default, 465 with SSL) or the Postmark, Mailgun, Mandrill or SendGrid adapters. (docs)
  • Built-in Let’s Encrypt needs the container reachable on 80 and 443; behind an HTTP-only tunnel keep HTTP_PORT at its default and let the tunnel terminate TLS. (docs)
  • ClickHouse needs a CPU with SSE 4.2 or NEON and about 2 GB RAM; the compose file ships low-resource ClickHouse settings for small servers. (docs)
  • IP geolocation uses a bundled db-ip country database; MaxMind GeoLite2 city data is an optional download that needs outbound access. (docs)
  • Security fixes are not backported; the docs say to keep upgrading and to pin the image to a patch version. (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:

  1. Rent a Linux VPS, secure SSH, and create a user for the app.
  2. Install Docker and write a compose file from the official image.
  3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
  4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
  5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Plausible Community Edition’s own documentation covers each step for its install methods.

Sources

Facts about Plausible Community Edition come from its own documentation, checked on 2026-11-23: