> For the complete documentation index, see [llms.txt](https://docs.heeler.com/mrecEO40m5D6bt7Pq5pE/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heeler.com/mrecEO40m5D6bt7Pq5pE/get-started/source-code-scm/bitbucket-data-center.md).

# Bitbucket Data Center

Connect a self-hosted Bitbucket Data Center instance to Heeler with an HTTP access token.

Heeler connects to **Bitbucket Data Center** (self-hosted Bitbucket Server) with an **HTTP access token** and your instance URL. Heeler reaches your server directly over the network.

{% hint style="info" %}
**Guardrails on Bitbucket Data Center are still in development and not yet available.** Data Center connections today provide repository discovery and security analysis (SCA, SAST, secrets); pull-request guardrails run on [Bitbucket Cloud](/mrecEO40m5D6bt7Pq5pE/get-started/source-code-scm/bitbucket-cloud.md) and the other supported providers. For guardrail coverage, see [PR Guardrails](/mrecEO40m5D6bt7Pq5pE/prevent/pr-guardrails.md).
{% endhint %}

## Before you start

* A Bitbucket Data Center instance reachable from Heeler. If it uses an **IP allow list**, allow Heeler's outbound IPs:
  * `44.221.229.40`
  * `52.73.231.96`
* An HTTP access token with **`PROJECT READ`** and **`REPOSITORY READ`** permissions.
* **Administrator** role in Heeler.

## Step 1 — Create an HTTP access token

1. Log in to Bitbucket Data Center and open your profile.
2. Go to **Profile picture → Manage account →** [**HTTP access tokens**](https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html) and select **Create token**.
3. Set a **name**, grant the permissions below, and choose an **expiry**.

<table><thead><tr><th width="220">Permission</th><th>Why</th></tr></thead><tbody><tr><td><code>PROJECT READ</code></td><td>Discover projects.</td></tr><tr><td><code>REPOSITORY READ</code></td><td>Read repositories for security analysis.</td></tr></tbody></table>

4. **Copy** the token for the next step.

<figure><img src="https://414480750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXP3dp2kecwKA2KvYkntz%2Fuploads%2Fgit-blob-fd3102d80fe8f44316f53a8327ad5d0f7f6c0acc%2Fcc-scm-bbdc-01.png?alt=media" alt="The Bitbucket Data Center HTTP access token creation screen with Project Read and Repository Read permissions."><figcaption><p>Create an HTTP access token with <code>PROJECT READ</code> and <code>REPOSITORY READ</code>.</p></figcaption></figure>

## Step 2 — Add Bitbucket Data Center to Heeler

{% stepper %}
{% step %}

### Open Code Organizations

Click the **Settings** (gear) icon → **Connections → Code Organizations → Add Code Organization → Bitbucket Data Center**.

<figure><img src="https://414480750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXP3dp2kecwKA2KvYkntz%2Fuploads%2Fgit-blob-d5ae0fff083064d94364e4a32817e5e3056dd407%2Fcc-scm-bbdc-add-org.png?alt=media" alt="The Code Organizations settings page with the Add Code Organization button."><figcaption><p>On <strong>Code Organizations</strong>, click <strong>Add Code Organization</strong>.</p></figcaption></figure>
{% endstep %}

{% step %}

### Enter the details

<figure><img src="https://414480750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXP3dp2kecwKA2KvYkntz%2Fuploads%2Fgit-blob-c80b2a25885ad1b02248cf714471cc5795fc0967%2Fcc-gs-scm-bbdc-form.png?alt=media" alt="The Add Bitbucket Data Center Organization modal with Name, Username, Access Token, and URL fields."><figcaption><p>Connect to your Bitbucket Server URL with an HTTP access token.</p></figcaption></figure>

* **Name** — a display name for the connection.
* **Username** — your Bitbucket (Atlassian) email address.
* **Access Token** — the HTTP access token from Step 1.
* **URL** — the base URL of your Bitbucket Data Center instance.

Click **Save**.
{% endstep %}

{% step %}

### Verify

Confirm the connection shows **Healthy**, and that repositories appear in the [Catalog](/mrecEO40m5D6bt7Pq5pE/catalog/repositories.md).

<figure><img src="https://414480750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXP3dp2kecwKA2KvYkntz%2Fuploads%2Fgit-blob-fbe0298fea67cfc37aaed33d5232c8f5ba6400cb%2Fcc-scm-bbdc-healthy.png?alt=media" alt="The Bitbucket Data Center connection showing a Healthy status."><figcaption><p>A successful connection shows <strong>Healthy</strong>.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Troubleshooting

<table><thead><tr><th width="280">Symptom</th><th>Fix</th></tr></thead><tbody><tr><td>Connection <strong>Unhealthy</strong></td><td>Confirm the token has <code>PROJECT READ</code> and <code>REPOSITORY READ</code>, the URL is reachable from Heeler, and the outbound IPs are allowed.</td></tr><tr><td>Repositories not appearing</td><td>Confirm the token owner can see the projects, and allow time for initial discovery.</td></tr></tbody></table>

## Related

* [Bitbucket Cloud](/mrecEO40m5D6bt7Pq5pE/get-started/source-code-scm/bitbucket-cloud.md) — the cloud variant, with guardrail support.
* [Connect Your Code](/mrecEO40m5D6bt7Pq5pE/get-started/source-code-scm.md) — the common flow and network requirements.


---

# 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.heeler.com/mrecEO40m5D6bt7Pq5pE/get-started/source-code-scm/bitbucket-data-center.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.
