push events and run its deploy pipeline. The endpoint does not use a session. It is authenticated by an HMAC-SHA256 signature of the raw request body, made with a per-project secret.
Set it up from the panel as described in Deploy and rollback, or with POST /api/projects/:id/webhook.
POST /api/webhooks/github/:id
sha256=<hex HMAC-SHA256 of the raw body using the project secret>. GitHub sets it when the webhook has a secret.Processing order
1
Find the project
Invalid ID:
400. Unknown project or no secret configured: 404.2
Verify the signature
The panel computes HMAC-SHA256 over the exact bytes it received and compares it with the header using
crypto.timingSafeEqual. A missing, malformed, or wrong signature returns 401.3
Check the event
ping returns 200. Events other than push return 200 with ignored: true.4
Check the branch
A push to another branch returns
200 with ignored: true.5
Deploy
If a deploy or rollback is already running for the service:
409. Otherwise the deploy starts in the background: 202.Responses
The response is sent before the deploy finishes. GitHub’s delivery log shows
202 even if the deploy later fails. Deploy output is only streamed to open project terminals and is not written to the journal. To check a webhook deploy, keep the project terminal open, or compare last_deploy_at and current_commit in GET /api/projects afterwards.
Secret handling
- Secrets are 32 random bytes, hex-encoded (64 characters).
- The secret is returned once, when you generate it, with
Cache-Control: no-store.GET /api/projectsonly showshas_webhook. - Generating a new secret replaces the old one immediately. Update the GitHub webhook afterwards.
DELETE /api/projects/:id/webhookremoves the secret. Further deliveries get404.
The webhook route sits under
/api like everything else, so it also passes the same-origin check. GitHub sends no Origin header, so the check lets it through.