> For the complete documentation index, see [llms.txt](https://docs.expel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.expel.io/connect-your-technology/d-j-integrations/github/github-self-hosted-on-prem-setup-for-workbench.md).

# GitHub Self-Hosted (On-Prem) Setup for Workbench

{% hint style="info" %}
This procedure is specifically for self-hosted GitHub deployments. For cloud-hosted, refer to [GitHub Cloud Setup for Workbench](/connect-your-technology/d-j-integrations/github/github-cloud-setup-for-workbench.md).
{% endhint %}

## Prerequisites <a href="#h_01hh4qwn910djn8kp14mxh70m1" id="h_01hh4qwn910djn8kp14mxh70m1"></a>

You must have:

1. A GitHub Enterprise account license. For more information, see [GitHub products](https://docs.github.com/en/get-started/learning-about-github/githubs-plans).

## Step 1: Install the Self-Hosted GitHub App <a href="#uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25636" id="uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25636"></a>

Workbench uses a GitHub App as part of the onboarding process.

1. Use the [Registering a GitHub App instructions](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) to create a custom application in the organization you want monitored. Fill in the required fields as follows:
   * **GitHub App name** - enter "ExpelGitHubIntegration".
   * **Homepage URL** - enter "<https://github.com/apps/expelgithubintegration>".
   * **Webhook** - *uncheck* **Active**.
   * Organization permissions:
     * **Members** - select **Read-only**.
     * **Administration** - select **Read-only**.
   * Leave all other fields blank.
2. Navigate to the organization's **Apps Settings** page. Under the About section, copy the value of **App ID** for use in a later step.
3. Use the [Authenticating with GitHub Apps](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/about-authentication-with-a-github-app#authentication-as-a-github-app) instructions to **generate a private key** and save it for later use. This is your **PEM key** and you need it in the next section.
4. If you are using an Expel Assembler within your network, use the [GitHub documentation](https://docs.github.com/en/apps/maintaining-github-apps/managing-allowed-ip-addresses-for-a-github-app#adding-an-ip-address-allow-list-to-a-github-app-registration) to add the assembler's internal IP to the allow list. Otherwise, add the Expel egress IPs listed in [Configure an IP Allow List](/workbench-setup/configure-an-ip-allow-list.md).

## Step 2: Configure GitHub as a Security Device in Workbench <a href="#uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25658" id="uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25658"></a>

{% hint style="info" %}
If you have multiple organizations, create a separate [security device](/connect-your-technology/security-devices/manage-security-devices.md) in Workbench for each organization.
{% endhint %}

Now that you have the correct access configured and noted the credentials, you can integrate your tech with Workbench.

1. In a new browser tab, log into <https://workbench.expel.io/settings/security-devices?setupIntegration=github>.

   <div align="left"><figure><img src="/files/ThgRXMzNzxQXZpC1sHcJ" alt="Github integration Add a Security Device page in Workbench." width="326"><figcaption></figcaption></figure></div>
2. For **Where is your device?**:
   * If you decided to allow the Expel egress IPs, select **Cloud**.
   * If you are using an Assembler, select **On-prem** and select the assembler from the dropdown.
3. Complete these fields using the credentials and information from [Step 1](#uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25636).
   * **Name** - enter the name of your GitHub organization.
   * **Location** - enter "On-prem". *If you are onboarding more on-prem devices, enter a name that indicates what each device is tracking.*
   * **Organization name** - enter the name of your GitHub organization.
   * **Enterprise slug** - enter the Enterprise name.
   * **On-prem URL (only for Enterprise server)** - enter your on-prem GitHub API endpoint.
   * **Application installation ID** - enter the installation ID from [Step 1](#uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25636).
   * **Application ID** - enter the application ID from [Step 1](#uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25636).
   * **Application Private PEM** - copy and paste the PEM file contents from [Step 1](#uuid-112fbe5e-d994-abd9-391e-402d29c24aa6_bridgehead-25636).
4. Click **Save**.

Your device should be created successfully within a few seconds. A few reminders:

* After your connection is healthy, it will take some time for your device to begin polling and receiving data.
* To check on the status, select the downward arrow for your device in the first column and choose **View details**.
* Polling will happen first; data will be received after that. **You must refresh the page to see updates.**
* If your device does not begin polling within 15 minutes, and does not begin receiving data within 30 minutes, [contact our support team for help](/support/how-to-reach-us.md).
* To check if alerts are coming through, navigate to **Dashboards > Alert Analysis**. Scroll to the device you want to check, and select the **Expel Alerts** tab to reveal more alert information. It can take 36 to 72 hours for alerts to appear after setup, as we [tune your device](/workbench-reference/alerts/how-expel-alerts-work.md#device-tuning).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.expel.io/connect-your-technology/d-j-integrations/github/github-self-hosted-on-prem-setup-for-workbench.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
