Setup checks and the install guide
How a self-hosted install reports its own setup, and how the browser install guide uses it. The contract for GET /api/setup/status and the GitHub App manifest landing.
{/* Imported from CoderHelm/coderhelm-platform/docs/self-host/setup-checks.md at a9906dd2234a. Edit it there. */}
The install guide installs CoderHelm from your browser. It reads three things, all in your own account: the installer's progress file, your install's public GET /api/setup/status, and your install's GitHub App manifest landing. Nothing about your install passes through CoderHelm's servers. The hosted CoderHelm has neither route.
How the install guide works
-
Launch. The guide makes a CloudFormation quick-create link with your region, install name and email filled in, plus two random values made in your browser:
- a progress ID (16 characters), which names a small bucket,
coderhelm-setup-<id>, in your account; - a setup key (40 characters), kept in your browser's storage and in the stack's parameters.
Quick-create links ignore hidden (NoEcho) parameters, so both values appear in the stack's Parameters tab. The setup key works only once, only on your install, and only until a GitHub App exists.
- a progress ID (16 characters), which names a small bucket,
-
Progress. The installer (CodeBuild,
selfhost/launch/bootstrap.mjs) writesstatus.jsonto that bucket: the phase, a plain message, the step count and, at the end, your CoderHelm URL. With your own domain it also writesdomain: the hostname,mode(route53when the deploy set it all up,externalotherwise),state, and the DNSrecordsto add (names and values, which are public in DNS anyway). Account numbers, ARNs and email addresses are removed before writing. The guide readshttps://coderhelm-setup-<id>.s3.<region>.amazonaws.com/status.json. If your account blocks public bucket policies (S3 Block Public Access at account level), the file stays private and the guide asks you to paste the URL from the stack's Outputs instead. The install itself is unaffected. -
Checks. Once the URL is known, the guide polls
GET <url>/api/setup/status(below) and shows each check as waiting, passing or failing, with a fix. -
GitHub App. The guide posts a GitHub App manifest to github.com with
redirect_urlset to<url>/api/setup/github/callbackandstateset to the setup key. GitHub sends the browser to your install with a one-time code. Your install exchanges the code for the app's keys, stores them in its own secret, restarts its services to read them and sends you back to the guide. The keys never leave your account.
GET /api/setup/status
The guide's checks come from the install's public GET /api/setup/status, the same checks the CLI's doctor and the dashboard's setup checklist use. Its shape, codes, setup window and rate limit are documented in Check your install. The guide uses:
checks[](id,label,status,code,required) forapi,github_app,github_installed,models,email,domain,google_sign_in,updatesandadmin, each code mapped to one sentence and a fix; an unknown check shows by its label.domain: when you chose your own domain, the guide shows a Domain step between AWS and GitHub with the records from the progress file, checks until the code isok, then follows the install to the domain (so the GitHub App gets the domain's URLs). You can skip it and add the domain later in Settings, then System.github_manifest_ready: one click when true; the terminal command (pull, thengithub-app) when false.setup_open: false(someone has signed up): the install is shown as ready.
The answer carries no ids or URLs, so the guide makes its own links: the Bedrock console for the region it launched in, the models a new install calls (the release's defaults with the region's inference profile prefix), the SES console for that region, and https://github.com/apps/<slug>/installations/new from the slug the manifest landing hands back.
GET /api/setup/github/callback
GitHub's manifest flow lands here with code and state. The install:
- refuses when a GitHub App is already stored (
exists), or whenstateis not its setup key (bad_state); - exchanges the code at
POST https://api.github.com/app-manifests/{code}/conversions(github_refusedwhen GitHub says no; codes last one hour and work once); - stores
github_app_id,github_private_key,github_webhook_secret,github_client_id,github_client_secretandgithub_app_slugin its secret and deletes the setup key (store_failedwhen it cannot); - asks the updater to restart the gateway, streaming and worker functions (
refresh_secrets) so they read the new keys; - redirects to
SETUP_RETURN_URL(defaulthttps://docs.coderhelm.com/self-host/install/) with?github=<outcome>&app=<slug>, where the outcome iscreated,created_restart_neededor one of the errors above.
Where it lives
- Manifest landing:
services/gateway/src/routes/setup.rs - Setup checks:
services/gateway/src/routes/setup_checks.rs - Launch Stack template:
infra/cfn/coderhelm-selfhost-launch.yaml, pinned to each release byselfhost/launch/stamp-template.mjsand published tos3://coderhelm-public/launch/<tag>/coderhelm-launch.yamlby the release workflow - Installer run by the stack:
selfhost/launch/bootstrap.mjs - Install guide:
docs/app/self-host/install/in the CoderHelm/coderhelm repository