How to Create a Self-Hosted GitHub App


If you are using Bencher Cloud, then you can simply sign up or log in using the GitHub button.

For Bencher Self-Hosted, you will need to have a Bencher Plus Enterprise plan, create your own GitHub App, and update your console server configuration and API sever configuration.

Create a GitHub App

  • Create a GitHub App
  • GitHub App name
    • Choose an unique name (ex: Bencher for My Enterprise)
  • Homepage URL
    • Set it to your Bencher Self-Hosted Console URL (ex: https://bencher.example.com)
  • Identifying and authorizing users
    • Callback URL
      • Set the callback URL to your Bencher Self-Hosted Console URL with the path /auth/github (ex: https://bencher.example.com/auth/github)
    • ✅ Expire user authorization tokens
    • ✅ Request user authorization (OAuth) during installation
    • ✅ Enable Device Flow
  • Webhook
    • ❌ Active - Uncheck this box
  • Permissions
    • Account permissions
      • Email addresses: Read-only
  • Where can this GitHub App be installed?
    • 🔘 Any account
  • Click Create GitHub App
  • Now under General for the newly created app
  • Note the Client ID (ex: Iv1.12864abcd1232048)
  • Client secrets
    • Click Generate a new client secret
    • Note this secret (ex: 00000abcd12345wxyz123456789abcdefgh0000)
  • Add the Bencher logo PNG under Display information
  • Private keys
    • Click Generate a private key

GitHub App Configuration

Console UI

Set the OAUTH_GITHUB environment variable to true when you run the bencher-console Docker image. (ex: OAUTH_GITHUB=true) If the Client ID is missing, then the GitHub buttons will not appear in the UI.

API Server

Add the client_id and client_secret to the plus.github section of the server config. If the GitHub section is missing, then the server will fail any GitHub authentication requests.

Linked Repositories

Upgrade the Bencher Self-Hosted API server and Console to v0.6.16 or later before you change these settings.

For a Project to link a GitHub repository for its detached runs, also set these for the GitHub App:

  • Identifying and authorizing users
    • Callback URL
      • Set the first callback URL to your Bencher Self-Hosted Console URL with the path /console/github (ex: https://bencher.example.com/console/github). GitHub sends the user to the first callback URL after they install the app.
      • Keep the callback URL with the path /auth/github after it, for sign in (ex: https://bencher.example.com/auth/github). GitHub refuses a sign in whose callback URL is not listed.
    • ✅ Request user authorization (OAuth) during installation
  • Webhook
    • ✅ Active - Check this box
    • Webhook URL
      • Set it to your Bencher Self-Hosted API Server URL with the path /v0/github/webhook (ex: https://api.bencher.example.com/v0/github/webhook)
    • Webhook secret
      • Enter a random secret and note it (ex: 0123456789abcdef0123456789abcdef)
  • Permissions
    • Repository permissions
      • Contents: Read and write
    • Subscribe to events
      • Leave every event unchecked
  • Note the app’s slug, the last part of its public page URL (ex: my-bencher-app in https://github.com/apps/my-bencher-app)

Add the slug, the private key, and the webhook secret as app in the plus.github section of the server config.


🐰 Congrats! You have learned how to setup a GitHub App! 🎉


Add Bencher to GitHub Actions ➡



Published: Sat, August 12, 2023 at 4:07:00 PM UTC | Last Updated: Wed, October 28, 2026 at 5:53:42 AM UTC