mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 21:59:09 -05:00
[GH-ISSUE #959] Forward resource with wildcard domain to site #1706
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JackBailey on GitHub (Jun 23, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/959
I'm moving, and with that comes with going from an ISP that allows port forwarding, to one that doesn't.
I'd like to keep using a reverse proxy (Caddy, namely) on my server behind CGNAT, and forward a site with address *.example.com from an external server, to the home server.
It's fine for individual domains, like abc.example.com, with wildcard certs to do so. But there's no way to set the site URL to be a wildcard domain - the input box doesn't believe its valid.
It would be really useful if this was a feature. Thanks!
@Nafalan commented on GitHub (Jun 24, 2025):
I'm having the same issue
i want to keep the base domain pointing to server A but I want a specific subdomain/wildcard to point to pangolin which is on Server B and be able to use it in the panel and route resources to it.
EDIT:
I just solved this problem
basically I made an A record pointing to the ip of the vps which has pangolin on which had the domain I wanted in this case it was subdomain.domain.com
Then I added the entry in the config.yml as another domain (domain4)
I then composed 'down' and 'up', and it appeared in the list, and I just used it like it was a base domain.
So then I added the resource as you would normally and pointed the ip to the host machine (container in my case) and then the port and it all worked.
@Oc3anAri3s commented on GitHub (Jun 30, 2025):
That appears to be working for individual subdomains such as
test.example.comorzxy.test.example.com, but what if you want to forward the entire subdomain*.test.example.comto a second reverse proxy, while still being protected by Pangolin?So far, the only way I’ve managed to make this work is by manually adding the route and service to the
dynamic_config.yml, but it would be great if this were possible in the UI as well.@github-actions[bot] commented on GitHub (Jul 15, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@Nafalan commented on GitHub (Jul 15, 2025):
Would it be okay to explain how to use routers for requests being sent to another location
Such as rabbit
Configure Your Reverse Proxy
If you’re using your own reverse proxy, configure it to:
How do I setup routers to do this?
https://www.rybbit.io/docs/self-hosting-manual
@github-actions[bot] commented on GitHub (Jul 30, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@oschwartz10612 commented on GitHub (Aug 7, 2025):
@Nafalan we have a current open set of FR to implement path based routing. I think we will do this soon hopefully.
Otherwise I think this might be a duplicate of #139 so I am going to close. Right now thats on hold and I think the recommendation would be to create resources in pangolin for each downstream service on the 2nd reverse proxy. Its not ideal but would work.
@AndrewPaglusch commented on GitHub (Aug 7, 2025):
I wrote a script for my specific use case, so it's very opinionated. It will "sync" all your Traefik hosts up to Pangolin as resources that point back to Traefik as a target. It essentially gives you the next-best thing to wildcard forwarding. https://github.com/AndrewPaglusch/Traefik-to-Pangolin-Sync
@Nafalan commented on GitHub (Aug 7, 2025):
My friend I would say that is a stretch
Sure other reverse proxy's have things like custom location routing but this isn't a request for another reverse proxy to be used instead of traefik.
I love pangolin and sorted out my issue with making a traefik file of rules/routes and wet traefik confik to watch it for changes.
But a native solution like routing the requests inside pangolin would be awesome.
@Nafalan commented on GitHub (Aug 7, 2025):
That's actually really cool.
I think I'll take a look into this
@oschwartz10612 commented on GitHub (Aug 8, 2025):
This is extremely cool! Thanks for sharing. Hopefully somebody can take some use out of this!
At some point soon we will work on a declarative resource definition for newt to create resources based off of docker labels which maybe could help as well but that's not available yet.
@strausmann commented on GitHub (Mar 23, 2026):
Real-world use case: GitLab Pages wildcard routing through Pangolin
We run a self-hosted GitLab instance (LXC container) behind Pangolin and needed
*.git-pages.comto route to GitLab Pages — a classic wildcard domain use case where subdomains are dynamically created by users.Setup
git.strausmann.de,registry.strausmann.de,mattermost.strausmann.de, SSH on port 2222*.git-pages.comcannot be created as a Pangolin resource — the UI/API doesn't accept wildcard domainsWorking workaround: Manual Traefik wildcard rule
We created a static Traefik rule file on the Pangolin server that references the existing GitLab Pages Pangolin service:
/docker/stacks/pangolin/config/traefik/rules/gitlab-pages-wildcard.ymlKey points:
servicereferences the Pangolin-generated service ({resourceId}-{name}-service@http), so traffic still flows through Gerbil → Newt → GitLab/rulesdirectory*.git-pages.comCNAME →connect.strausmann.cloud(Pangolin endpoint)Why native wildcard support would be valuable
This workaround requires SSH access to the Pangolin server and knowledge of Traefik internals. A native "wildcard resource" in Pangolin would:
This is essentially the same need as #139 — not just "secondary reverse proxy" but any service that dynamically serves content on arbitrary subdomains.