Hello I have a small problem I have two server under docker on one there is nginx proxy manager and pihole which functions on a network which I called “proxy” and I would like to make that I can go on applications which functions on the second server by not opening port but just by making that the two server can communicate on the same network
The proxy container needs access to the Docker API and forwards requests through the Docker network. I haven’t used the proxy manager yet, but I guess it works the same way. So even if you can access the api remotely, it can’t forward the request to the remote container.
You could probably configure an overlay network accross the hosts which is automaticaly done in a cluster (Swarm, Kubernetes) but it seems much easier to configue to nginx proxy managers (on both hosts) and and another statically configured proxy in front of them. Or you can add custom rules to the first proxy to forward requests to the second hosts but that host still needs a proxy too.
Normally an Nginx proxy (manager) is for s single host because you need an entrypoint for the other containers and the proxy can automatically detect containers and there configuration like the required domain and the assigned IP address so no need for interactive configuration every time you add a new host or just recreate a container which gets a new IP address…