Manage Nginx Proxy Manager proxy hosts from the Proxy hosts page
With an optional second user on the NPM integration (Manage on Proxy Hosts, no two-factor sign-in) an administrator can make, change, switch off and delete proxy hosts: names, where it forwards to, an existing certificate and what is switched on. Only what differs is sent, a host's access list, locations and custom configuration are never touched, and combinations NPM would quietly undo (Force HTTPS, HTTP/2 or HSTS without a certificate) are refused with the reason. Delete asks for the host's first name, checked against the host as NPM has it. The user that reads is still view-only and never writes. Audited; the managing user can be taken away again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
672c7f2f66
commit
4dd7901f1c
13 files changed
+1286
-14
No files matched your search
+8
-3
@@ -315,9 +315,9 @@ osTicket's API cannot close a ticket, so this is the one place in the app that *
|
||||
|
||||
### Nginx Proxy Manager
|
||||
|
||||
- **Config fields:** NPM's admin URL (the address of its web page, usually port 81), an email and a password, and a checkbox to allow a self-signed certificate.
|
||||
- **Config fields:** NPM's admin URL (the address of its web page, usually port 81), an email and a password, optionally a second **email and password for managing** proxy hosts (below), and a checkbox to allow a self-signed certificate.
|
||||
- **Required access:** NPM has no API keys: its API is the one its own web page uses, so the app signs in with an email and password (each read signs in again; nothing is kept). Make a **dedicated user** under
|
||||
*Users* and, under its *Permissions*, give it **View only** on *Proxy Hosts* and *SSL Certificates* — that is all that is read. **Nothing is ever written** to NPM.
|
||||
*Users* and, under its *Permissions*, give it **View only** on *Proxy Hosts* and *SSL Certificates* — that is all that is read, and this user **never writes**: reading NPM sends nothing but `GET` requests.
|
||||
- **What it does:** when **Network → Proxy hosts** is opened (and for the alerts and the suggested checks, at most once a minute) NPM is asked for its proxy hosts and certificates. Nothing is stored in the database:
|
||||
what is shown is what NPM said a minute ago.
|
||||
- Each host shows its names, where it forwards to — and the server that is, when the address (or name) is one of a server's own, exactly — its certificate and whether it is working.
|
||||
@@ -325,7 +325,12 @@ osTicket's API cannot close a ticket, so this is the one place in the app that *
|
||||
is a **monitoring** alert. A host that is switched off is left alone. Both link to the Proxy hosts page and can be silenced with maintenance on the integration.
|
||||
- The hosts it serves are offered as **Endpoints → Suggested** checks (a web check on the name people use; https when there is a certificate), linked to the server it forwards to.
|
||||
- If NPM cannot be read, the Alerts page says it could not check, and the integration is raised as failing like any other.
|
||||
- **Not verified against a live NPM** — built from the API its own web page uses (`/api/tokens`, `/api/nginx/proxy-hosts?expand=certificate`, `/api/nginx/certificates`) and tried against a pretend one. Every
|
||||
- **Managing proxy hosts (optional, administrators only):** with a second user in *Email of a user that may manage* and *Password of that user* — a user with **Manage** on *Proxy Hosts*, **without two-factor sign-in** (NPM's API can't complete that from here); give it only if you want this — **Network → Proxy hosts** gets **New proxy host** and, on each row, **Edit**, **Switch off / on** and **Delete**:
|
||||
- **Make / change** (`POST /api/nginx/proxy-hosts`, `PUT …/{id}`): the **names**, where it **forwards to** (http or https, a host or address, a port), an **existing certificate**, and what is switched on — Force HTTPS, HTTP/2, HSTS (and for subdomains), block common exploits, cache assets, websockets. Names are written lower case and must be names NPM takes; a name another host has is NPM's own refusal, shown as it was said. Getting a *new* certificate is done in NPM.
|
||||
- **Only what differs is sent** when a host is changed, and a host's **access list, locations and custom nginx configuration are never sent**, so they stay as they are. NPM quietly turns Force HTTPS and HTTP/2 off for a host with no certificate (and HSTS when HTTPS is not forced), so those combinations are refused here with the reason, and the form does not let them be ticked.
|
||||
- **Switch off / on** (`POST …/{id}/disable` and `…/enable`): off, NPM stops serving the names; nothing is lost. **Delete** (`DELETE …/{id}`): NPM stops serving them and keeps the record out of sight; **the host's first name has to be typed**, and the server checks it against the host as NPM has it now, so a page that is minutes old or a wrong id cannot delete another host.
|
||||
- Every call **signs in again** as the managing user (nothing is kept); the user that reads is never used to write. What this app has read of NPM is read again after a change. *Stop managing* is under Integrations → edit (removing the two fields, or `DELETE /api/npm/{id}/manage`, which keeps the reading user). Written in the audit log: who made, changed, switched or deleted which host (its names and what it forwards to, and which settings changed — never a password).
|
||||
- **Not verified against a live NPM** — built from the API its own web page uses (`/api/tokens`, `/api/nginx/proxy-hosts?expand=certificate`, `/api/nginx/certificates`, and for managing `/api/nginx/proxy-hosts` with `POST`, `PUT`, `DELETE` and `…/enable`, `…/disable`) and tried against a pretend one. Every
|
||||
field is read defensively. If a read fails or comes back empty, the **Diagnostic Log** has what NPM answered.
|
||||
|
||||
### Home Assistant
|
||||
|
||||
Reference in new issue
Block a user