Error Message and Logs
Adding a GitHub App source that points at a GitHub Enterprise Cloud with data residency tenant (https://<subdomain>.ghe.com, e.g. an Enterprise Managed Users / EMU setup) cannot be completed.
The GitHub App itself is created successfully through the manifest flow — Coolify retrieves and stores the app_id, client_id, client_secret, webhook_secret, and private key. But the "Install repositories on GitHub" button (and the "Update repositories" button) links to a URL that returns 404 on GitHub. The installation can therefore never be completed, no installation_id is captured, and the source stays stuck at "You must complete this step before you can use this source!" with no repositories available.
Root cause: Coolify decides the install path with html_url === 'https://github.com' ? 'apps' : 'github-apps'. Any host that isn't literally github.com — including *.ghe.com — is treated as GitHub Enterprise Server and gets the GHES-style /github-apps/... path. But *.ghe.com (Enterprise Cloud with data residency) runs the github.com URL scheme, where the correct, owner-scoped path is /apps/<owner>/<slug>/installations/new.
Steps to Reproduce
- Have a GitHub Enterprise Cloud with data residency tenant (
https://<subdomain>.ghe.com), e.g. EMU.
- In Coolify: Sources → add GitHub App → GitHub Enterprise, with:
- HTML URL:
https://<subdomain>.ghe.com
- API URL:
https://<subdomain>.ghe.com/api/v3
- Organization:
<org>
- Click Register now → redirected to GitHub → name the app → create.
(The app is created and the manifest conversion succeeds — Coolify stores app_id, client_id, client_secret, webhook_secret, and the private key.)
- Coolify shows "You must complete this step before you can use this source!" with Install repositories on GitHub.
- Click it →
https://<subdomain>.ghe.com/github-apps/<kebab-name>/installations/new → 404.
installation_id is never set; no repositories can be selected; the source is unusable.
Manually creating the app and pasting all credentials into Coolify hits the same wall: the Update repositories button uses the same broken URL helper and also 404s.
Expected behavior
For *.ghe.com hosts, Coolify should build the github.com-family, owner-scoped install URL using GitHub's returned app slug:
https://<subdomain>.ghe.com/apps/<owner>/<slug>/installations/new
instead of the GHES-style
https://<subdomain>.ghe.com/github-apps/<kebab-name>/installations/new
Example Repository URL
No response
Coolify Version
v4.1.2
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04 Server
Additional Information
This requires three corrections in getInstallationPath():
/github-apps/ → /apps/
- include the owner (org) segment:
/apps/<owner>/...
- use GitHub's returned app
slug, not Str::kebab($source->name)
Additional Info
- Coolify version: v4.1.2 (self-hosted).
- Tenant: GitHub Enterprise Cloud with data residency (
*.ghe.com), Enterprise Managed Users (EMU).
Source of the bug (commit e7dff30b7c998c301fd91bd169727b90c59ec291):
bootstrap/helpers/github.php → getInstallationPath():
$name = str(Str::kebab($source->name));
$installation_path = $source->html_url === 'https://github.com' ? 'apps' : 'github-apps';
return "$source->html_url/$installation_path/$name/installations/new?".http_build_query(['state' => $state]);
|
} |
|
|
|
function getInstallationPath(GithubApp $source): string |
|
{ |
|
$name = str(Str::kebab($source->name)); |
|
$installation_path = $source->html_url === 'https://github.com' ? 'apps' : 'github-apps'; |
|
$state = Str::random(64); |
|
|
|
Cache::put('github-app-setup-state:'.hash('sha256', $state), [ |
|
'action' => 'install', |
|
'github_app_id' => $source->id, |
|
'team_id' => $source->team_id, |
|
], now()->addMinutes(60)); |
Both the Install and Update repository buttons call this helper:
|
</x-forms.button> |
|
@can('update', $github_app) |
|
<a href="{{ $this->getGithubAppNameUpdatePath() }}"> |
|
<x-forms.button canGate="update" :canResource="$github_app" |
|
class="bg-transparent border-transparent hover:bg-transparent hover:border-transparent hover:underline"> |
|
Rename |
|
<x-external-link /> |
|
</x-forms.button> |
|
</a> |
|
<a href="{{ getInstallationPath($github_app) }}" class="w-fit"> |
|
<x-forms.button canGate="update" :canResource="$github_app" |
Related: the slug issue (#3 above) overlaps with #5364, where Coolify's local app name diverges from GitHub's returned slug and causes Rename/Update 404s.
GHE.com (data residency) URL conventions — per GitHub Docs, *.ghe.com uses the github.com scheme with the host swapped, not the GHES scheme:
|
GHES (what Coolify currently applies) |
GHE.com / github.com (correct) |
| REST API base |
https://HOSTNAME/api/v3 |
https://api.<subdomain>.ghe.com |
| App install URL |
/github-apps/<slug>/installations/new |
/apps/<owner>/<slug>/installations/new |
Note: in my case Coolify's API URL was set to https://<subdomain>.ghe.com/api/v3 and the manifest conversion still succeeded, so /api/v3 appears to resolve on this tenant. The API base is therefore a secondary concern; the install path scheme is the actual blocker. Ideally Coolify should also derive https://api.<subdomain>.ghe.com for *.ghe.com hosts.
EMU note: managed users can install GitHub Apps on an org they own (the relevant case here) and can create GitHub Apps, but GitHub App manifests are not available for enterprise-owned apps, and Marketplace apps are unavailable on GHE.com — so the org-owned manifest flow is the expected path, which makes the install-URL bug the sole blocker.
Suggested fix: detect *.ghe.com hosts and treat them like github.com for URL construction — use /apps/, include the owner segment, use GitHub's returned slug, and derive api.<subdomain>.ghe.com for the API base.
Error Message and Logs
Adding a GitHub App source that points at a GitHub Enterprise Cloud with data residency tenant (
https://<subdomain>.ghe.com, e.g. an Enterprise Managed Users / EMU setup) cannot be completed.The GitHub App itself is created successfully through the manifest flow — Coolify retrieves and stores the
app_id,client_id,client_secret,webhook_secret, and private key. But the "Install repositories on GitHub" button (and the "Update repositories" button) links to a URL that returns 404 on GitHub. The installation can therefore never be completed, noinstallation_idis captured, and the source stays stuck at "You must complete this step before you can use this source!" with no repositories available.Root cause: Coolify decides the install path with
html_url === 'https://github.com' ? 'apps' : 'github-apps'. Any host that isn't literallygithub.com— including*.ghe.com— is treated as GitHub Enterprise Server and gets the GHES-style/github-apps/...path. But*.ghe.com(Enterprise Cloud with data residency) runs the github.com URL scheme, where the correct, owner-scoped path is/apps/<owner>/<slug>/installations/new.Steps to Reproduce
https://<subdomain>.ghe.com), e.g. EMU.https://<subdomain>.ghe.comhttps://<subdomain>.ghe.com/api/v3<org>(The app is created and the manifest conversion succeeds — Coolify stores
app_id,client_id,client_secret,webhook_secret, and the private key.)https://<subdomain>.ghe.com/github-apps/<kebab-name>/installations/new→ 404.installation_idis never set; no repositories can be selected; the source is unusable.Manually creating the app and pasting all credentials into Coolify hits the same wall: the Update repositories button uses the same broken URL helper and also 404s.
Expected behavior
For
*.ghe.comhosts, Coolify should build the github.com-family, owner-scoped install URL using GitHub's returned appslug:instead of the GHES-style
Example Repository URL
No response
Coolify Version
v4.1.2
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04 Server
Additional Information
This requires three corrections in
getInstallationPath():/github-apps/→/apps//apps/<owner>/...slug, notStr::kebab($source->name)Additional Info
*.ghe.com), Enterprise Managed Users (EMU).Source of the bug (commit
e7dff30b7c998c301fd91bd169727b90c59ec291):bootstrap/helpers/github.php→getInstallationPath():coolify/bootstrap/helpers/github.php
Lines 118 to 130 in e7dff30
Both the Install and Update repository buttons call this helper:
coolify/resources/views/livewire/source/github/change.blade.php
Lines 70 to 80 in e7dff30
Related: the slug issue (#3 above) overlaps with #5364, where Coolify's local app name diverges from GitHub's returned
slugand causes Rename/Update 404s.GHE.com (data residency) URL conventions — per GitHub Docs,
*.ghe.comuses the github.com scheme with the host swapped, not the GHES scheme:https://HOSTNAME/api/v3https://api.<subdomain>.ghe.com/github-apps/<slug>/installations/new/apps/<owner>/<slug>/installations/newEMU note: managed users can install GitHub Apps on an org they own (the relevant case here) and can create GitHub Apps, but GitHub App manifests are not available for enterprise-owned apps, and Marketplace apps are unavailable on GHE.com — so the org-owned manifest flow is the expected path, which makes the install-URL bug the sole blocker.
Suggested fix: detect
*.ghe.comhosts and treat them likegithub.comfor URL construction — use/apps/, include the owner segment, use GitHub's returnedslug, and deriveapi.<subdomain>.ghe.comfor the API base.