docs/src/third-party/npm-auth-gateway.md
User-level access control for Nginx Proxy Manager with auto IP whitelisting.
Repository: github.com/Mark0025/npm-auth-gateway
NPM Auth Gateway is a companion app that adds user management on top of NPM's access list system. Instead of manually adding IPs to access lists, users log in through an auth provider and their IP is automatically whitelisted on the access lists they've been assigned to.
NPM remains fully in control — the gateway only reads and writes through NPM's REST API. All access enforcement stays in NPM's nginx config.
Browser → NPM (SSL) → Auth Gateway → Auth Provider
↓
NPM REST API (:81)
auto-add IP to access lists
| Responsibility | Who Handles It |
|---|---|
| SSL termination | NPM |
| Proxy host configuration | NPM |
| Access list enforcement | NPM |
| IP whitelisting | NPM |
| User identity | Auth Provider |
| User → access list mapping | Gateway |
| Auto IP whitelisting | Gateway |
No database required. NPM stores all proxy/ACL config. User metadata lives in the auth provider. Zero state duplication.
| Endpoint | Purpose |
|---|---|
POST /api/tokens | Authentication |
GET /api/nginx/proxy-hosts | List proxy hosts |
GET /api/nginx/access-lists | List access lists |
PUT /api/nginx/access-lists/:id | Update access list IPs |
POST /api/nginx/access-lists | Create access list |
GET /api/nginx/certificates | List SSL certificates |
See the repository README for Docker deployment instructions.
Next.js / React / TypeScript / Docker
The auth provider is swappable — the proof of concept uses Clerk, but any OIDC provider works (Auth0, Keycloak, Authentik, etc.).