Having Bad Gateway error when I spin up Portainer beside Pangolin. I setup using local site and resource with 127.0.0.1:9111. Cant see any error in any loggings. Traefik dashboard works with the same method. Did not modify any gerbil settings.
Originally created by @pong106 on GitHub (May 3, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/649
Having `Bad Gateway` error when I spin up Portainer beside Pangolin. I setup using `local` site and `resource` with `127.0.0.1:9111`. Cant see any error in any loggings. Traefik dashboard works with the same method. Did not modify any `gerbil` settings.
docker-compose
```
services:
portainer:
image: portainer/portainer-ce:lts
command: -H unix:///var/run/docker.sock
restart: always
networks:
- pangolin
ports:
- "9111:9000"
- "9443:9443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
volumes:
portainer_data:
networks:
pangolin:
external: true
```
<!-- gh-comment-id:2848907654 -->
@pong106 commented on GitHub (May 4, 2025):
> create resource with port 9443?
tried with both 9111 and 9443 , same error.
Same here. I tried it with two different services, nginx and uptime-kuma. After authentication I get Bad Gateway.
I have created a local site with two resources. The nginx container I've started with docker run (docker run -it --rm -d -p 8082:80 --name web nginx) and for uptime-kuma I've used docker compose.
<!-- gh-comment-id:2865978166 -->
@calim20 commented on GitHub (May 9, 2025):
Same here. I tried it with two different services, nginx and uptime-kuma. After authentication I get `Bad Gateway`.
I have created a `local` site with two resources. The nginx container I've started with `docker run` (`docker run -it --rm -d -p 8082:80 --name web nginx`) and for uptime-kuma I've used `docker compose`.
docker-compose.yml
```
services:
uptime-kuma:
restart: always
ports:
- 127.0.0.1:5001:3001
volumes:
- /data/uptime:/app/data
container_name: uptime-kuma
image: louislam/uptime-kuma:1
```
I've setup pangolin with crowdsec.
Best,
Marco
Same here. Tried adding Pangolin and other local services to same docket net without avail.
<!-- gh-comment-id:2869021594 -->
@danielholm commented on GitHub (May 10, 2025):
Same here. Tried adding Pangolin and other local services to same docket net without avail.
Portainer access works, as does remoting in to my homelab via Newt.
But creating a local site I can never resolve to target using the Pangolin-defined resource path, even though the resource is available if I access it via the server IP:port directly.
Steps tried:
Creating a custom bridging network in Portainer for my Acccess stack + Dummy stack
Accessing variants of local host / fixed local ip's / running all containers on network_mode: host
Different cloudflare dns routing options from wildcard to specific domain omitted / included
<!-- gh-comment-id:2870205613 -->
@ashleycameron commented on GitHub (May 11, 2025):
Same here with this Portainer setup in VPS:
- Access stack (pangolin, gerbil, traefik containers)
- Dummy stack (speedtest)
Portainer access works, as does remoting in to my homelab via Newt.
But creating a local site I can never resolve to target using the Pangolin-defined resource path, even though the resource is available if I access it via the server IP:port directly.
Steps tried:
- Creating a custom bridging network in Portainer for my Acccess stack + Dummy stack
- Accessing variants of local host / fixed local ip's / running all containers on network_mode: host
- Different cloudflare dns routing options from wildcard to specific domain omitted / included
I setup using local site and resource with 127.0.0.1:9111
Here 127.0.0.1 means literally Traefik localhost, not host machine localhost.
Try docker0 interface IP, in most cases it is 172.17.0.1.
If you don't want docker container port to be exposed directly to the internet, you can bind port using - "172.17.0.1:9111:9000"
<!-- gh-comment-id:2870217835 -->
@oloev commented on GitHub (May 11, 2025):
> I setup using local site and resource with 127.0.0.1:9111
Here 127.0.0.1 means literally Traefik localhost, not host machine localhost.
Try docker0 interface IP, in most cases it is 172.17.0.1.
If you don't want docker container port to be exposed directly to the internet, you can bind port using `- "172.17.0.1:9111:9000"`
@ashleycameron commented on GitHub (May 11, 2025):
I setup using local site and resource with 127.0.0.1:9111
Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using - "172.17.0.1:9111:9000"
When I try 172.17.0.1 the error changes to Gateway timeout at least and doesn't just immediately fail at Bad gateway
<!-- gh-comment-id:2870219936 -->
@ashleycameron commented on GitHub (May 11, 2025):
> > I setup using local site and resource with 127.0.0.1:9111
>
> Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using `- "172.17.0.1:9111:9000"`
When I try 172.17.0.1 the error changes to Gateway timeout at least and doesn't just immediately fail at Bad gateway
I setup using local site and resource with 127.0.0.1:9111
Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using - "172.17.0.1:9111:9000"
When I try 172.17.0.1 the error changes to Gateway timeout at least and doesn't just immediately fail at Bad gateway
What is your docker0 ip?
What ports do you see after running docker ps?
<!-- gh-comment-id:2870222866 -->
@oloev commented on GitHub (May 11, 2025):
> > > I setup using local site and resource with 127.0.0.1:9111
> >
> >
> > Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using `- "172.17.0.1:9111:9000"`
>
> When I try 172.17.0.1 the error changes to Gateway timeout at least and doesn't just immediately fail at Bad gateway
What is your docker0 ip?
What ports do you see after running `docker ps`?
@ashleycameron commented on GitHub (May 11, 2025):
I setup using local site and resource with 127.0.0.1:9111
Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using - "172.17.0.1:9111:9000"
When I try 172.17.0.1 the error changes to Gateway timeout at least and doesn't just immediately fail at Bad gateway
What is your docker0 ip? What ports do you see after running docker ps?
<!-- gh-comment-id:2870225066 -->
@ashleycameron commented on GitHub (May 11, 2025):
> > > > I setup using local site and resource with 127.0.0.1:9111
> > >
> > >
> > > Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using `- "172.17.0.1:9111:9000"`
> >
> >
> > When I try 172.17.0.1 the error changes to Gateway timeout at least and doesn't just immediately fail at Bad gateway
>
> What is your docker0 ip? What ports do you see after running `docker ps`?
docker0 ip : `172.17.0.1`
docker ps ports:
```
[pangolin] : empty
[traefik] : empty
[gerbil] : 0.0.0.0:80->80/tcp, [::]:80->80/tcp, 0.0.0.0:443->443/tcp, [::]:443->443/tcp, 0.0.0.0:51820->51820/udp, [::]:51820->51820/udp
[dummy stack] : 3000/tcp, 8080/tcp, 0.0.0.0:3201->3001/tcp, [::]:3201->3001/tcp
```
Looks like only port 3201 is accessible from docker. Do you use it as target?
For test you can try to run python3 -m http.server --bind 172.17.0.1 on host and add target 172.17.0.1 with port 8000. Does it work?
<!-- gh-comment-id:2870242647 -->
@oloev commented on GitHub (May 11, 2025):
>[dummy stack] : 3000/tcp, 8080/tcp, 0.0.0.0:3201->3001/tcp, [::]:3201->3001/tcp
Looks like only port 3201 is accessible from docker. Do you use it as target?
For test you can try to run `python3 -m http.server --bind 172.17.0.1` on host and add target 172.17.0.1 with port 8000. Does it work?
Looks like only port 3201 is accessible from docker. Do you use it as target? For test you can try to run python3 -m http.server --bind 172.17.0.1 on host and add target 172.17.0.1 with port 8000. Does it work?
172.17.0.1 : 3201 is how i've setup my local resource target in pangolin yes.
Attempting the python server, same result of gateway timeout
<!-- gh-comment-id:2870244626 -->
@ashleycameron commented on GitHub (May 11, 2025):
> > [dummy stack] : 3000/tcp, 8080/tcp, 0.0.0.0:3201->3001/tcp, [::]:3201->3001/tcp
>
> Looks like only port 3201 is accessible from docker. Do you use it as target? For test you can try to run `python3 -m http.server --bind 172.17.0.1` on host and add target 172.17.0.1 with port 8000. Does it work?
172.17.0.1 : 3201 is how i've setup my local resource target in pangolin yes.
Attempting the python server, same result of gateway timeout
I setup using local site and resource with 127.0.0.1:9111
Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using - "172.17.0.1:9111:9000"
In Pangolin add Resources with Targets Configuration's IP / Hostname set to container's IPv4 Address instead of localhost. The ip should be 172.X.X.X.
docker ps
docker inspect <container_name_or_id>
Then look for the NetworkSettings > Networks > IPAddress field.
or get ip from Portainer
<!-- gh-comment-id:2870815774 -->
@pong106 commented on GitHub (May 12, 2025):
Got it working now. Here are the settings
> > I setup using local site and resource with 127.0.0.1:9111
>
> Here 127.0.0.1 means literally Traefik localhost, not host machine localhost. Try docker0 interface IP, in most cases it is 172.17.0.1. If you don't want docker container port to be exposed directly to the internet, you can bind port using `- "172.17.0.1:9111:9000"`
In Pangolin add `Resources` with `Targets Configuration`'s `IP / Hostname` set to container's IPv4 Address instead of localhost. The ip should be 172.X.X.X.
```
docker ps
docker inspect <container_name_or_id>
```
Then look for the NetworkSettings > Networks > IPAddress field.
or get ip from Portainer
Also did managed to deploy uptime-kuma. Note the networks portions in yml. I believe that the service and Pangolin stack should share the same network and subnet. Port mapping is optional. Used http, 172.X.X.X and 3001 in Targets Configuration.
services:
uptime-kuma:
restart: always
networks:
- pangolin # note the networks here
volumes:
- /uptime:/app/data
container_name: uptime-kuma
image: louislam/uptime-kuma
# note the networks here
networks:
pangolin:
external: true
<!-- gh-comment-id:2872759716 -->
@pong106 commented on GitHub (May 12, 2025):
Also did managed to deploy uptime-kuma. Note the `networks` portions in yml. I believe that the service and `Pangolin` stack should share the same network and subnet. Port mapping is optional. Used `http`, `172.X.X.X` and `3001` in `Targets Configuration`.
```
services:
uptime-kuma:
restart: always
networks:
- pangolin # note the networks here
volumes:
- /uptime:/app/data
container_name: uptime-kuma
image: louislam/uptime-kuma
# note the networks here
networks:
pangolin:
external: true
```
@ashleycameron commented on GitHub (May 12, 2025):
thanks for the help all, i also managed to resolve this. Was either / both needing to specify a custom network for gerbil and proxied services / waiting for dns to update and point to the right place
<!-- gh-comment-id:2873517067 -->
@ashleycameron commented on GitHub (May 12, 2025):
thanks for the help all, i also managed to resolve this. Was either / both needing to specify a custom network for gerbil and proxied services / waiting for dns to update and point to the right place
Also did managed to deploy uptime-kuma. Note the networks portions in yml. I believe that the service and Pangolin stack should share the same network and subnet. Port mapping is optional. Used http, 172.X.X.X and 3001 in Targets Configuration.
services:
uptime-kuma:
restart: always
networks:
- pangolin # note the networks here
volumes:
- /uptime:/app/data
container_name: uptime-kuma
image: louislam/uptime-kuma
# note the networks here
networks:
pangolin:
external: true
It works for me. In target configuration I put the name of the container and works very well.
<!-- gh-comment-id:2873692683 -->
@noahcub commented on GitHub (May 12, 2025):
> Also did managed to deploy uptime-kuma. Note the `networks` portions in yml. I believe that the service and `Pangolin` stack should share the same network and subnet. Port mapping is optional. Used `http`, `172.X.X.X` and `3001` in `Targets Configuration`.
>
> ```
> services:
> uptime-kuma:
> restart: always
> networks:
> - pangolin # note the networks here
> volumes:
> - /uptime:/app/data
> container_name: uptime-kuma
> image: louislam/uptime-kuma
>
> # note the networks here
> networks:
> pangolin:
> external: true
> ```
It works for me. In target configuration I put the name of the container and works very well.
Great many thanks! It works! :-)
Hopefully the services IP stays the same. 🤞
<!-- gh-comment-id:2876285171 -->
@calim20 commented on GitHub (May 13, 2025):
Great many thanks! It works! :-)
Hopefully the services IP stays the same. 🤞
How about local services installed natively (e.g., debian packages) and not through docker? Any way to refer to the host machine localhost?
<!-- gh-comment-id:3591784484 -->
@gitandriu commented on GitHub (Nov 29, 2025):
How about local services installed natively (e.g., debian packages) and not through docker? Any way to refer to the host machine localhost?
How about local services installed natively (e.g., debian packages) and not through docker? Any way to refer to the host machine localhost?
docker inspect pangolin find the "Gateway" address and create the resource in Pangolin with that IP
<!-- gh-comment-id:3617059349 -->
@alanb2 commented on GitHub (Dec 5, 2025):
> How about local services installed natively (e.g., debian packages) and not through docker? Any way to refer to the host machine localhost?
`docker inspect pangolin` find the "Gateway" address and create the resource in Pangolin with that IP
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @pong106 on GitHub (May 3, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/649
Having
Bad Gatewayerror when I spin up Portainer beside Pangolin. I setup usinglocalsite andresourcewith127.0.0.1:9111. Cant see any error in any loggings. Traefik dashboard works with the same method. Did not modify anygerbilsettings.docker-compose
@hermanops commented on GitHub (May 3, 2025):
create resource with port 9443?
@pong106 commented on GitHub (May 4, 2025):
tried with both 9111 and 9443 , same error.
@calim20 commented on GitHub (May 9, 2025):
Same here. I tried it with two different services, nginx and uptime-kuma. After authentication I get
Bad Gateway.I have created a
localsite with two resources. The nginx container I've started withdocker run(docker run -it --rm -d -p 8082:80 --name web nginx) and for uptime-kuma I've useddocker compose.docker-compose.yml
I've setup pangolin with crowdsec.
Best,
Marco
@noahcub commented on GitHub (May 10, 2025):
Same problem here
@danielholm commented on GitHub (May 10, 2025):
Same here. Tried adding Pangolin and other local services to same docket net without avail.
@ashleycameron commented on GitHub (May 11, 2025):
Same here with this Portainer setup in VPS:
Portainer access works, as does remoting in to my homelab via Newt.
But creating a local site I can never resolve to target using the Pangolin-defined resource path, even though the resource is available if I access it via the server IP:port directly.
Steps tried:
@oloev commented on GitHub (May 11, 2025):
Here 127.0.0.1 means literally Traefik localhost, not host machine localhost.
Try docker0 interface IP, in most cases it is 172.17.0.1.
If you don't want docker container port to be exposed directly to the internet, you can bind port using
- "172.17.0.1:9111:9000"@ashleycameron commented on GitHub (May 11, 2025):
When I try 172.17.0.1 the error changes to Gateway timeout at least and doesn't just immediately fail at Bad gateway
@oloev commented on GitHub (May 11, 2025):
What is your docker0 ip?
What ports do you see after running
docker ps?@ashleycameron commented on GitHub (May 11, 2025):
docker0 ip :
172.17.0.1docker ps ports:
@oloev commented on GitHub (May 11, 2025):
Looks like only port 3201 is accessible from docker. Do you use it as target?
For test you can try to run
python3 -m http.server --bind 172.17.0.1on host and add target 172.17.0.1 with port 8000. Does it work?@ashleycameron commented on GitHub (May 11, 2025):
172.17.0.1 : 3201 is how i've setup my local resource target in pangolin yes.
Attempting the python server, same result of gateway timeout
@pong106 commented on GitHub (May 12, 2025):
Got it working now. Here are the settings
In Pangolin add
ResourceswithTargets Configuration'sIP / Hostnameset to container's IPv4 Address instead of localhost. The ip should be 172.X.X.X.Then look for the NetworkSettings > Networks > IPAddress field.
or get ip from Portainer
@pong106 commented on GitHub (May 12, 2025):
Also did managed to deploy uptime-kuma. Note the
networksportions in yml. I believe that the service andPangolinstack should share the same network and subnet. Port mapping is optional. Usedhttp,172.X.X.Xand3001inTargets Configuration.@ashleycameron commented on GitHub (May 12, 2025):
thanks for the help all, i also managed to resolve this. Was either / both needing to specify a custom network for gerbil and proxied services / waiting for dns to update and point to the right place
@noahcub commented on GitHub (May 12, 2025):
It works for me. In target configuration I put the name of the container and works very well.
@calim20 commented on GitHub (May 13, 2025):
Great many thanks! It works! :-)
Hopefully the services IP stays the same. 🤞
@calim20 commented on GitHub (May 13, 2025):
Just checked, works also with container name instead of IP. 🎆
@gitandriu commented on GitHub (Nov 29, 2025):
How about local services installed natively (e.g., debian packages) and not through docker? Any way to refer to the host machine localhost?
@alanb2 commented on GitHub (Dec 5, 2025):
docker inspect pangolinfind the "Gateway" address and create the resource in Pangolin with that IP