# Copy to .env next to compose.yml (docs/guides/self-host.md). `docker compose` reads it and passes # the values to the container. Treat it as private — `chmod 600 .env`, never commit it — since it # holds secrets once Build chat is on (CLOUDHAL_AI_TOKEN) or BETTER_AUTH_SECRET or # CLOUDHAL_SETUP_TOKEN is set. To keep # secrets out of a checkout, put them in a second file outside it and name both, with full paths # (relative ones resolve against the current directory), in COMPOSE_ENV_FILES for every command # that creates the container (`up`, `pull && up`, `run`), e.g. in the shell profile: # export COMPOSE_ENV_FILES=/path/to/cloudhal/.env,/etc/cloudhal/secrets.env # A one-off `--env-file` is not enough: the next `up` without it drops the secrets. The cron line's # `docker compose exec` runs in the running container and needs neither. # The image tag. `latest` follows every release; pin the minor (`0.6`) in production. CLOUDHAL_TAG=latest # The volume that holds the installation (the project, its database, media, the built site). A # stack created with the compose file of 0.6.3 has `_cloudhal-data` (`docker volume ls`; # `cloudhal_cloudhal-data` after the guide's quick start): name it here to keep using it. A second # Cloudhal stack on this host needs a volume name of its own (and its own port and base URL). #CLOUDHAL_VOLUME=cloudhal-data # Where browsers open Studio: scheme, host and port, no path, e.g. http://localhost:9000 with # CLOUDHAL_PORT=9000, http://192.168.1.20:8787 on the LAN, https://studio.example.org behind a # proxy. Set, it is the only origin sign-in accepts (and the origin of invite links), so it must be # exactly what the address bar shows: a wrong value leaves Studio loading but every sign-in # answered 403. Empty: sign-in accepts whatever address the browser used, and the log warns. # Required behind a reverse proxy (the caddy profile), with CLOUDHAL_BEHIND_PROXY=1 so the proxy's # X-Forwarded-* headers count: Studio refuses to start with the proxy flag and no base URL (or, # in this image, a localhost one). CLOUDHAL_BASE_URL= CLOUDHAL_BEHIND_PROXY=0 # Which address and port of this machine publish the container's port 8787 (0.0.0.0 to expose it # directly; keep 127.0.0.1 with the caddy profile). A new port goes into CLOUDHAL_BASE_URL too. CLOUDHAL_BIND=127.0.0.1 CLOUDHAL_PORT=8787 # The public site's origin (https://host, no path), once the site has a domain: Caddy serves # `site-build`'s output there (caddy profile), and `site-build` writes the host into canonical # links, the sitemap and feeds (cloudhal.json `domains.site`). Leave it empty until then. CLOUDHAL_SITE_URL= # The first start on an empty volume creates a project from this starter with this site name. CLOUDHAL_INIT=blog CLOUDHAL_SITE_NAME=My site # Rebuild the public site (`site-build`) after every publish, approval, rollback and scheduled # release, and once at start; `off` when the site is built elsewhere (CI, another host). Unset or # empty means `on` in the image. CLOUDHAL_SITE_BUILD=on # A running build's deadline in whole seconds (default 1800, 30 minutes; the wait for another # build's lock counts). A build past it is ended and recorded as failed; the next publish tries again. # CLOUDHAL_SITE_BUILD_TIMEOUT=1800 # Scheduled automations (`off` stops them; releases and gates go on). CLOUDHAL_AUTOMATIONS=on # Extra origins the API accepts browser requests from, comma-separated (normally empty). CLOUDHAL_TRUSTED_ORIGINS= # Remote MCP clients (Claude, ChatGPT, Cursor, VS Code) connecting by URL over OAuth; needs # CLOUDHAL_BASE_URL. `off` turns OAuth off, or only Client ID Metadata Documents (CIMD), or only # dynamic client registration (DCR; Cursor needs it). The host list (comma-separated, `*.host` # allowed) limits the hosts a client's metadata document or redirect may use; empty: any. CLOUDHAL_MCP_OAUTH=on CLOUDHAL_MCP_CIMD=on CLOUDHAL_MCP_DCR=on CLOUDHAL_MCP_CLIENT_HOSTS= # Extra private-use redirect schemes of native apps, comma-separated (cursor and vscode are known). CLOUDHAL_MCP_REDIRECT_SCHEMES= # Secrets, each passed to the container only when set here or in the shell. # Better Auth's secret is created on the volume at first start (/data/.cloudhal/auth-secret) and # kept there; set this only to supply your own (32 or more random characters). Never leave it empty. #BETTER_AUTH_SECRET= # The first owner's setup token. Empty: a token is generated at each start while there is no # account, and the setup link (http://localhost:8787/login#setup=) is printed to the logs # (`docker compose logs cloudhal`). To choose it yourself: a random value of 32 characters or # more, only letters, digits and - . _ ~ (`openssl rand -hex 32`); the log then shows the link # with in place of the value. #CLOUDHAL_SETUP_TOKEN= # Workers AI over REST for Build chat (RFC-0016): both or neither. The token (a Cloudflare API # token with Workers AI read) stays in the container's memory; it is never written to the volume. #CLOUDHAL_AI_TOKEN= #CLOUDFLARE_ACCOUNT_ID=