Security¶
This page walks through what to check before you run the installer, which accounts do what, and what the installer trusts after that.
Check the installer¶
Before the first run, compare the installer with the SHA-256 published on the documentation site.
Warning
Compare against the documentation site, not the file server. That value is not published on the file server that hosts the installer, so a hash from the same place as the file proves nothing.
./install --check
That prints Installer SHA-256 for the file you have. When the release SHA256SUMS lists install, ./install refuses to continue if that hash does not match, or if the manifest has no install line. scripts/release-installer-hash.sh prints the hash of run/install when a release is built.
Downloads use https:// only. PYP_WWW or PYP_NOTES_URL set to http:// is refused with Refusing to download over a connection that is not HTTPS.
Tip
If your machine has no internet, point the installer at a local folder of release files with PYP_DIST.
Which user runs what¶
Four accounts show up in an administrator install. On a regular-account install they are all the same person, so you can skip the table.
Account |
What it does |
|---|---|
Administrator |
The login that ran |
Service account |
The systemd unit runs the website as this account ( |
Website user |
Uses the website and owns their own projects. Without a link to an operating-system user, their jobs run as the service account. On a cluster, |
Root |
Creates the service account and the folders it must own, copies |
Manifest signature¶
Every file of a release is fetched and checked by the nextpyp program (lib/nextpyp-core in a release), for a first install, an upgrade and the compute container alike. It checks the release signature itself, with the public key built into it, so gpg is not needed on the host, and it fails closed: a release that publishes no SHA256SUMS.asc is refused unless PYP_ALLOW_UNSIGNED=true is set in the environment, and a signature that does not verify, or was made by another key, is refused and cannot be overridden. SHA256SUMS is the complete list of a release: every file it names is downloaded, checked against its SHA-256 before it gets its name, and a file that does not match is discarded rather than kept. Only when all of them match is the release given its directory under releases/. nextpyp verify-dist <directory> runs the same checks on a local copy of a release.
./install itself is a short shell script. It carries the SHA-256 of the nextpyp program of its release, stamped in when the release was published, and refuses to run a program with another hash. The program then checks itself against the signed manifest before it changes anything, so a downloaded ./install is tied to its release twice: by the stamped hash, and by the release key. You don’t have to import anything.
The release key is
nextPYP Release Signing
rsa4096, created 2026-11-04, expires 2028-11-03
B718 ABAD 58A8 687B F070 E4EF 6E7F B3FB 9344 BA32
and is published at https://nextpyp.app/files/pyp/nextpyp-archive-keyring.gpg (binary keyring, for apt and the installer) and https://nextpyp.app/files/pyp/RPM-GPG-KEY-nextpyp (armored, for dnf).
Tip
On a host without network access nothing extra is needed: the key is inside the nextpyp program. Copy SHA256SUMS.asc along with SHA256SUMS into the PYP_DIST directory.
A missing signature always stops the install or upgrade. PYP_ALLOW_UNSIGNED=true, in the environment of that one command, is the only way past it, and it never accepts a signature that is present and wrong.
Reverse-proxy login¶
With web.auth set to reverse-proxy, the user header is honored only from addresses in web.trustedProxies. The default is 127.0.0.1 and ::1. A config from before this entry existed has no trustedProxies line, so a reverse-proxy login says Not authenticated, access denied until the entry names the proxy.
Note
If you see Not authenticated, access denied after setting up a reverse proxy, check web.trustedProxies first. Setting the list, the doctor warning, and the nginx and Apache examples are on Enable remote access.
Warning
Anyone who can supply the user header from a trusted address can choose which account they use. Only list proxies you control, and make sure the proxy drops any header the browser sent.
Support bundle¶
nextpyp support-bundle writes support-<timestamp>.tar.gz in the install directory and does not upload it. The archive is assembled in a private directory in that same folder, mode 0700, and that directory is removed after the archive is written. The archive contains installed.toml, the doctor report, a redacted config.toml and install.env, host and disk information, the status of the nextPYP units, and the last 2000 lines of each log. Passwords, mail settings, and proxy credentials are replaced with (redacted). Database backups and previous config files are named in backups.txt and are not included.
Tip
Open the archive and review it before you send it to anyone.
Details¶
What the installer sanitizes from the network
A release note and its before-upgrade line are printed with terminal escapes and other control characters removed, and each line is limited to 500 characters. A comment in SHA256SUMS is not printed and is not used as a file name. version-info.js is accepted only as a list of version numbers, such as var versions = ["0.7.6", "latest"];. It is never executed. A file that is not that list is ignored.
How the signature check is isolated
The check runs inside the nextpyp program: no gpg is started, no keyring is read from the host, and ~/.gnupg is never used. Downloads land in releases/.incoming/ and are never run from there.
How nextpyp upgrade runs itself
nextpyp upgrade copies itself into the install directory before it replaces any files. That copy is mode 0600 and is removed when the command finishes. It is not written under /tmp. A root upgrade gives the copy to the administrator and continues it with bash, because that mode is not executable. The switch uses setpriv, so it does not ask for a password on a second sudo. Calls back into nextpyp during the same upgrade (check, start, stop, activejobs, background fetch) also use bash when that private copy is not executable, so a post-activate check does not fail with Permission denied.
What runs as root, and how those steps are staged
Root is used for the service account itself, for folders that account must own, for the copies of nextpyp and nextpyp-host-processor in /usr/bin (or /usr/local/bin when /usr/bin is read-only), and for the systemd unit. Each of those steps is printed with a [root] prefix before it runs. A copy into /usr/bin or a unit directory is hashed again immediately before it is installed. The bytes are staged beside the root step, mode 0600, and that copy is removed after the step. It is not placed in /tmp.
./install --print-root-steps prints those steps as a script you can review. ./install --dry-run prints the plan and changes nothing. Direct root logins are asked which everyday account should own the program files. PYP_ADMIN is the non-interactive form. PYP_ALLOW_ROOT_OWNER=true keeps the program files owned by root. A command that root starts on an install somebody else owns (sudo nextpyp upgrade) does the work in the install directory as that owner, and keeps root only for the few steps that need it: stopping and starting the unit, and the files outside the install directory. nextpyp doctor reports program files that do not belong to the recorded owner. The release key is built into the nextpyp program and cannot be replaced by a setting.
Rotating the release key
The key the program trusts is src/cli/keys/nextpyp-release.asc, with its fingerprint in src/cli/src/verify.rs (RELEASE_FINGERPRINT). Add the new key there, build and publish a release signed with the old key that carries the new one, and only then sign with the new key. Remove the old key only after every supported release trusts the new one.