mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #869] Proxy non-docker services #738
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#738
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @rototom on GitHub (Feb 7, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/869
I installed npm and really like this aproach of proxying to my serives.
I have several docker and non-docker services on my server, the docker ones are simple to use via docker-compose and the "network" entry in the docker-compose.yml.
How can I use my non-docker services, funkwhale and mastodon f.e.?
@lieven121 commented on GitHub (Feb 11, 2021):
You could easily convert them to docker containers (there are 101 tutorials online)
Or you should be able to refer to the "host" you are running the proxy on to them.
Your First guess might be localhost but this would actually refer to the container itself.
There are several ways to fix this
src
1 use --network="host" this would allow you to use localhost but has other side effect you might not want
2 find the ip of the host. is explained in the src but is kinda a workaround and can change with new deployments
3 (my favorite) host.docker.internal this shoud point to the host. here just add the port of the service
(unless its running on a other server ofc, then its just serverip:port)
@Robin-Sch commented on GitHub (Sep 11, 2021):
I've added that to proxy manager, and in a different compose project one service is listening on 0.0.0.0:8080. Going to publicIP:8080 works.
I can't put them in the same network because the other compose project requires it's own network
@adrianbienias commented on GitHub (Feb 12, 2023):
Inside the container in
/etc/hosts, it maps IP172.17.0.1tohost.docker.internal.So
host.docker.internalis quite irrelevant, what it matters is the IP.I have an app running on the host on port 3000 (it's not dockerized). I'd like to ultimately proxy that app to a domain.
I'm trying to debug it first, running bash inside the Nginx Proxy Manager container.
So, inside the container, I run
curl 172.17.0.1:80. It shows default Nginx Proxy Manager "Congratulations!" page.But when I try (inside the container)
curl 172.17.0.1:3000it just times out or refuse to connect.So Nginx Proxy Manager container clearly doesn't have access to the host.
Any ideas what could be the case?
@ycsin commented on GitHub (Sep 2, 2023):
Hey @adrianbienias, I'm also having the same question, did you manage to find a fix for this?
@adrianbienias commented on GitHub (Sep 2, 2023):
@ycsin I ended up using the following docker compose configuration:
allowing nginx proxy manager running inside docker container to access the host network, so all apps that run directly on the host machine on different ports are accessible.
It has some additional benefits comparing to the default configuration
Using
ufwfirewall on Ubuntu (not sure if it's also a flaw with other distros/firewalls), docker bypassesufwconfiguration, opening listed ports, so port81is open too, even if inufwyou don't see it as open port.It's a docker issue better described e.g. here:
What is the best practice of docker + ufw under Ubuntu - Stack Overflow
but by using
instead of opening certain ports, you also mitigate that problem with
ufw.@ycsin commented on GitHub (Sep 2, 2023):
Thanks for sharing the file!
@github-actions[bot] commented on GitHub (Mar 19, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Apr 30, 2025):
Issue was closed due to inactivity.