Repository navigation
Closed
Description
Findings from the adversarial review of the 0.6.3 Docker image, compose stack, self-host guide and docker.yml (#143, #148). The CLI/API side (setup token, Better Auth origins, --no-auth, rate-limit IP) is #165.
High
- The documented backup archives an empty volume.
docs/guides/self-host.md:88runsdocker run --rm -v cloudhal-data:/data … tar czf …, butdeploy/docker/compose.yml:46-47declaresvolumes: cloudhal-data:withoutname:, so the stack's volume is<project>_cloudhal-data(cloudhal_cloudhal-dataafter the quick start'smkdir cloudhal).docker run -vauto-creates an emptycloudhal-data, tar archives nothing, exit 0; the restore lands in a volume the stack never mounts. This is the guide's only pre-upgrade rollback path. Fix:name: cloudhal-dataon the volume (and say so), or make the backup command usedocker compose run/$(docker compose ... ).
Medium
site-buildempties/data/distbefore rendering (deploy/docker/bin/site-build:13): the Caddy-served site is a bare 404 for the length of each build, and the guide's 15-minute cron makes that recurring; a failed build leaves the site empty. Build into/data/dist.next, then swap atomically (rename), keep the previous output on failure.- Release tags are pushed and attested before the smoke test and Trivy (
.github/workflows/docker.yml:111): a failing gate leaves a brokenlatest/X.Ylive. Alsolatestis skipped for a release started via Actions › Release › Run workflow, and a dispatch backfill of an older patch movesX.Ybackwards (docker.yml:93-94). Fix: build and push by digest (orsha-tag) first, smoke + Trivy against that digest, then add the version tags withdocker buildx imagetools create; computelatest/X.Yfrom the highest released version, not from the event.
Low (docs and compose riders)
BETTER_AUTH_SECRETfrom.envnever reaches the container:compose.yml:14does not pass it, while the guide (self-host.md:62) tells operators to set it.- Guide (
self-host.md:21) and.env.examplesay invites and reset links are printed to the logs; the container prints nothing unlesscloudhal.jsonhasmail— document themailsetting or make the terminal sender the default when no mail transport is configured. compose.yml:38::?interpolation in the inactivecaddyprofile failsdocker compose upunless both Caddy variables are set; use:-with a comment, or move the check into the Caddy entrypoint..env.example:1says "No secrets live here" while asking for the Workers AI token; the guide says it is "never stored". Say what is a secret and point at Docker secrets / an env file outside the repo..env.example:9: changingCLOUDHAL_PORTwithoutCLOUDHAL_BASE_URLleaves Studio loading but sign-up/sign-in failing with 403 (Better Auth origin). Couple the two in the comments, and after Self-host: auth hardening after the 0.6.3 review (setup token, Better Auth origins, --no-auth guard, rate-limit IP) #165 lands, sayCLOUDHAL_BASE_URLis required for any non-localhost origin.self-host.md:68: nothing says how the static build learns the public site origin, so canonical links, sitemap and feeds say localhost. DocumentCLOUDHAL_SITE_URL/the site'sbaseUrl(whichever the build reads) and pass it insite-build.Dockerfile:6: the build example names 0.6.2, whose CLI rejects the entrypoint's--init-if-empty; use0.6.3/latestor a placeholder.- Critic gaps worth a line each:
site-buildbefore the first publish builds the latest or a live snapshot (drafts) — until RFC-0043 PR 2's--publishedmode, the guide must not claim "published only"; the Caddyfile'shandle_errors → /404.htmlis dead for the default starter (no/404page) and_headersis ignored by Caddy (addheader /media/* Cache-Control …); the guide's "previews are visible" claim is wrong on Node (noApiDeps.preview). - Smoke coverage (
scripts/docker-smoke.ts): addGET /→ Studio index.html,POST /mcp→ 401, and an arm64 run under QEMU before tags move.
Done when
- Items 1–3 fixed with the workflow verified by a dispatch run against an existing version (re-tag only, no new release).
- Guide,
.env.example, compose and Dockerfile updated for 4–11; smoke test extended for 12. pnpm checkgreen (docker-smoke needs Docker; run it locally once).
Source: adversarial review run after the 0.6.3 release (178 agents, 47 confirmed findings).
Metadata
Metadata
Assignees
Labels
No labels
Activity
Madraka commentedon Nov 8, 2026
Wording for
docs/guides/self-host.md,.env.exampleand the compose file now that the #165 fix is in #169. That PR does not touch these files; they belong to this issue.Quick start, replacing "the first account that signs up is the Owner, after which sign-up closes":
Beyond localhost, the
CLOUDHAL_BASE_URLrow:Beyond localhost, the
CLOUDHAL_BEHIND_PROXYrow: add "and the client's address for rate limits from the lastX-Forwarded-Forhop".Environment table: add a row for
CLOUDHAL_SETUP_TOKEN. Default empty: a token is generated at each start while there is no account, and printed to the logs.compose.yml: the cloudhal service lists its variables one by one, so aCLOUDHAL_SETUP_TOKENin.envnever reaches the container. AddCLOUDHAL_SETUP_TOKEN: ${CLOUDHAL_SETUP_TOKEN:-}to itsenvironment:; an empty value means a token is generated. Add a commented# CLOUDHAL_SETUP_TOKEN=to.env.examplewith the rule above. Also adjust its "No secrets live here" header, since this variable is a secret..env.example(item 8): changingCLOUDHAL_PORTorCLOUDHAL_BINDmeansCLOUDHAL_BASE_URLmust name the new origin. With the compose defaulthttp://localhost:8787, sign-in fromhttp://<lan-ip>:8787fails with 403, because a configured base URL is the only origin accepted. Either set it to the LAN origin or leave it empty.Limits /
--no-auth:cloudhal studio --no-authis now refused unless--hostis loopback and--behind-proxyis off, so it cannot be used in the container, which binds0.0.0.0.scripts/docker-smoke.ts: the #165 PR already passesCLOUDHAL_SETUP_TOKENto the container and checks that sign-up without it is refused. The PR body lists exactly what changed; item 12's additions go on top of that.fix(docker): keep /data/dist as the served path, previous-build asset…
fix(docker): 0.6.3 dist as site/previous, mount-point preflight, upgr…
Merge pull request #170 from cloudhal-dev/claude/stoic-jennings-52168b