mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 13:19:07 -05:00
[GH-ISSUE #1133] Stuck on port 80/443 (and port mismatch with resources) #6573
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 @Error-Gap on GitHub (Jul 26, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1133
There doesn't seem to be an easy way to get Pangolin to run properly on alternate ports. Simple changing the mapping does not work.
For example, you could have in docker-compose.yml
OR, in docker-compose.yml
and traefik_config.yml
This allows access to the admin interface on the alternate HTTPS port. However, once you create a resource, it will never match up and results in an error such as "Unauthorized" (and "access denied" in the logs). This is because the check will also compare the alternate port, while the resource entry apparently expects the default HTTPS port (443). You also connect specify a port in the WebUI for the resource (colon isn't an allow character).
Error Snippet (IP's and domain masked)
Suggestion:
or
(there are many reasons to run on ports other than 80+443, including firewall issues/configs or if an existing webserver etc is also binding that port)
@Error-Gap commented on GitHub (Jul 26, 2025):
Traced this down to the following in Badger
The above appears to slice off the port from the end of the FQDN, but only if the port is 443 or 80, which means it is going to not respect the entryPoint ports as defined in the traefik config, port bindings defined in the docker-compose file, traffic NAT'ing, etc
Rather than hardcoding 443 or 80, it might make more sense to slice off any numeric values following after the first colon
@Error-Gap commented on GitHub (Jul 28, 2025):
Have forked out for some experimentation over the weekend. Altering the updated section to slice off any "port" section of the host does work in terms of having the appropriate resource matched and auth page show up, but will still run into errors elsewhere in the code where the current port being used does not match the resource entry (in particular, the post successful-auth redirect will send the user back to the HTTPS port).
Still running some trials on this but if I can get it working in the fork I will hopefully be able to provide the appropriate updates (so no need for the project devs to spend time looking into this as of current).
@oschwartz10612 commented on GitHub (Jul 28, 2025):
Ahh yep that makes sense I would 100 agree thats the issue in Badger. Also take a look at
verifySession.tsbut I think that is probably good.Thanks for finding this. If you want to open a PR that would be incredible!
@Error-Gap commented on GitHub (Jul 29, 2025):
Will do. I've resolved the issue in
server/routers/badger/verifySession.ts
There's another in
pangolin/src/app/auth/resource/[resourceId]/page.tsx
Just sorting that out then I'll request a pull for the forked updates, assuming nothing else comes up.
@Linuturk commented on GitHub (Jul 29, 2025):
Wanted to say thanks for taking a swing at supporting alternative ports. I just tried to setup Pangolin on my server that's already running web services on 80 and 443, and hit this issue. Looking forward to your fixes.
@Error-Gap commented on GitHub (Jul 30, 2025):
Finally looking like it works on the alt-port, but had to make changes in:
This seems to be successful thus far in that accessing a resource URL properly forwards to the login page, which then redirects back to the resource URL and allows access to the remote resource.
I will need to do a bit more testing to ensure that this doesn't visible break something elsewhere, as well as revert the relevant files back to versions without the crap-ton of debugging outputs I added to trace flow. :-)
Once I've got a clean+working version and done a few more tests I'll commit it back to my fork and then submit a PR to have the changes pulled back into the proper project (this one)
@Error-Gap commented on GitHub (Jul 31, 2025):
Hi @oschwartz10612
Testing seems OK:
While running on an alternate bound port, I was able to:
Then, in a separate browser/user:
Pretty quick smoke-test but it seems good so I've submitted the the PR
@bodleytunes commented on GitHub (Jul 31, 2025):
With OpenZITI things like this (the ports various services listen on), can be set via ENV vars for specific ports set in the .env file or the docker compose file.
@jasperweyne commented on GitHub (Jan 3, 2026):
I'm successfully running Pangolin on a different port, by modifying a couple of files. For future reference, these steps worked for me:
docker compose downand thendocker compose up -dThese steps resulted in a successful installation for me.
@coavins commented on GitHub (Feb 22, 2026):
The above reply was very helpful to me. I had to move the pangolin dashboard so I could forward port 443 as a raw TCP resource.