mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 05:09:18 -05:00
[GH-ISSUE #1203] [Feature Request]: Installation failed due to port 80 already in use #3748
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 @aclfe on GitHub (Aug 2, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1203
Originally assigned to: @aclfe on GitHub.
What happened:
After following the documentation at https://docs.fossorial.io/Getting%20Started/quick-install and running
sudo ./installer, my installation came to a halt as I was thrown with the error. This caused 2 docker containers (traefik & gerbil) to only be "created" and not be active.Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint gerbil (8dbfe199e9820c2c14898c9b4ded59d51f9b1590d020a2c1e0311e4990e5e396): failed to bind host port for 0.0.0.0:80:172.22.0.3:80/tcp: address already in use Error: failed to start containers: exit status 1I had forgotten that I was running a nginx server that was listening on port 80 and 443 causing the installation to come to an halt. As a result, I had to
sudo systemctl stop nginxsudo rm -rf config docker-compose.yml./installerand then run the installation again
Current Behavior:
Expected Behavior:
Environment
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Docker version 28.3.3, build 980b856
Docker Compose version v2.39.1
Steps to recreate this issue
sudo apt install nginxsudo ufw allow 80sudo systemctl enable nginxsudo systemctl start nginxwget -O installer "https://github.com/fosrl/pangolin/releases/download/1.8.0/installer_linux_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')" && chmod +x ./installersudo ./installerAdditional information?
Please let me know if there's any further information needed.
@oschwartz10612 commented on GitHub (Aug 2, 2025):
Hi! Thanks for posting. I think this is a good idea to prevent docker from freaking out and to catch it in the installer!
@aclfe commented on GitHub (Aug 2, 2025):
Thanks for reviewing the issue @oschwartz10612 :)
I was interested in working on this by adding a pre-check installer to detect if ports 80/443 are already in use and emit a friendly error before everything is set up (showing how the port is occupied as shown in the expected behavior picture).
Would it be alright if I put together a PR for that? If yes, any coding/style guidelines or the part of the installer code you’d recommend I look at first? I already checked https://docs.fossorial.io/development. Anything else to take note of?
Thanks!
@oschwartz10612 commented on GitHub (Aug 2, 2025):
Yes that would be great!
Yeah take a look at the
main.goin the installer directory. Let me know if you have any question.@aclfe commented on GitHub (Aug 3, 2025):
Hi @oschwartz10612, I’ve added the changes onto
main.go.You can see the changes in here.
it's just adding a function that checks the ports and exits the script if the ports are unavailable. Let me know if you’d like any tweaks!
@mrjackwills commented on GitHub (Aug 3, 2025):
I'm suffering this issue, due to a nginx deployment on the same machine.
Is this PR #1177 related? And if so, would it be possible to change the port numbers when using the
get-installer.shscript?@aclfe commented on GitHub (Aug 3, 2025):
Hi @mrjackwills, honestly I understand your situation because I had to stop my own services too and stuff.
I might be wrong here, but I don't believe Pangolin would support running on alternate HTTP/HTTPS ports. It’s built around ports 80 and 443 because after all it is a reverse proxy server and like most reverse proxy servers, it runs on port 80/443. Even the Let’s Encrypt validation, dashboard UI, and resource routing I suppose would expect those defaults? Please correct me if wrong, I'd love your thoughts @oschwartz10612
Does it make sense to support running Pangolin on other ports (like 8080/8443)? Or would changing ports break its internal logic/routing because most components would be expecting to work with 80/443?
@mrjackwills commented on GitHub (Aug 3, 2025):
@aclfe Thanks for the information, it seems unfortunate.
Off the top of my head, an idea would be to use nginx infront of pangolin, and proxy all requests, could that work in any way?
@bodleytunes commented on GitHub (Aug 3, 2025):
Its related to PR 1177, I also want to change the port from 443 to something else.
It shouldn't break the logic if things are not hardcoded internally to 443 or 80 etc.
I'm not sure what the status is but it looks like it might be about to be merged?
#1142
@bodleytunes commented on GitHub (Aug 3, 2025):
I know with a similar application I use called OpenZiti, all the ports various services, like tunneller, can be set in the docker compose file via Env vars.
I suspect once its merged we would be able to do the same thing.
@mrjackwills commented on GitHub (Aug 3, 2025):
If one is able to change the 80/443 ports, lets say we change them to 8000/4430, can the installer then be run as a none-root user?
@hhftechnology commented on GitHub (Aug 5, 2025):
you can't change the default ports from 80/443
@oschwartz10612 commented on GitHub (Aug 6, 2025):
Working on being able to change the ports in an upcoming release. There
was is a PR for it.
@G2G2G2G commented on GitHub (Aug 16, 2025):
So does this not run behind nginx? There isn't really any mention on the site that I can find other than maybe cloudflare being semi related to running it behind nginx.
Most of us that run stuff at our house, which this is pretty heavily aimed at currently, are going to have other services already going. Nginx is our portal to many services going to outside. It has to be the one in control of ports 80 and 443 at the minimum.
The port check isn't only necessary, but the system requires pulling a cert too which is generally already controlled via nginx. Either same machine or separate machine or different vm etc.
@oschwartz10612 commented on GitHub (Aug 16, 2025):
@G2G2G2G I understand what you are saying but Pangolin is designed to be the first layer of ingress to a network to replace nginx. That being said I think nginx can sit in front of pangoin if you change this ports which is now supported. OR it can sit behind pangolin and proxy to your existing services. Many ways to make it work 😉
@mrjackwills commented on GitHub (Aug 16, 2025):
@oschwartz10612 If this change makes pangolin work if sat behind nginx (which ports changed), would it be possible to create and document a simple example nginx conf to enable this action?
@oschwartz10612 commented on GitHub (Aug 16, 2025):
Yeah I think we could! You could open a feature request issue /
discussion and I can mark it help wanted!
I think it could be fairly simple: just proxy everything downstream at
layer 4 (I think ideally) or layer 7 to pangolin from nginx.
@mrjackwills commented on GitHub (Aug 16, 2025):
Thanks, opened up a discussion at https://github.com/orgs/fosrl/discussions/1290
@G2G2G2G commented on GitHub (Aug 16, 2025):
@oschwartz10612 yes but you make it impossible to switch currently. Pangolin can't be installed without being the front and thus you have to take down your system to allow it to be up front. Some systems are running for businesses etc and cannot be brought down.
It fails at installing because it can't get a letsencrypt cert which.. isn't even necessary since we all already have them, especially wildcard ones for domains.
and it fails because it doesn't have a reverse proxy going toward it.
Now that we can set it up behind nginx, we can pass through so it can get the setup correctly and then migrate as needed if needed.