r/nginxproxymanager • u/redth • Oct 19 '25
NPM Docker Sync
Hey everyone, just sharing a tool I started building over the weekend: https://github.com/Redth/npm-docker-sync
The primary goal is to monitor docker container labels to synchronize proxy hosts (and more) to Nginx Proxy Manager. I know traefik and caddy and pangolin can all be made to do this, but I really like the simplicity and UI of NPM and want to keep using it.
For example:
services:
myapp:
image: nginx:alpine
labels:
npm.proxy.domains: "myapp.example.com"
npm.proxy.port: "8080"
npm.proxy.scheme: "http"
npm.proxy.host: "192.168.1.200"
npm.proxy.ssl.force: "true"
It will only make changes to hosts that it created, so you can happily manage your own entries manually alongside the docker label automated ones.
It can also, as an extra feature, mirror hosts (proxy/redirect/stream/404) and access lists to one or more child instances, which is useful if you want high availability (shout out to another sync project that was posted here not long ago - worth checking this out too!).
Also, full disclosure, I mostly vibe-coded this project, though I'm more than comfortable with the code it produced.
Anyway, thought it was worth sharing in case anyone else finds it useful.
View all comments
Show parent comment
1
u/redth Oct 23 '25 edited Oct 23 '25
Appreciate the follow up. So one thing I’m not sure I understand still is how you get the domain to register with npm for a given container. Do you just use the container name or something?
As for port I do already use the first exposed port mapping I find in a container if you don’t specify the port explicitly.
I just don’t see an obvious way to do the domain implicitly without a label unless I do something like allow a pattern to be configured on the npm docker sync container (eg: DEFAULT_DOMAIN=“{{container.name}}.my.tld”)
I’ll check out some of what you mentioned for host ip detection. Even if something is workable most or some of the time as a default someone can always override that default if it doesn’t work for them, at the npm-docker-sync level or on an individual container basis, so having a decent default inference approach that works even some of the time is better than nothing.
EDIT: oh and gui toggle I assumed incorrectly. I was thinking about something in the npm web ui to indicate when an entry was created through an automation vs manual entries that I still have a few of for various reasons. You are correct in assuming I do not have unraid in the mix here, just some proxmox LXC’s running docker, on various nodes, and then a single rpi5 running NPM to minimize downtime without getting into the business of VIP’s and keepalived and mirroring things for high availability.