[GH-ISSUE #1203] [Feature Request]: Installation failed due to port 80 already in use #8570

Closed
opened 2026-04-30 04:33:22 -05:00 by GiteaMirror · 18 comments
Owner

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 1

I 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

  1. sudo systemctl stop nginx
  2. sudo rm -rf config docker-compose.yml
  3. ./installer

and then run the installation again

Current Behavior:

Image Image

Expected Behavior:

Image

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

  1. sudo apt install nginx
  2. sudo ufw allow 80
  3. sudo systemctl enable nginx
  4. sudo systemctl start nginx
  5. wget -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 ./installer
  6. sudo ./installer

Additional information?

Please let me know if there's any further information needed.

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 1` I 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 1) `sudo systemctl stop nginx` 2) `sudo rm -rf config docker-compose.yml` 3) `./installer` and then run the installation again ## Current Behavior: <img width="944" height="433" alt="Image" src="https://github.com/user-attachments/assets/22eed851-5038-471c-ad6c-33fc795e307e" /> <img width="950" height="104" alt="Image" src="https://github.com/user-attachments/assets/7fd8003c-ee13-4541-846e-0c96c5bcf4b4" /> ## Expected Behavior: <img width="450" height="27" alt="Image" src="https://github.com/user-attachments/assets/ba3eeb9a-4455-44d1-afa3-0a2ab0cb4020" /> ## 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 1) `sudo apt install nginx` 2) `sudo ufw allow 80` 3) `sudo systemctl enable nginx` 4) `sudo systemctl start nginx` 5) `wget -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 ./installer` 6) `sudo ./installer` ## Additional information? Please let me know if there's any further information needed.
GiteaMirror added the good first issuehelp wanted labels 2026-04-30 04:33:22 -05:00
Author
Owner

@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!

<!-- gh-comment-id:3146629953 --> @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!
Author
Owner

@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!

<!-- gh-comment-id:3146637072 --> @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!
Author
Owner

@oschwartz10612 commented on GitHub (Aug 2, 2025):

Yes that would be great!

Yeah take a look at the main.go in the installer directory. Let me know if you have any question.

<!-- gh-comment-id:3146716347 --> @oschwartz10612 commented on GitHub (Aug 2, 2025): Yes that would be great! Yeah take a look at the `main.go` in the installer directory. Let me know if you have any question.
Author
Owner

@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!

<!-- gh-comment-id:3147376279 --> @aclfe commented on GitHub (Aug 3, 2025): Hi @oschwartz10612, I’ve added the changes onto `main.go`. You can see the changes in [here](https://github.com/aclfe/pangolin/commit/c0c8edb9d10e8adf584f3b1c2dea442e55659218). 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!
Author
Owner

@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.sh script?

<!-- gh-comment-id:3148317319 --> @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.sh ` script?
Author
Owner

@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?

<!-- gh-comment-id:3148324791 --> @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?
Author
Owner

@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?

<!-- gh-comment-id:3148331040 --> @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?
Author
Owner

@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

<!-- gh-comment-id:3148425763 --> @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
Author
Owner

@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.

<!-- gh-comment-id:3148426790 --> @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.
Author
Owner

@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?

<!-- gh-comment-id:3148456040 --> @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?
Author
Owner

@hhftechnology commented on GitHub (Aug 5, 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?

you can't change the default ports from 80/443

<!-- gh-comment-id:3153244738 --> @hhftechnology commented on GitHub (Aug 5, 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? you can't change the default ports from 80/443
Author
Owner

@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.

<!-- gh-comment-id:3161772556 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:3193703028 --> @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.
Author
Owner

@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 😉

<!-- gh-comment-id:3193798578 --> @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 :wink:
Author
Owner

@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?

<!-- gh-comment-id:3193816037 --> @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?
Author
Owner

@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.

<!-- gh-comment-id:3193819759 --> @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.
Author
Owner

@mrjackwills commented on GitHub (Aug 16, 2025):

Thanks, opened up a discussion at https://github.com/orgs/fosrl/discussions/1290

<!-- gh-comment-id:3193863411 --> @mrjackwills commented on GitHub (Aug 16, 2025): Thanks, opened up a discussion at https://github.com/orgs/fosrl/discussions/1290
Author
Owner

@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.

<!-- gh-comment-id:3193882116 --> @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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#8570