Skip to content

Troubleshooting

Matthew Vlasov edited this page Nov 23, 2026 · 2 revisions

This page lists common problems with running NodePilot, the messages you will see, and how to fix them. The messages are quoted as the code produces them, so you can search this page for the text from your logs.

If your problem is not here, open an issue with the version (nodepilot --version), how the panel is installed, and the relevant log lines with secrets removed. Report security issues privately, as described in SECURITY.md.

Logs and health check

Setup Logs
systemd sudo journalctl -u nodepilot -f, or -b for the current boot
Docker docker logs -f nodepilot
Foreground stderr of the process

For more detail, add RUST_LOG=debug (or RUST_LOG=info,nodepilot_core=debug) to /etc/nodepilot/nodepilot.env and restart. Failed stats polls and failed update checks are logged only at debug.

Check that the panel answers:

curl -s http://127.0.0.1:7780/api/health
# {"status":"ok","version":"0.1.0"}

Startup errors are printed as Error: <context> followed by Caused by: lines. The cause is the useful part.

The panel does not start

Port already in use

Error: cannot start the panel on 127.0.0.1:7780 (port in use? choose another one with --listen or NODEPILOT_LISTEN)

Caused by:
    Address already in use (os error 98)

Another process, often a second NodePilot, already holds the port.

sudo ss -ltnp 'sport = :7780'          # who is listening

Stop that process, or choose another port: NODEPILOT_LISTEN=127.0.0.1:7781 in /etc/nodepilot/nodepilot.env (and update your reverse proxy).

Invalid value for an option

error: invalid value '1' for '--secure-cookies'
  [possible values: true, false]

NODEPILOT_SECURE_COOKIES accepts only true or false.

error: invalid value 'localhost:7780' for '--listen <LISTEN>': invalid socket address syntax

NODEPILOT_LISTEN must be an IP address and port (127.0.0.1:7780, 0.0.0.0:7780, [::1]:7780), not a host name.

Master key missing

Error: cannot open data directory /var/lib/nodepilot

Caused by:
    master key not found (systemd credential, NODEPILOT_MASTER_KEY_FILE or /var/lib/nodepilot/master.key), but the database already contains encrypted data. Refusing to create a new key: restore the key (or unseal it) and start again.

The database has users, keys or servers, but no master key was found. The panel refuses to generate a new key, because that would make every stored secret unreadable. Common causes:

  • master.key was deleted, or the database was copied to a new host without it.
  • The key was sealed in the TPM, but the drop-in /etc/systemd/system/nodepilot.service.d/master-key.conf is gone, or you are starting the binary outside systemd.
  • A CLI command was run with the wrong --data-dir or as a user who cannot read the key.

Fix: make the key available again, using one of these:

# Put the backup back into the data directory
sudo install -m 0600 -o nodepilot -g nodepilot /path/to/backup/master.key /var/lib/nodepilot/master.key

# Or point to it explicitly
echo 'NODEPILOT_MASTER_KEY_FILE=/etc/nodepilot/master.key' | sudo tee -a /etc/nodepilot/nodepilot.env

Then sudo systemctl restart nodepilot. If the key is lost for good, the encrypted secrets cannot be recovered.

Related messages:

Message Meaning
NODEPILOT_MASTER_KEY_FILE=<path> does not exist The variable is set, but the file is missing or not visible (for example because of ProtectHome=true in the unit, or a missing Docker mount)
cannot read master key <path>: ... Permission problem, usually the file is not readable by nodepilot
corrupt master key <path>: ... The file is not valid base64
master key <path> must be 32 bytes The file decodes to the wrong length

Master key does not match the database

Caused by:
    the master key (data-dir: /var/lib/nodepilot/master.key) does not match this database — wrong key file or credential

A key was found, but it is not the one this database was encrypted with. The text in brackets shows which source was used (systemd-credential, file or data-dir) and its path. Typical causes: a key from another installation, a stale NODEPILOT_MASTER_KEY_FILE, or a database restored without its matching key. Supply the right key. The panel never overwrites data with a different key.

Migration failed: "was previously applied but has been modified"

Caused by:
    migration failed: migration 1 was previously applied but has been modified

The migrations embedded in the binary differ from the ones that created the database. This almost always means the binary was built from a checkout with CRLF line endings (Git on Windows), or a migration file was edited. Rebuild from a fresh clone (the repository's .gitattributes forces LF), or use a release binary.

Migration failed: "was previously applied but is missing"

Caused by:
    migration failed: migration 6 was previously applied but is missing in the resolved migrations

The database was opened by a newer NodePilot, and you are now starting an older binary, for example after rolling back to nodepilot.old. Start the newer binary again, or restore the database backup taken before the upgrade. See Updates.

If you see migration N is partially applied, a migration was interrupted. Restore the database from a backup.

Data directory not accessible

Error: cannot open data directory /var/lib/nodepilot
Caused by:
    ... Permission denied / unable to open database file

The process cannot create or open files in the data directory. Run commands as the service user (sudo -u nodepilot ...). If a command run as root created root-owned files, fix the ownership:

sudo chown -R nodepilot:nodepilot /var/lib/nodepilot

The browser shows "The API is running, but the web UI was not built"

The binary was built without web/dist. Build the UI first, then rebuild the binary:

cd web && npm ci && npm run build && cd ..
cargo build --release -p nodepilot

Login problems

Login locked after failed attempts

too many failed attempts, try again in 287 s

The API returns HTTP 429 with a Retry-After header. After 5 failed logins within 15 minutes, for the same username or from the same IP address, logins are blocked for 5 minutes. Repeated lockouts last 10, 20, 40 and then 60 minutes. A successful login clears the counter.

  • Wait for the time shown, or restart the panel (sudo systemctl restart nodepilot). The counters are kept in memory only.
  • If you forgot the password, reset it: nodepilot user passwd <user> --password '...' (see CLI Reference).
  • If everyone gets locked out together, the panel probably sees all clients under one IP address: the proxy's. It trusts X-Forwarded-For only from loopback and from NODEPILOT_TRUSTED_PROXIES. Add the proxy's address or network there (for example NODEPILOT_TRUSTED_PROXIES=10.0.0.5 in /etc/nodepilot/nodepilot.env) and restart the panel.

Logged in, but immediately sent back to the login page

The session lives in the np_session cookie. If NODEPILOT_SECURE_COOKIES=true but you open the panel over plain http:// from another machine, the browser discards the cookie. Use HTTPS, or turn the option off until TLS is in place. See Installation.

2FA device lost

If the user still has a recovery code, they can enter it instead of the authenticator code. Each code works once.

If both the phone and the recovery codes are gone, reset 2FA on the panel host:

sudo -u nodepilot nodepilot --data-dir /var/lib/nodepilot user reset-2fa <user>

This disables 2FA and ends the user's sessions. They can log in with the password and set up 2FA again.

2FA codes rejected

Codes are accepted within ±30 seconds of the panel's clock. Check the time on the panel host (timedatectl; NTP should be active) and on the phone. Each code is accepted only once, so signing in twice in the same 30-second window needs a fresh code.

CLI commands fail after sealing the key in the TPM

After seal-master-key.sh, only systemd can decrypt the key. Run CLI commands with sudo; they detect the sealed key and re-run themselves through systemd-run with the credential attached:

sudo nodepilot --data-dir /var/lib/nodepilot user reset-2fa admin
  • the master key is sealed in the TPM … run this command with sudo: run it again with sudo.
  • cannot run systemd-run …: the host has no systemd; unseal the key (sudo ./packaging/seal-master-key.sh --unseal) or point NODEPILOT_MASTER_KEY_FILE at your offline backup of the key.
  • The credential is not at /etc/nodepilot/master.key.cred: set NODEPILOT_MASTER_KEY_CRED to its path.

Servers

A server shows as offline ("Unreachable")

The status comes from the stats poll, which runs every NODEPILOT_STATS_INTERVAL seconds over SSH. The server page shows the last error. Common errors:

Error Cause
connection timed out No SSH connection within 10 s: wrong host or port, firewall, server down
connection failed: ... Connection refused, DNS failure and similar
authentication failed Wrong user, password or key, or the key is not in authorized_keys. A panel SSH key only works from the panel's addresses (from=)
invalid private key: ... The key in the keychain cannot be parsed, or the passphrase is wrong
host key mismatch: ... See the next section
command timed out after 20s Connected, but the stats script did not finish in time (overloaded host, hung df on a dead network mount)

What to know:

  • After a failed poll, the server is retried with a growing delay: 2×, 4×, 8×, then 16× the stats interval, up to 5 minutes. After you fix the problem, the status can take up to 5 minutes to turn green.
  • Run the connection test from the server page or the server dialog to check right away (POST /api/servers/{id}/test). It opens a fresh connection and reports the error and latency.
  • Stats are collected with a shell script that reads /proc and runs hostname, uname, nproc and df. Hosts without /proc (non-Linux) can connect but report incomplete stats.

Test from the panel host to rule out the network:

ssh -p 22 user@server true

SSH host key changed

host key mismatch: expected SHA256:abc..., got SHA256:xyz... (possible MITM; reset the pinned key if the server was reinstalled)

The panel pins a server's SSH host key on the first successful connection (trust on first use) and refuses to connect if it changes later. This is expected after an OS reinstall, a host key regeneration, or when the address now points to a different machine. It can also mean an attacker is in the path.

  1. On the server, list the real fingerprints and compare them with the got value:

    for f in /etc/ssh/ssh_host_*_key.pub; do ssh-keygen -lf "$f"; done
  2. If it matches, open the server → Overview → Host key (SSH) → Forget host key. The new key is pinned on the next connection.

Through the API: DELETE /api/servers/{id}/host-key (servers:write). Changing a server's host or port also clears the pinned key.

Local backup storage: "Read-only file system"

With the systemd unit, the panel can only write under /var/lib/nodepilot (ProtectSystem=strict, ProtectHome=true). A local storage elsewhere fails with Read-only file system (os error 30). Either use a path under /var/lib/nodepilot (the default suggestion is /var/lib/nodepilot/backups), or allow the extra path:

sudo systemctl edit nodepilot
# add:
# [Service]
# ReadWritePaths=/srv/backups
sudo systemctl restart nodepilot

/srv/backups must exist and be writable by the nodepilot user. Paths under /home stay blocked by ProtectHome=true.

Reverse proxy

Symptom Fix
Web terminal does not connect, everything else works The proxy does not pass WebSockets. In nginx, add proxy_http_version 1.1 and the Upgrade/Connection headers (see Installation)
Terminal disconnects after about a minute of inactivity Raise proxy_read_timeout (nginx default is 60 s)
File upload fails with HTTP 413 Raise client_max_body_size in nginx. The panel accepts up to 512 MiB
Blank page or 404 for scripts when served under a sub-path The UI was not built with NODEPILOT_BASE_PATH, or the proxy does not strip the prefix. See Installation
A web app on another domain gets CORS errors Add its exact origin to NODEPILOT_CORS_ORIGINS and use a Bearer token. Cookies are not accepted cross-origin

Updates

Message Fix
update repository is not configured (NODEPILOT_UPDATE_REPO) Self-built binary. Set NODEPILOT_UPDATE_REPO=vlasovmood/nodepilot, or use a release build
repository <repo> not found or has no releases yet Wrong repository name, or no published releases
GitHub API rate limit reached, try again later Too many checks from this IP address. Wait and retry
cannot reach GitHub: ... The panel host has no outbound HTTPS access to api.github.com / github.com
running in a container: ... Expected in Docker. Rebuild the image instead (Updates)
the panel cannot write to <dir> ... The binary's directory is not writable by the panel. Reinstall with packaging/install.sh
the release has no file <asset> for this platform No build for this OS/architecture in that release
release has no SHA256SUMS: ... / SHA256SUMS does not list <asset> Incomplete release. Wait for the maintainers to fix it
checksum mismatch for <asset>: ... Corrupted or tampered download. Retry; if it persists, report it
release has no signature <asset>.sig: ... Signing is required by this binary but the release is unsigned
signature verification failed — the file was not signed by the official key Don't install. Report it
cannot move the current binary aside: ... File permissions in the binary's directory
an update is already in progress Wait for the current install to finish or fail

After a failed install the old binary stays in place, and the panel keeps running. See Updates for details and rollback.

macOS: "cannot be opened because the developer cannot be verified"

The macOS binaries are not notarized. Remove the quarantine attribute once:

chmod +x nodepilot-darwin-aarch64
xattr -d com.apple.quarantine nodepilot-darwin-aarch64

Or, after the first blocked attempt, allow it in System Settings → Privacy & Security → Open Anyway.

Windows SmartScreen blocks the .exe

The Windows binary is not code-signed, so SmartScreen may show "Windows protected your PC". Check the file against SHA256SUMS first:

Get-FileHash .\nodepilot-windows-x86_64.exe -Algorithm SHA256

Then click More info → Run anyway, or remove the downloaded-from-internet mark:

Unblock-File .\nodepilot-windows-x86_64.exe

Clone this wiki locally