Repository navigation
Updates
This page explains how NodePilot updates itself from GitHub Releases: how it finds and verifies a new version, how the binary is replaced and restarted on each platform, how to roll back, and how maintainers build and sign releases.
Updates are never installed automatically. The panel can check for new versions in the background, but installing always takes a click (or an API call) by an administrator.
In Settings → Updates the panel shows the current version, the latest release, its notes, and an Install button. When you install:
-
Find the release. The panel lists releases of the update repository through the GitHub API (
/repos/<owner>/<name>/releases?per_page=30) and picks the highest version, as described below. -
Download
SHA256SUMSfrom the release and find the line for this platform's asset. If the release has noSHA256SUMS, or the file doesn't list the asset, the update stops. -
Download the asset into a temporary file
.<asset>.downloadnext to the running binary, hashing it on the fly. The limit is 512 MiB and the timeout 30 minutes. -
Check the SHA-256 against
SHA256SUMS. On a mismatch the file is deleted and the update stops. -
Check the signature, if a public key is configured: download
<asset>.sigand verify it with Ed25519. A missing or invalid signature stops the update. -
Replace the binary. The running binary is renamed to
<name>.old(an older.oldis deleted first), and the new file is moved into its place. If the move fails, the old binary is put back. - Restart in place, as described below.
The UI shows the phase: downloading, verifying, installing, restarting, or failed with the error.
Installing an update interrupts open terminals and running commands. Backups that were running are marked as failed with interrupted: panel restarted when the panel starts again.
The panel looks for a release file named nodepilot-<os>-<arch>[.exe], built from the OS and CPU architecture it was compiled for (macos is written as darwin):
| Platform | Asset |
|---|---|
| Linux x86_64 | nodepilot-linux-x86_64 |
| Linux ARM64 | nodepilot-linux-aarch64 |
| Windows x86_64 | nodepilot-windows-x86_64.exe |
| macOS Apple Silicon | nodepilot-darwin-aarch64 |
| macOS Intel | nodepilot-darwin-x86_64 |
Settings → Updates shows which asset name this panel looks for. If a newer release has no file with that name, the update is offered but cannot be installed from the panel.
Besides the binaries, a release contains:
| File | Purpose |
|---|---|
SHA256SUMS |
sha256sum output for every nodepilot-* file. Required for self-update |
<asset>.sig |
Ed25519 signature of the asset, base64-encoded (a raw 64-byte signature is accepted too). Present only if the release was signed |
nodepilot-linux-packaging.tar.gz |
packaging/ directory: install.sh, the systemd unit and seal-master-key.sh. Not used by self-update |
- Drafts are ignored.
- The tag must be a semantic version, optionally prefixed with
v(v1.2.0,1.2.0,v1.3.0-rc.1). Other tags are ignored. - Pre-releases (GitHub's pre-release flag, or a version with a suffix such as
-rc.1) are ignored unless Offer pre-release versions is on. - An update is offered only if that version is newer than the running one.
The update repository comes from NODEPILOT_UPDATE_REPO: either baked into the binary at build time (release builds use the repository they were built from) or set at runtime, which takes precedence. Without it, checks are off and the page shows the repository as not set. See Configuration.
Verification is on when a public key is available: baked in at build time through NODEPILOT_UPDATE_PUBKEY, or set at runtime through the same variable (a non-empty runtime value overrides the built-in key). Settings → Updates shows File verification as either "SHA-256 and Ed25519 signature" or "SHA-256 only (release signing is not configured)".
When a key is configured, an unsigned release cannot be installed: release has no signature <asset>.sig.
Official releases from vlasovmood/nodepilot are signed, and their binaries carry this public key:
Xg5KxeaLQPGYkLVh8i2UEFdV2VEhxVmHYk5Z0LWR0+4=
To check a downloaded file by hand, verify <asset>.sig (base64 Ed25519 signature) against that key, for example with PyNaCl: VerifyKey(base64.b64decode(KEY)).verify(open(asset,'rb').read(), base64.b64decode(open(asset + '.sig').read())).
Linux and macOS. The panel execs the new binary in the same process, with the same command-line arguments. The PID stays the same, so systemd sees no restart and the service keeps running under the same unit. Listening sockets are closed on exec and the new version binds the port again.
Windows. A running process can't replace itself in place, so the panel starts the new .exe with the same arguments and the internal variable NODEPILOT_BIND_RETRY=1, then exits. The new process retries binding the port for up to 10 seconds while the old one releases it. If you started the panel from a console window, the new process keeps writing to that console.
The browser tab waits and reloads by itself once the panel answers again.
The Install button is disabled, with the reason shown, when:
| Reason shown | Cause | Fix |
|---|---|---|
running in a container: update by pulling the new image ... |
NODEPILOT_IN_DOCKER is set or /.dockerenv exists |
Update the image, see Docker |
the panel cannot write to <dir> — install it into a writable location (packaging/install.sh does this) |
The service user can't write to the directory that holds the binary | Use install.sh, which puts the binary in /var/lib/nodepilot/bin. On Windows, don't keep the .exe in a protected folder |
the release has no file <asset> for this platform |
The release lacks a build for this OS/architecture | Wait for a release that has it, or update by hand |
| Setting (Settings → Updates) | Default | Meaning |
|---|---|---|
| Check for updates automatically | on | The first check runs 60 seconds after start, then every 6 hours. A new version is logged as a new NodePilot version is available and shown in the UI |
| Offer pre-release versions (beta, rc) | off | Include pre-releases when looking for the latest version |
Check now forces a fresh check. Results are cached between checks. GitHub limits unauthenticated API calls, so frequent manual checks can hit GitHub API rate limit reached, try again later.
The same functions are available to an admin session or to an API token with the admin area:
| Method | Path | Permission | Purpose |
|---|---|---|---|
| GET | /api/system/update |
admin:read |
Current state; ?refresh=1 checks now |
| PATCH | /api/system/update/settings |
admin:write |
{"auto_check": bool, "include_prereleases": bool} |
| POST | /api/system/update/install |
admin:write |
Start the install. Returns the progress status |
| GET | /api/system/update/status |
admin:read |
Install progress: phase, downloaded, total, error
|
curl -s -H "Authorization: Bearer $NP_TOKEN" "https://panel.example.com/api/system/update?refresh=1"
curl -s -X POST -H "Authorization: Bearer $NP_TOKEN" https://panel.example.com/api/system/update/installSee API for tokens and permissions.
A panel in a container does not update itself. The Docker image sets NODEPILOT_IN_DOCKER=1, and /.dockerenv is detected as well. No image is published to a registry, so update by rebuilding from a newer checkout and recreating the container with the same volume:
cd nodepilot && git pull
docker build -t nodepilot .
docker rm -f nodepilot
docker run -d --name nodepilot -p 127.0.0.1:7780:7780 -v nodepilot-data:/var/lib/nodepilot nodepilotDatabase migrations run automatically when the new container starts.
Without the panel, for example when the update button is blocked:
-
systemd install: download the new binary and run
sudo ./packaging/install.sh ./nodepilot-linux-x86_64again. It replaces/var/lib/nodepilot/bin/nodepilotand restarts the service. Data and the env file are kept. - Anywhere else: stop the panel, replace the binary, start it again.
Migrations are applied on the next start.
After a self-update the previous binary is kept next to the current one. Its name is the binary's name with the extension replaced by .old. For example, /var/lib/nodepilot/bin/nodepilot.old with install.sh, or nodepilot-windows-x86_64.old next to nodepilot-windows-x86_64.exe. Only one previous version is kept.
On a systemd install:
sudo systemctl stop nodepilot
cd /var/lib/nodepilot/bin
sudo mv nodepilot nodepilot.broken
sudo mv nodepilot.old nodepilot
sudo systemctl start nodepilotOn Windows, rename nodepilot-windows-x86_64.old back to nodepilot-windows-x86_64.exe while the panel is stopped.
Database migrations are one-way. If the newer version added a migration, the older binary refuses to open the database:
migration failed: migration 6 was previously applied but is missing in the resolved migrations
In that case you also need the database as it was before the update. The panel does not make one for you, so back up nodepilot.db before installing an update (see Configuration). The master key doesn't change during updates.
| Variable | Use |
|---|---|
NODEPILOT_UPDATE_REPO=owner/name |
Take releases from another GitHub repository |
NODEPILOT_UPDATE_PUBKEY=<base64> |
Require signatures made with that repository's key |
NODEPILOT_UPDATE_API_URL |
Another API endpoint compatible with GitHub's releases API (default https://api.github.com) |
NODEPILOT_UPDATE_DOWNLOAD_URL |
Another download host serving <url>/<owner>/<name>/releases/download/<tag>/<file> (default https://github.com) |
The release must use the same asset names and include SHA256SUMS.
Releases are built by .github/workflows/release.yml when a tag matching v* is pushed.
-
Set the new
versionin the rootCargo.toml([workspace.package]; all crates inherit it). The internal path dependencies incrates/*/Cargo.tomlalso carryversion = "0.1.0"requirements. For a minor or major bump (for example to0.2.0), update them too, or Cargo can't resolve the workspace. -
Run
cargo checksoCargo.lockpicks up the new version, and commit both. The workflow builds with--lockedand fails on a stale lock file. -
Tag and push:
git tag v0.2.0 git push origin v0.2.0
A tag with a suffix (v0.2.0-rc.1) becomes a GitHub pre-release.
Build job, one runner per target:
| Asset | Runner | Target | Notes |
|---|---|---|---|
nodepilot-linux-x86_64 |
ubuntu-24.04 |
x86_64-unknown-linux-musl |
cargo zigbuild |
nodepilot-linux-aarch64 |
ubuntu-24.04 |
aarch64-unknown-linux-musl |
cargo zigbuild, cross-compiled |
nodepilot-windows-x86_64.exe |
windows-2022 |
x86_64-pc-windows-msvc |
static CRT (-C target-feature=+crt-static) |
nodepilot-darwin-aarch64 |
macos-14 |
aarch64-apple-darwin |
|
nodepilot-darwin-x86_64 |
macos-14 |
x86_64-apple-darwin |
cross-compiled |
Each build:
- checks that the tag matches the crate version, ignoring any
-suffixon both sides (v0.2.0-rc.1matches0.2.0); - builds the web UI with Node 22 (
npm ci && npm run build); - runs
cargo build --release --locked -p nodepilotwithNODEPILOT_UPDATE_REPO=${{ github.repository }}andNODEPILOT_UPDATE_PUBKEY=${{ vars.NODEPILOT_UPDATE_PUBKEY }}, so both are baked into the binary; - runs
--versionas a smoke test, except on cross-compiled targets.
Release job:
- packs
packaging/intonodepilot-linux-packaging.tar.gz; - writes
SHA256SUMSfor allnodepilot-*files; - signs every
nodepilot-*file, if theNODEPILOT_SIGNING_KEYsecret is set, writing base64<file>.sigfiles with PyNaCl; - publishes the GitHub Release with a downloads table and install instructions, plus GitHub's generated notes. It is marked as a pre-release if the tag contains
-.
Signing uses one secret and one variable in the repository settings (Settings → Secrets and variables → Actions):
| Name | Kind | Content |
|---|---|---|
NODEPILOT_SIGNING_KEY |
Secret | Ed25519 private key: the 32-byte seed, base64 |
NODEPILOT_UPDATE_PUBKEY |
Variable | Matching public key: 32 bytes, base64. Embedded in every binary |
Generate a pair, for example with PyNaCl (the library the workflow uses):
python3 -m pip install pynacl
python3 - <<'EOF'
import base64
from nacl.signing import SigningKey
k = SigningKey.generate()
print("NODEPILOT_SIGNING_KEY =", base64.b64encode(bytes(k)).decode())
print("NODEPILOT_UPDATE_PUBKEY =", base64.b64encode(bytes(k.verify_key)).decode())
EOFKeep the two in step:
- Variable set, secret missing: the binaries require signatures, but releases have no
.sigfiles, so self-update from those binaries fails. - Secret set, variable missing:
.sigfiles are published, but the binaries don't check them. - Rotating the key: binaries in the field only trust the key they were built with. Sign the first release after a rotation with the old key, or tell users to update by hand.
The panel compares its own crate version with release tags. If you tag v0.2.0-rc.1 while Cargo.toml says 0.2.0, the rc binary reports 0.2.0, and the final v0.2.0 will not look newer to it. To make release candidates upgrade cleanly, set the crate version to the full pre-release version (0.2.0-rc.1), which the tag check also accepts.
NodePilot · Releases · Report a vulnerability · Apache-2.0
Set up
Use
Secure
Integrate
Reference