# Configure Webhooks

Once the PullRequest Proxy service is running, it will start a webserver for fielding webhooks from the provider. For these, it's listening on port `5012` if not using SSL and on port `8443` if SSL is configured.

It's often useful to configure a DNS entry with a simple `A` record pointing at the IP address of this instance so that webhooks can be configured properly.

Below are links to configure webhooks for each of the providers. Go ahead and pick the provider you're using and follow the instructions. In order to configure a webhook secret to validate webhooks signed by the provider, the `PROVIDER_WEBHOOK_SECRET` field must be configured in the `.env` file that we edited earlier.

```
su pullrequest
cd $HOME/pullrequest_proxy
vim .env
```

Add any string to the following line:

```
PROVIDER_WEBHOOK_SECRET=<webhook_secret>
```

{% hint style="danger" %}
When configuring the `PROVIDER_WEBHOOK_SECRET` field for Azure DevOps, you actually need to configure two values - a `username` and a `password`. These should be formatted as such in this field: `<username>:<password>`
{% endhint %}

When you're finished editing the file, go ahead and exit the `pullrequest` user's shell and restart the service to pull in the new configuration.

```
exit
systemctl restart pullrequest-proxy
```

{% hint style="warning" %}
This field is optional. And if it's configured, this secret must be used when configuring webhooks for your provider or else it won't function properly.
{% endhint %}

{% content-ref url="/pages/-LtatwiHit2Zi8oRrY3K" %}
[Configure GitHub Webhooks](/on-premise-server/configure-webhooks/configure-github-webhooks.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LhfDDZ7YfNfflvj6IIp" %}
[Configure GitLab Webhooks](/on-premise-server/configure-webhooks/configure-gitlab-webhooks.md)
{% endcontent-ref %}

{% content-ref url="/pages/-LNR9B9KHbV4wOJzSwEr" %}
[Configure Bitbucket Webhooks](/on-premise-server/configure-webhooks/configure-bitbucket-webhooks.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MUVCx9kMTU7PsHXpa\_v" %}
[Configure Azure DevOps Webhooks](/on-premise-server/configure-webhooks/configure-azure-devops.md)
{% endcontent-ref %}


---

# Agent Instructions: 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:

```
GET https://docs.pullrequest.com/on-premise-server/configure-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
