Skip to content

[Bug]: GitHub App webhook endpoint defaults to IP address even when instance URL is configuredΒ #8947

@rosslh

Description

@rosslh

Error Message and Logs

When creating a new GitHub App source with a URL configured in the instance settings, the "Webhook Endpoint" dropdown defaults to the server's IPv4 address instead of the configured domain.

Using this default results in the GitHub App being registered with IP-based redirect, callback, setup, and webhook URLs. This leads to:

  • GitHub App redirects going to the raw IP instead of the domain
  • Auto-deploy webhooks failing if the IP changes or if the instance is only accessible via domain
  • Users needing to manually edit URLs in GitHub App settings after creation

The root cause is in two places:

  1. app/Livewire/Source/Github/Change.php - mount() sets the default webhook endpoint to $this->ipv4 even when $this->fqdn is available, so the configured instance URL is never pre-selected
  2. resources/views/livewire/source/github/change.blade.php lines 245-256 β€š the <select> dropdown lists IPv4 first, making it the visual default

Note that base_url() in bootstrap/helpers/shared.php already correctly prioritizes the instance URL over IPv4, so this is inconsistent with the rest of the codebase.

Steps to Reproduce

  1. Set your instance URL in Settings (e.g. https://coolify.example.com)
  2. Go to Sources > Add GitHub App
  3. Observe the "Webhook Endpoint" dropdown defaults to http://:8000 instead of the configured URL
  4. Click "Register Now" without changing the dropdown
  5. The GitHub App is created with IP-based URLs instead of the domain

Example Repository URL

No response

Coolify Version

v4.0.0-beta.463.11

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 22.04

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    βœ… DoneIssues that are fixed and a PR is ready to be merged.🐞 Confirmed BugVerified issues that have been reproduced by the team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions