Create your GitHub App
Register the GitHub App a self-hosted SpecsGraph install uses for sign-in, webhooks and commits: URLs, permissions, events, credentials and installation.
Why you need your own App
SpecsGraph talks to GitHub through a GitHub App. People sign in with it, it receives webhooks when repositories change, and it writes approved spec changes as commits and pull requests. Each self-hosted install needs its own, because GitHub sends an App's webhooks to a single URL. SpecsGraph Cloud, which is coming soon, will use an App run by SpecsGraph instead.
You need owner rights in the GitHub organization that holds your repositories, and the webhook secret you generated during the install (grep GITHUB_APP_WEBHOOK_SECRET .env prints it). The install does not have to be running yet, but the public URL must be final.
Register the App
Open the GitHub App settings
In your organization on GitHub, go to Settings > Developer settings > GitHub Apps and choose New GitHub App. For an App owned by your personal account, the same path starts from your account settings.
Fill in the basics
Use the values from the table below. The App name must be unique on GitHub, so include your company, for example
SpecsGraph Northwind. Every URL starts with yourSPECSGRAPH_PUBLIC_URL.Set up the webhook
Keep Active checked, enter the webhook URL and paste the value of
GITHUB_APP_WEBHOOK_SECRETas the webhook secret. Leave SSL verification enabled.Choose permissions, then events
Set the repository permissions from the next section and leave everything else at No access. The event checkboxes appear once the matching permission is set.
Limit where it can be installed
Under Where can this GitHub App be installed?, choose Only on this account, then choose Create GitHub App.
Permissions and events
SpecsGraph asks for the smallest set of repository permissions it needs:
GitHub requires Metadata read access for every App and sets it for you. The App subscribes to these webhook events:
Credentials and where they go
After you create the App, GitHub opens its settings page. Collect the values there and put each one where the install expects it:
Save .env and run docker compose up -d to apply the values. Configuration covers how to store the key file.
Note
Check the first webhook
GitHub sends a ping to the webhook URL when the App is created. Under Advanced > Recent Deliveries in the App settings you can see whether it arrived. If the install was not running yet, choose Redeliver once it is.
Install the App on your repositories
In the App settings, open Install App and choose Install next to your organization. Pick Only select repositories and choose the repositories that should hold specs. You can add more later from the same page.
Then connect the workspace to the installation and each project to its repository from inside SpecsGraph, as described in Connect GitHub.
Rotate credentials
- Private key. Generate a new key, replace the file, run
docker compose up -d --force-recreate, then delete the old key in GitHub. - Client secret. Generate a new secret, update
GITHUB_CLIENT_SECRET, apply it, then delete the old secret in GitHub. - Webhook secret. Generate a value with
openssl rand -hex 20, then update GitHub andGITHUB_APP_WEBHOOK_SECRETtogether. Redeliver any deliveries that failed in between.
Next steps
- Connect GitHub: link repositories to projects.
- Spec files in your repository: what the App writes.
- Branches and pull requests: how approved proposals reach your base branch.