Skip to content

Self-host: the dashboard's links point at the install, never at coderhelm.com - #227

Merged
nambok merged 1 commit into
mainfrom
fix/selfhost-links
Oct 26, 2026
Merged

nambok merged 1 commit into
mainfrom
fix/selfhost-links

Conversation

@nambok

@nambok nambok commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The dashboard's links point at the install it runs in, never at coderhelm.com. On a self-hosted install, the API keys and plugins pages called the hosted API, the API keys page told people to use https://api.coderhelm.com, and the GitHub App buttons opened CoderHelm's hosted app. Paired with CoderHelm/coderhelm-platform#312, which adds the /auth/github/app redirect these buttons use.

Changes

  • lib/api-keys.ts and lib/plugins.ts: call apiBase() from the runtime config, not NEXT_PUBLIC_API_URL or api.coderhelm.com.
  • API keys page: the "How keys work" address and the curl example show apiOrigin(), the install's own API.
  • GitHub App links (Settings, then GitHub; Repositories; the "app was removed" screen): githubAppUrl() sends them to the install's /auth/github/app, which redirects to the install's own app on GitHub (with state for a new installation, or an installation's settings).
  • The legacy platform-admin fallback (admin@coderhelm.com, for gateways before the platform_admin field) applies on the hosted dashboard only.
  • scripts/no-hosted-links.mjs, run by npm run lint: fails on new hardcoded app., api., stream. or auth.coderhelm.com, the marketing site or github.com/apps/coderhelm in src/, outside lib/runtime-config.ts.
  • e2e/selfhost-links.spec.ts: with a self-host runtime config, the API keys, Repositories and GitHub pages show and call only the install, and have no coderhelm.com links other than docs.coderhelm.com. It runs in the self-host build job too.

Verification

…helm.com

- The API keys and plugins pages called NEXT_PUBLIC_API_URL or
  api.coderhelm.com instead of the runtime config, so on a self-hosted
  install they called the hosted API. They now use apiBase().
- The API keys page showed https://api.coderhelm.com in its instructions
  and curl example; it shows the install's own API address.
- "Install the GitHub App", "Fix access in GitHub", "Reinstall the GitHub
  app" and the installation settings link opened the hosted app
  (github.com/apps/coderhelm). They go through the install's
  /auth/github/app, which redirects to its own app.
- The legacy platform-admin fallback (admin@coderhelm.com) applies on the
  hosted dashboard only.

Guards: e2e/selfhost-links.spec.ts runs with a self-host runtime config and
fails on any coderhelm.com link other than docs.coderhelm.com and on calls
leaving the install; it runs in the self-host build job too.
scripts/no-hosted-links.mjs (part of npm run lint) fails on new hardcoded
hosted addresses in src/.
@nambok
nambok force-pushed the fix/selfhost-links branch from 381fe24 to 3c1f69e Compare October 26, 2026 20:38
@nambok
nambok merged commit e59f8f3 into main Oct 26, 2026
5 checks passed
@nambok
nambok deleted the fix/selfhost-links branch October 26, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant