nginx-proxy-manager/backend/lib
Tom Winnerl 6bd369299a feat(upstreams): discovery, reachability check and health monitor
New /api/upstreams endpoints that help picking and watching forward hosts:

- GET /upstreams/candidates suggests upstreams from three sources: hosts
  already used by other proxy hosts/streams, containers found through
  Docker's embedded DNS on the networks NPM is attached to
  (NPM_DNS_DISCOVERY, on by default) and, opt-in, containers from the
  Docker API (NPM_DOCKER_DISCOVERY + DOCKER_HOST, e.g. a docker-socket-proxy).
- POST /upstreams/check resolves a host with the same resolver nginx uses
  and opens a TCP connection to the port, returning a status code
  (ok, dns_not_found, tcp_refused, ...) and the round trip time. Checks
  are rate limited per user and can be turned off with NPM_UPSTREAM_CHECK=false.
- GET /upstreams/health returns the results of a background monitor that
  checks the targets of all enabled hosts every NPM_UPSTREAM_HEALTH_INTERVAL
  seconds (default 60, 0 turns it off). It shows the hosts the proxy host
  and stream lists show the user (with proxy hosts shared through
  permissions.meta.proxy_host_ids). The monitor starts with the backend
  and stops on SIGTERM.

Access is controlled by the new upstreams:discover permission (users who may
manage proxy hosts or streams); access.can() gets a quiet option so this
lookup doesn't log a denial for every request. The OpenAPI schema
documents the three paths and their result objects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:03:56 +01:00
..
access feat(upstreams): discovery, reachability check and health monitor 2026-11-14 09:03:56 +01:00
express Fix second round of review findings from PR #6029 2026-11-09 23:39:26 +10:00
upstream feat(upstreams): discovery, reachability check and health monitor 2026-11-14 09:03:56 +01:00
validator Stop non-admins injecting nginx directives through host fields 2026-11-10 08:20:02 +10:00
access.js feat(upstreams): discovery, reachability check and health monitor 2026-11-14 09:03:56 +01:00
certbot.js Fix cypress suite 2026-05-27 07:25:24 +10:00
config.js fix: Restrict JWT key file permissions to 0600 2026-08-24 09:30:22 +00:00
error.js feat(nginx): serialised configure that tests, rolls back and repairs other hosts 2026-11-11 13:47:08 +01:00
helpers.js Convert backend to ESM 2025-10-02 08:10:18 +10:00
migrate_template.js Convert backend to ESM 2025-10-02 08:10:18 +10:00
nginx-advanced.js fix(review): tokenize *_by_lua_block bodies as Lua 2026-11-14 09:03:56 +01:00
nginx-blame.js fix(review): reduce a shared-path blame group to the hosts that cause the error 2026-11-13 19:21:55 +01:00
nginx-errors.js fix(review): allow variable forward paths on regex and named locations 2026-11-14 09:03:56 +01:00
nginx-includes.js fix(review): apply rewrite-phase guards of included files to cached assets 2026-11-14 09:03:56 +01:00
nginx-locations.js fix(review): apply rewrite-phase guards of included files to cached assets 2026-11-14 09:03:56 +01:00
nginx-lock.js feat(nginx): serialised configure that tests, rolls back and repairs other hosts 2026-11-11 13:47:08 +01:00
nginx-reload.js fix(review): take the error log baseline before the child baseline of a reload 2026-11-13 19:28:31 +01:00
nginx-tokenize.js fix(review): read unclosed strings in Lua blocks in linear time 2026-11-14 09:03:56 +01:00
nginx-values.js i18n(nginx): translatable host-level config error text 2026-11-12 00:10:05 +01:00
upstream-dns.js feat(nginx): render custom locations on their own, quarantine the broken ones 2026-11-14 09:03:56 +01:00
utils.js Fixes for upgraded debian trixie 2026-05-25 07:37:24 +10:00