What This Enables
- Private repo cloning in sandboxes
- Org‑wide repo access via installation tokens
- GitHub webhook triggers (when webhooks are reachable)
What You’ll Get
GITHUB_APP_IDGITHUB_APP_PRIVATE_KEYGITHUB_APP_WEBHOOK_SECRETNEXT_PUBLIC_GITHUB_APP_SLUG
GitHub App Setup (Self‑Host, Full Checklist)
Create the GitHub App
Go to Settings → Developer settings → GitHub Apps → New GitHub App.If you are creating it for an org, use Org Settings instead of personal settings.
Required app info
GitHub App name
- Any name, e.g.
proliferate-self-host
- Your app URL (example:
https://proliferate.example.com)
- Must be exactly:
https://YOUR_APP_URL/api/integrations/github/callback
- Must be exactly:
https://YOUR_APP_URL/api/webhooks/github-app
- Generate a new secret and use it for
GITHUB_APP_WEBHOOK_SECRET
Permissions
Minimum permissions for cloning and repo access:
- Repository permissions
Contents: Read-onlyMetadata: Read-only
Pull requests: Read-onlyIssues: Read-onlyCommit statuses: Read-onlyChecks: Read-only
Members: Read-only(only if you need org user data)
Webhook events
Enable these events for triggers:
pushpull_requestissuescheck_suitecheck_runworkflow_run
Generate the private key
In your GitHub App settings:
- Click Generate a private key
- Download the
.pemfile - This content becomes
GITHUB_APP_PRIVATE_KEY
Install the app
Go to the app page and click Install App.Choose:
- All repositories (recommended), or
- Only selected repositories (more restrictive)
Set environment variables
Add these to Notes:
.env or .env.local:GITHUB_APP_PRIVATE_KEYmust preserve newlines (\n)NEXT_PUBLIC_GITHUB_APP_SLUGis the app slug from:https://github.com/apps/<slug>
Optional: GitHub App Manifest
Use this if you want to create the app from a manifest instead of the GitHub UI. ReplaceYOUR_APP_URL.
The manifest flow redirects to
redirect_url with a temporary code. If you don’t have a handler for that code, use the manual setup above.If you don’t need GitHub triggers, remove
default_events entries and the extra permissions.Troubleshooting
Webhook delivery fails
Webhook delivery fails
YOUR_APP_URLmust be publicly reachable for GitHub webhooks- For local testing, use a tunnel and update
NEXT_PUBLIC_APP_URL
Auth errors
Auth errors
- Make sure
GITHUB_APP_PRIVATE_KEYincludes the full PEM block - Ensure
GITHUB_APP_IDis correct (numeric)
Repo access missing
Repo access missing
- Check installation scope (all repos vs selected)
- Verify permissions include
Contents: Read-only
