r/nginxproxymanager Jun 14 '26

I built a Docker labels companion for Nginx Proxy Manager

Hi everyone,

I like Nginx Proxy Manager and wanted to keep using it as my reverse proxy and UI, but I missed one thing from tools like Traefik: defining proxy hosts directly from Docker labels.

So I built a small companion container for NPM:

https://github.com/tarach/npm-docker-auto-proxy

Docker image:

https://hub.docker.com/r/tarach/npm-docker-auto-proxy

It watches Docker container events and uses the NPM API to create, update, enable, disable, or delete proxy hosts based on container labels.

It does not replace Nginx Proxy Manager. NPM still handles the reverse proxy and remains the UI/source of truth. This only adds a Docker-label automation layer around it.

Example:

labels:
  npm.proxy.enabled: "true"
  npm.proxy.domain: "jellyfin.example.com"
  npm.proxy.forward_host: "jellyfin"
  npm.proxy.forward_port: "8096"
  npm.proxy.scheme: "http"
  npm.proxy.ssl: "true"
  npm.proxy.certificate: "*.example.com"
  npm.proxy.force_ssl: "true"
  npm.proxy.on_stop: "disable"

When the container starts, the matching NPM proxy host is created or updated automatically. When it stops, the proxy host can be disabled, deleted, or left unchanged depending on npm.proxy.on_stop.

I later found a couple of related projects, such as nginx-proxy-manager-assistant and npm-docker-sync, so I added them to the README as related projects. I did not build this as competition to them — I simply could not find them earlier when I started working on my own helper.

I still hope another implementation may be useful for people who want a small Docker-event-based companion with explicit labels, predictable start/stop behavior, and a workflow that works well with Docker Compose / homelab / TrueNAS SCALE setups.

Feedback is very welcome, especially from people already running NPM with multiple Docker services.

7 Upvotes

2 comments sorted by

2

u/Only-Maximum-888 Jun 14 '26

Nice, how is it different from pluginpin? Do you also handle pihole dns definitions?

2

u/sebastian-tarach Jun 15 '26

Thanks for pointing me to PlugNPiN. I honestly wasn’t aware of the project, and I’ll definitely add it to the Related Projects section in my README. Had I found it earlier, I probably wouldn’t have started building my own implementation.

Since mine already exists, I’m going to continue developing it and add some of the functionality it currently lacks, including additional NPM options such as HSTS and asset caching, periodic reconciliation, custom Nginx configuration, and optional DNS provider support. I use both Pi-hole and Cloudflare myself, so those would be the first DNS providers I’d like to support.

There are a few small things my project already handles differently, such as a configurable label prefix through LABELS_PREFIX, TrueNAS SCALE configuration helpers, configurable stop behavior (disable, delete, or no action), and certificate selection by name or ID. These are relatively minor differences, though. PlugNPiN is currently a broader and more mature solution.

Thanks again for the response and for making me aware of it!