NGINX proxy manager Truenas Scale Dockge, cant point to truenas host

Hello everyone,
I have a problem with the use of nginx proxy manager, which I have running via the dockge app extension. I have created a macvlan so that I can give most apps their own IP addresses. So npm has a diffent ip address than the truenas host itself. If an app has its own IP address, e.g. Adguard (also container in dockge), then I can set up a forwarding with certificate via nginx. But on the Truenas GUI or dockge (truenasip:5001) I always get error 502 bad gateway.

I have successfully set up my ssl certifiate and also several redirects to different ip addresses in my network. So I know that the basic settings should actually work. The problem now is that I cannot forward to the host itself (i.e. Truenas Scale) or to other containers running on the Truenas IP under a different port.

I setup the macvlan using a bridge created truenas scale network, containing the physical port. This bridge connected to vm’s with diffent IP’s also working.

Below is my npm compose.yaml

  npm:
    image: jc21/nginx-proxy-manager:latest
    container_name: npm
    restart: unless-stopped
    ports:
      - 80:80
      - 81:81
      - 443:443
    volumes:
      - /mnt/software/apps/npm:/data
      - /mnt/software/apps/letsencrypt:/etc/letsencrypt
    networks:
      macvlan:
        ipv4_address: 10.10.10.3
networks:
  macvlan:
    external: true
    name: macvlan

Any tipp on how to get this working would be highly appreciated.

Regards,
Steffen

In my experience i tried this way and face has you the same 502 error… After some reaserch i realised that docker host can’t reach macvlan containers, so that’s why Is not working.
Maybe exists some “trick”, but i didn’t find anything… so at the end i change the TN webui default ports to let NPM listen on 80 and 443, with them sharing same IP

Thank yu for your response. I tried that. Moving TN ports to somehting like 853 and 444 and removing the macvlan on npm. But than i cant reach my vm’s and other containers which need a deticated ip anymore. Guess i have to search more

Apps with Configurable IP addresses: Apps in Electric Eel use TrueNAS’s host IP address. Fangtooth enables IP alias addresses to be created and assigned to one or more Apps.

For your situation this will be a game changer IMHO.

1 Like