Troubleshooting
Work each problem in chapter 2's order — which part is unhappy? — and prefer the check that reads the ground truth (the generated file, the logs) over re-clicking and hoping.
The login page loads, but logging in fails or spins
The face is fine; the backend is not
answering its API. In Docker:
docker compose logs and look for the
backend's startup completing —
migrations, setup, and a listening
line. A backend that restarts in a
loop is usually a database it cannot
open: check that ./data is mounted
and writable, and that
database.sqlite is not owned by
someone the container cannot be. The
lab's equivalent evidence is
transcript t04: a healthy start is a
page of migrations ending in
listening, not an error and a retry.
A proxy host says Offline
NPM's test or reload of nginx failed
for this host's file. Read the file —
/data/nginx/proxy_host/<id>.conf —
and test the way NPM does:
docker compose exec app nginx -t.
The full error names the line.
Usual causes: a typo in an Advanced
tab custom configuration (the
free-text box writes straight into
the file — the one place the form
lets you write raw nginx), or a
certificate file the config references
that no longer exists. Fix the cause,
then toggle the host off and on to
make NPM regenerate and retest. The
lab met a relative of this failure
worth recognising (transcript t08):
its create request returned 500
with nginx complaining invalid PID
number "" in "/run/nginx.pid" — the
reload signalling a master process
that did not exist. Inside Docker
that means the container's nginx died;
restart the container and read its
logs rather than recreating hosts —
the records were never the problem.
The service answers at its IP:port but not at its name
Three suspects, in order. DNS:
dig +short app.example.com — if it
does not return this machine, nothing
in NPM can help yet. The wrong
host answers: another host (often
the first one created) claims the
name, or a redirection host is
shadowing it — chapter 9's warning;
check the banner comment at the top
of each generated file. The proxy
works, the service refuses: the
host's own error log,
/data/logs/proxy-host-<id>_error.log,
says whether nginx could connect to
the forward address at all — a
service bound to 127.0.0.1 on
another machine is the classic.
The certificate request fails
Let's Encrypt could not prove the name. For the HTTP challenge, the cause is almost always reachability: the name resolves somewhere else, or port 80 is not forwarded, or an ISP blocks it — test from outside your network (a phone with Wi-Fi off), because from inside, your own NPM answering proves nothing about the internet's view. The request's log (under SSL Certificates → View Log) quotes Certbot's own words; believe them literally. If the name must stay unreachable, switch the request to the DNS challenge (chapter 8) instead of retrying the same failure into Let's Encrypt's rate limit. A certificate stuck renewing shows the same log; a renewal that failed once retries on the timer, not on your refresh.
The setup screen came back after you already set up
The backend thinks no administrator
exists — which means it is reading a
different, empty database. You
recreated the container without its
./data volume, or Compose is running
from a new folder with an empty
./data beside it. Stop; find the
original folder with the real
database.sqlite and keys.json;
run from there. This failure is the
chapter 3 sermon in one act: the
container is disposable, the two
volumes are the install.
Everything worked until an NPM upgrade
Same sermon, second verse: the new
image met an old database and its
migrations did not finish — the logs
show migration errors at startup.
Restore the two folders from the
backup you took before upgrading,
pin the previous image tag
(jc21/nginx-proxy-manager:<version>
instead of latest) to get running,
and treat latest as a word to use
on a copy first. The lab habit —
transcripts before conclusions —
applies verbatim: read the startup
log's first error, not its last.