For OpenHands Cloud, see GitHub Integration.
This page covers the GitHub App that you create and operate for OpenHands Enterprise.
Overview
A self-hosted installation needs its own GitHub App so GitHub can send events to your domain. Setup has four parts:- Create a GitHub App for the installation.
- Install the app on the organizations and repositories where OpenHands should run.
- Add the app credentials to the OpenHands Enterprise Admin Console and deploy the configuration.
- Have each user sign in to OpenHands with GitHub before they invoke
@openhands.
- The GitHub App posts acknowledgements and completion messages as the OpenHands bot.
- The agent uses the triggering user’s GitHub authorization for repository operations, including formal pull request reviews.
I'm on it! comment can appear as the bot while the resulting pull
request review appears as the user who requested it.
Prerequisites
Before you start, confirm:- OpenHands Enterprise is reachable at
https://app.<your-base-domain>. - The authentication service is reachable at
https://auth.<your-base-domain>when using the default Simple hostname mode. - Both hostnames use publicly trusted TLS certificates.
- You can create a GitHub App for your user or organization.
- You can install the app on the organizations and repositories that should use OpenHands.
- Your workstation has uv and can open a browser to GitHub.
Step 1: Create the GitHub App
Use the helper script in theOpenHands-Cloud
repository. It creates a private GitHub App with the callback URL, webhook URL,
permissions, and events expected by OpenHands Enterprise.
app. or auth. prefix. For example:
--org <github-org> to create the app under a GitHub organization instead
of your personal account. If the installation uses the Legacy hostname mode,
also pass --dns-layout nested so the OAuth callback uses
auth.app.<your-base-domain> instead of auth.<your-base-domain>.
The script starts a temporary callback server on port 9876, opens GitHub’s App
creation page, and asks you to create the app. After creation, it opens the app’s
installation page.
Save these values from the script output:
- GitHub App Client ID
- GitHub App Client Secret
- GitHub App ID
- GitHub App Slug
- GitHub App Webhook Secret
- GitHub App Private Key, saved under
scripts/create_github_app/keys/
App Configuration
The helper configures these URLs:
The OAuth callback URL above is for the default Simple hostname mode. The
helper uses
auth.app.<your-base-domain> when run with --dns-layout nested for
the Legacy mode. The OAuth callback handles user sign-in, while the webhook
URL receives issue and pull request events; these URLs are not interchangeable.
The app subscribes to these events:
- Issue comments
- Pull requests
- Pull request review comments
Step 2: Install the GitHub App
On the installation page opened by the helper script:- Select the GitHub user or organization that owns the repositories.
- Choose All repositories or select the repositories that should use OpenHands.
- Review the requested permissions.
- Select Install.
Installing multiple OpenHands GitHub Apps on the same repository causes each app
to receive the same
@openhands mention. This can start duplicate conversations
and produce duplicate acknowledgements, reviews, and completion comments.Step 3: Configure OpenHands Enterprise
Open the Replicated Admin Console and find GitHub Authentication in the application configuration.- Enable GitHub Authentication.
- Enter the GitHub App Client ID.
- Enter the GitHub App Client Secret.
- Enter the numeric GitHub App ID.
- Enter the GitHub App Slug.
- Enter the GitHub App Webhook Secret.
- Upload the GitHub App Private Key (
.pem). - Save the configuration and deploy the new version.
- Wait for the deployment to reach Ready.
Step 4: Sign In with GitHub
Each user must sign in to OpenHands with GitHub before invoking the resolver. The first sign-in links the GitHub identity to the user’s OpenHands account and stores the authorization needed to perform repository operations as that user. If a GitHub user who has not linked an OpenHands account mentions@openhands,
the bot responds with instructions to sign in before starting a job.
Use the Built-In Resolver
Mention@openhands in an issue, pull request comment, or inline pull request
review comment. You can also add the openhands label to an issue. Include the
task after the mention, for example:
- The GitHub App is installed for the repository.
- GitHub can deliver a valid webhook to the OpenHands webhook URL.
- The triggering user has signed in to OpenHands with GitHub.
- The triggering user has write access to the repository.
- Adds an eyes reaction to the triggering issue or comment.
- Creates an OpenHands conversation with the issue or pull request context.
- Posts an
I'm on it!acknowledgement as the GitHub App and links to the conversation. - Runs the task using the triggering user’s GitHub authorization.
- Posts the conversation’s final response as a completion comment from the GitHub App.
Customize Resolver Conversations
The resolver creates a standard OpenHands conversation. The triggering comment or labeled issue defines the task, and the issue or pull request provides additional context. Once the conversation starts, normal skill discovery and triggering apply. Available skills can come from OpenHands, the repository, or the organization. OpenHands exposes their names and descriptions to the agent. A matching trigger injects a skill automatically, and the agent can invoke other skills that appear relevant to the task. By default, GitHub resolver conversations automatically receive the built-in GitHub skill. The resolver’s initial message refers to GitHub APIs, which matches the skill’sgithub trigger. This gives the agent the baseline instructions for
using GitHub, but it does not limit the conversation to that skill. Repository,
organization, and other task-specific skills can apply alongside it. For example,
@openhands /codereview also activates the matching code review skill.
Choose the customization scope that matches the behavior you want to change:
For example, repository instructions can tell the agent not to push directly, an
issue-triage skill can define labels and escalation rules, and a review skill can
specify the expected format and event for a formal pull request review.
Pull Request Review Example
Use@openhands /codereview to activate the built-in code review skill instead
of relying on the agent to interpret a general @openhands review request. Add
repository or organization guidance when your team needs a consistent review
policy.
For example, create .agents/skills/custom-codereview-guide.md to tell the agent
to submit informational reviews instead of approvals:
code-review; that name conflicts with the built-in review
skill. Keep the /codereview trigger so both skills activate for the same request.
Start a new resolver conversation after committing the skill because skills do
not retroactively change a conversation that is already running.
See Code Review for more
review examples and Skills and Plugins for all
repository and organization distribution options.
Integration-Owned Behavior
Skills guide the agent after the conversation starts. They do not change how the GitHub integration authenticates users, accepts events, or posts status messages.Review and Comment Identity
The built-in resolver intentionally uses different credentials for different actions:
There is currently no supported setting that makes formal reviews run as the
GitHub App bot. If your organization requires reviews to have a machine identity,
use an OpenHands code review automation
with a dedicated bot credential.

