🚀 Shipped: Logs Viewer for Nginx Proxy Manager (v2.16.0)
PR #5878 → merged into NginxProxyManager/nginx-proxy-manager · +1262 −12 · 27 files changed
The problem
NPM only had the Audit Log — a record of user actions in the database, not actual process logs. So when a proxy host misbehaved, a Certbot renewal failed, or a backend threw an error, the only way to investigate was shelling into the container and reading docker logs by hand.
The solution
An admin-only Logs page that tails three kinds of logs straight from the browser:
System — the backend application log (previously stdout-only, now also mirrored to disk)
Let's Encrypt — the log certbot already writes on its own
Per-host — access/error logs for every proxy, redirect, 404, and stream
New endpoints: GET /api/logs/sources and GET /api/logs/tail
New permission: logs:list (admin-only)
Breaking changes: none
Engineering notes
File paths are always resolved server-side — zero path traversal risk
Reads happen in 64KB chunks, capped at 5MB and 1000 lines per request
Search is a plain substring match, never user-supplied regex — no ReDoS
Live polling runs every 5s, only while the tab is focused and the toggle is on
Code review
The maintainer found one real bug — a renamed database column (forward_ip → forwarding_host) that broke a label in the stream dropdown. Fixed within minutes.
Thanks! — @jc21
How it feels
Seeing my own code running in production for everyone using Nginx Proxy Manager worldwide is a pretty great feeling. Next PR: loading... 🚀
