Skip to content

GitHub Setup

GitHub webhooks allow VPS Deployer to automatically trigger deployments when you push to your configured branch.

  1. Open your project in VPS Deployer
  2. On the project details page, find the Webhook section
  3. Copy the Webhook URL and Webhook Secret
  1. Go to your GitHub repository
  2. Navigate to Settings → Webhooks → Add webhook
  3. Fill in the form:
SettingValue
Payload URLYour webhook URL (e.g., http://your-vps:3000/webhook/<project-id>)
Content typeapplication/json
SecretThe webhook secret from VPS Deployer
Which events?Just the push event
  1. Click Add webhook

Push to your configured branch:

Terminal window
git push origin main

You should see:

  • A green checkmark on the GitHub webhook (last delivery was successful)
  • A new deployment appear in VPS Deployer
SettingBehavior
Auto Deploy: ONWebhook triggers deployment immediately
Auto Deploy: OFFWebhook is received but deployment must be triggered manually

You can toggle this on the project details page at any time.

GitHub sends a JSON payload on every push. VPS Deployer extracts:

  • ref — the branch that was pushed to
  • head_commit — commit SHA, message, author, and timestamp
  • repository — repo name and URL

Only pushes to your configured branch trigger a deployment. Other branches are silently ignored.

Every webhook is verified using HMAC-SHA256 with your per-project secret. See HMAC Verification for details.

IssueSolution
404 on webhook URLCheck the project ID in the URL matches your project
401 UnauthorizedVerify the webhook secret matches exactly
Webhook not firingCheck GitHub’s webhook delivery logs for errors
Wrong branch deployingVerify the branch name matches in both GitHub and VPS Deployer