Nginx Proxy Manager ignoring ports

Soldato
Joined
10 Sep 2009
Posts
2,567
Location
United Kingdom
I have been trying to set up a proxy for some services on my server via Tailscale so I can use a nice DNS and not deal with ports. I got on one to work, but everything else is ignoring the port.

I am running Nginx in Docker Compose on OMV. All my services are also on Docker on OMV, except Home Assistant, which is on a VM on the same server, and another service on a different server using Docker Compose and OMV. I can access them on the local network and via the Tailscale DNS or IP, using the correct port. The DNS I use is from Cloudflare. I created SSL cert with their token, but it doesn't matter if I use it or not, I still have the same problem.

For example, I created a proxy host to localhost and port 81 to domain.com. When accessing domain.com, it is redirected to localhost instead of localhost: port. I also tried setting the IP to the Docker name instead of localhost since they are on the same network, but I still get directed to localhost.

As of right now, I have to do domain.com: port to access the correct service, which is not ideal.



I hope this explains it well since I am a networking noob.
 
Last edited:
Yeah the goal is only proxy the services. I moved Nignx to my home assistant as an add on but the problem persisted. The Nginx page on port 81 is the only thing I got working.

services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped

ports:
# These ports are in format <host-port>:<container-port>
- '81:81' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '82:82' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP

environment:
TZ: "Europe/London"

# Uncomment this if you want to change the location of
# the SQLite DB file within the container
# DB_SQLITE_FILE: "/data/database.sqlite"

# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'

volumes:
- /nginx-data:/data
- /nginx-letsencrypt:/etc/letsencrypt

This was the compose yaml file. LLM is useless btw. It never says anything useful or I haven't tried.
 
Last edited:
Before we go head first into yaml land.

Can you share some images of how you've set the hosts up in NPM?
What are your DNS records looking like?

Start at the shallow end before you go deep.


this is the image of my dns record on cloudflare. the content is the ip address of my server.


this is my nginex. i disabled ssl right now and it still doesnt work. only the npm dns worked.
 
Last edited:
Nginex is installed on the Home Assistant VM now. Because it crashed overnight for no reason and server couldn't recreate the container and got stuck. I had to hard reset the server to get it running again. I am kind of scared of it now lol. I think now its on the VM, its more safe because crashing the VM does nothing. Port 80 is free on that VM since HA uses port 8123. So the address from Nginex (npm.ha.xxx) works. But the other stuff always goes to the OMV web UI. What you are saying is it always try port 80 first which is OMV and since it can connect, it just do and not go to the port of the services?
 
Last edited:
To my knowledge add ons in HA are basically Docker containers. The proxy project is on hold right now because the server is undergoing maintenance after a disaster and I am too scared to do anything before I finish backing up. You can found the details of my woes on the other thread.

I will come back to do proxy after the server is stable again

The record and host proxy settings are identical in the HA add on to the Docker settings I posted. But I still have the same issue where only the DNS to the NPM UI is correct and the others goes to the OMV UI on port 80. The .ha is record is the VM's IP. .rev and .tail are the IP of the other servers. (there are two servers) HA VM is on the .tail server.
 
Last edited:
I am back trying to do this stuff again. I just want to get the https working for tailscale. I am trying to install NPM on docker using docker compose on OMV but it keeps saying port 80 is in use even I set it to use other ports.

NVM I forgot I moved to the setup to my Home Assistant VM

SO NPM is installed but I still couldn't get the https to a service to work.
 
Last edited:
I am try to use cloudflare to setup SSL within my Tailscale network for a service to be connected to IPad app because the app wants https connection to the service.

I am using Cloudflare. I got a domin and made a DNS record on it with the tailscale IP. I can connect to the domin in the tailscale network fine, however, when I try to add a SSL cert I get : There is a server found at this domain but it returned an unexpected status code Connection timed out.. Is it the NPM server? Please make sure your domain points to the IP where your NPM instance is running.

The service is only supposed to work within the Tailscale network, so I don't know what to do.
 
Back
Top Bottom