Skip to content

Version 5.9.0

Choose a tag to compare

@andreapollastri andreapollastri released this 16 Nov 19:17
· 1 commit to master since this release
4dbce1e

[5.9.0] — 2026-11-16

Two security reports, both verified and both closed in this release. They came in through the private channel in SECURITY.md and had not been shared elsewhere; thanks to the two researchers.

The first: every app user was a member of the www-data group, and every PHP-FPM socket on a Cipi server — each app's, the stock www pool's, the panel API's and the GUI's — is group www-data with mode 0660. So an app user, or code running inside an app (an RCE, a malicious Composer or npm dependency, an SFTP password shared with a freelancer), could open any other app's socket, send it a FastCGI request for a script under /tmp (in every pool's open_basedir) and run PHP as that app: read its .env, its database credentials, its keys. The stock www pool runs as www-data without open_basedir, and /etc/sudoers.d/cipi-api — written by setup.sh on every server, API installed or not — lets www-data run cipi ssh add, which appends a key to the cipi admin user; from there sudo cipi credentials prints the root password. One compromised tenant, the whole server. The membership was never needed: nginx and the panel reach an app the other way round, www-data is in each app's group.

The second: every app user may run cipi-app-notify <app> * as root through sudo (that is how a failed webhook deploy sends its alert), and the helper compared its exit-code argument with -eq. bash evaluates the operand of -eq as an arithmetic expression, and an arithmetic expression evaluates array subscripts, command substitutions included: sudo cipi-app-notify myapp deploy 'BASH_VERSINFO[$(id > /tmp/pwned)]' ran id as root. One command from any app shell to root.

Reviewing the second one turned up the same mistake in one more place. Every cipi command reads its options through parse_args, which stores --name=value with printf -v "ARG_name": bash evaluates an array subscript in the name it is given there too, so an option written --x[$(id > /tmp/pwned)] ran id — as root, like everything cipi does. An app user cannot run cipi, with one exception: an app with cipi yml auto <app> on has the sudo rule cipi yml node-sync <app> * (the Node recipe calls it during a deploy), and that rule lets it pass arguments. Opt-in and per app, but for those apps the same road to root.

Going back over the first report's open points turned up a third problem, not reported by anyone: root wrote in a directory the app user owns. ~/logs belongs to the app, and three things wrote there as root — nginx (the master opens every access_log and error_log when it loads its configuration), supervisord (it opens a program's stdout_logfile each time it starts it) and Cipi itself, which on every cipi deploy ran mkdir, chown <app>:www-data and chmod 2775 on ~/logs and appended to and then chowned ~/logs/deploy.log. None of them refuses a symlink. Reproduced with Cipi's own code: with ~/logs/deploy.log a symlink to a root-only file, the next cipi deploy <app> run by an admin or by the panel left that file owned by the app user, mode 664 — /etc/shadow, say; with ~/logs itself a symlink, the directory it pointed at became the app's. The same directory was read as root too: cipi app logs and cipi-read-app-logs (the panel's log viewer) printed whatever a symlink called x.log pointed at, and the latter also accepted .. in its pattern.

Then the same question was asked of everything else root does under /home/<app> — some eighty places where cipi wrote, read, chowned or chmodded a name the app user can replace with a link, in cipi deploy, cipi app env, cipi app edit, cipi auth, cipi git, cipi sync, cipi yml, cipi scan and the helpers an app user may call through sudo. The answer was the same nearly everywhere, and it is now one rule: root does not open, create, delete, chown or chmod a path inside the home of an app that exists, and does not run a program on a tree it finds there; it asks the app user to (sudo -u), so a link to a root-only file is a "permission denied" for that user and not a file handed over. Reproduced with the previous code and an unprivileged user, each with one symlink: ~/.deployer/deploy.php (every cipi deploy appends the audit hook and ran chown), ~/.deployer/node-build.sh and node.json, shared/.env (cipi app env --set, which the panel can run), shared/auth.json, shared/cipi-databases.env, ~/.ssh and what is in it (cipi git key rotation, cipi deploy --trust-host), a cipi.yml saved into a linked directory, and .env, auth.json and shared/storage on cipi sync — the target ended up owned by the app or overwritten; cipi app env --show, cipi auth show, the deploy key shown by cipi app show and the cipi.yml parser printed or read what the link pointed at. Most of these run when an admin or the panel runs a command on that app; an app with cipi yml auto on can also reach some of them alone, through the sudo rules that setting gives it (cipi yml apply <app> --yes --auto, cipi yml node-sync) — that path was read in the code, not run end to end.

One of the findings is not a symlink. cipi app clone, the Reverb and Meilisearch settings and cipi sync copied values out of an app's .env into a sed -i "s|^KEY=.*|KEY=<value>|" run by root. A | in the value ends the replacement, and GNU sed's e flag runs what follows: a line like MAIL_PASSWORD=;<command>;|e;s|a|b in an app's .env ran <command> as root the next time an admin cloned that app or synced it. Reproduced; the value is now escaped, and the edit is made by the app user.

The second part of the release is what a look at the rest of the stack, and at the security releases of the last months, said was missing. Three places were left where root worked on names it does not control: the panel's two trees, where cipi api update, cipi gui update and the nightly cipi self-update ran Composer as root in a directory www-data owns — the user every request to the panel runs as — and so ran, as root, whatever plugin or script that user had put there; the .env of those trees, edited by root with sed, >> and chown; and logrotate, which copied, truncated and compressed each app's Laravel and PHP-FPM logs as root inside the app's home. All three now work the way the app homes do: root asks the owner. Then the things nothing looked after: nginx, MariaDB, PostgreSQL and Valkey are kept out of unattended-upgrades on purpose and waited for someone to run cipi … upgrade, Composer and the Node.js runtimes were never updated on a server once installed, and a kernel update did nothing until a reboot nobody was told about. Cipi now patches the first six every night and says, every morning, what is waiting for a person. And Valkey: one instance and one password for every app meant every app could read the others' cache, sessions and queues; an app now has an instance of its own.

The third part is what people who run Cipi every day asked for, on the command line first — the panel API (1.39.0) and the GUI (4.2.0) are built on these commands.

One of the requests was a bug report: "deploys started by the webhook do not save how long they took". They do — both deploy paths write the same end banner, with the duration, to the deploy log. What loses it is the night: deploy.log is rotated daily (copytruncate), so the banners of yesterday's runs are in deploy.log.1 and older ones in deploy.log.N.gz, and the panel read deploy.log alone. A deploy somebody starts is watched while it runs; one a push starts is looked at the day after, when its banner is no longer in the file. The history is now a command that reads the rotated files too.

What was prepared as 5.8.6 was never published on its own: all of it is here, with one migration (5.9.0) and this one entry.

Security

  • App users are no longer in www-data. cipi app create and cipi sync create them in cipi-apps only; www-data still joins each app's group, which is all nginx and the panel need. Migration 5.9.0 removes every app user (members of cipi-apps, keys of apps.json; nothing else) from www-data on installed servers, restarts PHP-FPM — a worker keeps the groups it was forked with — and then what each of those apps has running under supervisor, what every deploy restarts anyway: only what is running, so a program stopped with cipi worker stop stays stopped. A Node SSR app is restarted the way a deploy does it, blue/green with no downtime; if the new process does not come up the old one keeps serving and the migration says so (cipi node restart <app>). An app whose name cipi app create would not give out today (a reserved word) is reported and left as it is. Open SSH/SFTP sessions of app users keep the old membership until they log out.

  • The stock www pool socket is 0600 (setup.sh, cipi php install; the migration adds the line to the placeholder Cipi wrote and leaves a hand-edited www.conf alone, with a note). No vhost points at that pool and www-data owns the socket, so nothing changes for nginx.

  • /etc/sudoers.d/cipi-api exists only while a panel is installed. setup.sh no longer writes it on every server; cipi api <domain> and cipi gui <domain> write it when they install, cipi api remove / cipi gui remove drop it with the last panel. The migration removes it from servers with neither. Servers with the API or the GUI keep it as it is: nothing in the panels changes.

  • cipi-app-notify validates every argument before it uses one. The exit code must be 1–3 digits and is compared as a string, never with -eq or (( )); the label a short word; the app name app-shaped and, when called through sudo, the caller's own; the log file a regular file that resolves under /home/<app>/ or /var/log/cipi-apps/<app>/ (symlinks followed — a link to /etc/shadow is "no log", not a read as root) and is read as the app user; the free text bounded to 4 KB and stripped of control characters. The environment of a sudo caller is ignored. Legitimate calls (cipi-app-deploy, with deploy, deploy-ok, a numeric status, the app's own logs/deploy.log) are unchanged. No migration: self-update installs the new helper before anything else.

  • An option name is a name. parse_args accepts letters, digits, - and _ in the name of an option and ignores anything else, so nothing a caller writes before the = reaches printf -v as an expression. Values were never evaluated and still are not. Every real option (--force, --per-page=20, --301, --set=KEY=a=b, quoted values from the panel API) parses as before. No migration: self-update installs common.sh before anything else.

  • Root builds and backs up in private directories. cipi self-update cloned into /tmp/cipi-update-$$ after removing it: a local user who recreated the empty directory in between owned the tree root copies over /opt/cipi. cipi api <domain> and cipi api upgrade built in /tmp/cipi-api-build and backed the panel .env and token database up to /tmp/cipi-api-backup-<epoch>, the GUI's upgrade to /var/tmp/cipi-gui-backup-<epoch>. All of them are mktemp -d now, mode 0700; cipi api remove and cipi gui remove clean the new names as well as the old. So is the directory cipi gui copies its bundled package into (/tmp/cipi-gui-pkg-$$, the line the first report pointed at), and the one cipi sync export stages in: that was /tmp/cipi-sync-<time>, world-readable for as long as the export ran, with every exported app's .env, the decrypted apps.json, databases.json, smtp.json and the database dumps in it.

  • What root writes for an app is no longer in the app's home. nginx access and error logs, the logs of supervisor programs (queue workers, Horizon, Octane, Reverb, the two Node slots) and deploy.log are in /var/log/cipi-apps/<app>/: a directory of root's (root:<app>, 0750) that the app user reads and cannot write, so nothing in it can be swapped for a symlink. deploy.log, which both cipi deploy (root) and a webhook deploy (the app user) append to, is a file the app user owns inside that directory. ~/logs stays the app's, with a symlink per moved log — made by the app user, not by root — so ~/logs/nginx-access.log, tail -f ~/logs/worker-default.log, the paths in the docs and in your own scripts keep working; the app's own logs (php-fpm-error.log, cron.log) do not move. The app's PHP pool gets /var/log/cipi-apps/<app>/ in open_basedir, so code that reads ~/logs from PHP (cipi/agent) still can. logrotate, CrowdSec's acquisition, the 5xx monitor and the compliance report follow the logs.

  • Migration 5.9.0 moves every app, and puts back what a service refuses. Vhosts: nginx -t first (a configuration that already fails is not touched), the edit, nginx -t again, one reload — refused, every vhost goes back byte for byte and nginx is not reloaded. Supervisor: the program files are edited and re-read; a running program is restarted once on its new configuration, a stopped one is not started (its new configuration is applied, and it starts, with the next deploy on the server). Node SSR apps are switched blue/green. PHP-FPM is tested before its restart, and a pool whose open_basedir someone rewrote is left alone. The log files from before the move stay in ~/logs as <name>.old, with their old rotations: delete them when you no longer need them; deploy.log starts from the last lines of the old one, so the deploy history in the panel is still there. A copy of every file edited is in /var/lib/cipi/app-logs-backup/<time>/. Whatever could not be moved is listed at the end and keeps working where it was; cipi app fix-permissions [app] runs the move again.

  • Root does not follow a link in an app's home when it restores permissions. cipi app fix-permissions and every cipi deploy ran plain chown and chmod on names under the home (~/.ssh/*.pub, shared/.env, shared/storage/*, ~/logs): a symlink of that name aimed them at any file. Ownership is now chown -h -R on the home, which walks the tree by descriptor and changes a link, never what it points at, and every chmod and setfacl inside the home is done as the app user. Log files root left in ~/logs and shared/storage/logs are handed back from inside that directory (cd, then chown -h -R --from=root .) and only when its physical path is the one its name says: with shared or shared/storage a link, the name alone led somewhere else.

  • Root does not write, read or change a file inside an existing app's home; the app user does. New helpers in lib/common.sh (app_as, app_read, app_write, app_append, app_sed, app_rm, app_mkdir, app_call) run the operation with sudo -u <app>, and everything that touched a home goes through them: deploy.php (generated, the audit hook, cipi app edit --branch/--repository/--php, cipi auth), ~/.deployer/node-build.sh and node.json, ~/.cipi/webhook.json, shared/.env (cipi app env including the editor, --show and --json; domain, SSL, environment, branch, PHP version, database and Valkey password, webhook token, Octane, Reverb, Meilisearch), shared/auth.json, shared/cipi-databases.env, ~/.ssh (deploy key and its rotation, authorized_keys, known_hosts, config, the CodeCommit key), ~/.bashrc, the deploy lock, a generated cipi.yml. A file that exists keeps its inode and its mode, as before; a new one gets the mode it always got. What root still does itself is on names an app cannot swap — /home/<app> — or follows nothing: chown -h -R, rm -rf, a test. A file or directory root left as root:root inside a home in the past is handed back whole (chown -h -R on the top-level entry) the first time it is in the way. Not changed: cipi app create and cipi sync import of a new app, where nobody can be that user before the command has finished.

  • A value from an app's .env is data, never part of a command. The functions that set a key (cipi app clone, Reverb, Octane, Meilisearch, cipi sync) escape \, & and | before sed sees the value, run as the app user, and cipi sync rebuilds the .env with awk reading the kept DB_* values from the environment. Before, such a value ran as a command of root's (above).

  • cipi sync reads and writes an existing app as that app's user. export copied .env, auth.json, deploy.php and the SSH files with cp, which follows a link: any root-only file could be carried into the archive. The files are now read by the app user (same content, same modes in the archive), shared/storage is archived and unpacked by the app user, and an update writes .env, auth.json and deploy.php through the helpers. The passphrase reaches openssl through its environment (-pass env:), no longer on a command line every local user can read in ps; archives made either way open with either.

  • git reads a release as the app user. Root's git refuses a repository owned by someone else, because its configuration is the owner's; cipi-deploy-audit, which any app user may run through sudo, turned that check off (git -c safe.directory='*') to read a custom app's commit. No way to abuse the one command it ran was found, and it is gone all the same: the helper reads the commit, REVISION and Deployer's releases_log as the app user, and so do cipi deploy --releases and the deploy notifications.

  • cipi scan hashes a tree inside the app's home, or none. current and htdocs are the app's names. Pointed outside the home — at /etc in the test — the nightly scan had root read and hash that tree, and so did sudo cipi-scan-manifest <app>, which the app user may run whenever it likes: / would be the whole disk. Both check the physical path first; a release that is not inside the home is not hashed and is reported as a pass that could not complete, with the reason.

  • Smaller ones. The path of the pre-deploy database snapshot is kept in memory, not in /tmp/cipi-predeploy-<app>.path (a name any local user could create first). When Cipi asks an app's own FrankenPHP binary for its PHP version, the binary runs in a session of its own (setsid, no terminal): before, it shared the terminal of the admin who ran the command and, where the kernel still allows TIOCSTI, could type into it. _cipi_remount_rw writes its error to a mktemp file.

  • App logs are read as the app user. cipi app logs, cipi app logs read, cipi-read-app-logs (the panel API's log viewer) and the log excerpt in a failed-deploy email drop to the app user before they open anything under its home; cipi-read-app-logs also refuses .., a second path and anything that is not a number as page or page size. Same output, same paths for the panel.

  • A new server starts with SSH/SFTP for app users closed from outside. setup.sh writes the cipi-nossh rule cipi ssh apps already used and sets the default to disabled: a new app gets its SSH password as before, cipi app create says access from outside is off, and cipi ssh apps enable <app> (or enable --all) opens it. Deploys use ssh localhost and are not affected. Servers already installed are not changed: their default stays what it was.

  • In the panel's trees, Composer, artisan and .env edits run as www-data. /opt/cipi/api and /opt/cipi/gui belong to www-data. cipi api update, cipi gui update, cipi api status and the nightly cipi self-update ran composer config, composer require, composer reinstall and composer show there as root: Composer loads the plugins in vendor/ and runs the scripts in composer.json, both files of www-data's — whoever could run code as the panel's user (a bug in the panel, in one of its dependencies) became root at the next update, which is every night. They now run as www-data (panel_composer in lib/common.sh), with a Composer home of its own in /var/lib/cipi-panel/composer. A tree is recognised by where it is, not by who owns it at that moment: self-update chowns all of /opt/cipi to root before it updates the panel, and what is in the tree is still what www-data wrote. The .env of both trees — APP_URL, LOG_STACK, SESSION_DRIVER, the SSO keys of cipi gui sso — is edited and read as www-data too: root's sed -i, >> and chown www-data on that name went wherever a symlink led, and the chown handed the file over. The same for token-abilities.txt, the SQLite pragmas (root ran sqlite3 on the path the .env names), the copies cipi api upgrade / cipi gui upgrade take of .env and the database before a rebuild (a link there ended up, as a regular file owned by www-data, in the new tree), and the permission repair, which chowned and chmodded storage, .env and database.sqlite by name. cipi gui reset-user writes the new password in a file of root's making under /run, not in storage/app. A build directory, which is root's until it is moved into place, is worked on by root as before.

  • logrotate rotates an app's own logs as the app user. /etc/logrotate.d/cipi-app-logs named /home/*/shared/storage/logs/*.log and /home/*/logs/php-fpm-*.log: root copied, truncated and compressed files by path in directories the app user owns. Each app now has a rule of its own, /etc/logrotate.d/cipi-home-<app>, with su <app> <group>, and the two /home/* lines are gone from the shared rule. No script in the rule — logrotate runs those as root even with su. Logs whose group is www-data from before the first half of this release are put in the app's own group by the app user: logrotate gives each copy the owner and group of the log, and cannot give a group its user is not in. Written at cipi app create, at every deploy and import, removed with the app; the migration does it for every app, shared rule first. A shared rule someone has rearranged is left as it is, and said.

  • One Valkey per app. Every app got the same REDIS_PASSWORD, the server's: any app could read and write the cache, the sessions and the queued jobs of every other app, and one FLUSHDB emptied them all. A new Laravel app now gets an instance of its own — cipi-valkey@<app>.service, running as the app's user, on its own localhost port (from 6400), with its own password, /etc/cipi-valkey/<app>.conf (root: 0640) and /var/lib/cipi-valkey/<app> (0700). Instances rather than ACL users on the shared one: an ACL confines an app to a key prefix, and Laravel's prefix is a setting of the app — two apps with the same APP_NAME share it. Apps that exist are not touched: cipi valkey isolate <app> (or --all) moves one when you say so — the app goes into maintenance mode, its workers stop, its keys are copied with their expiry (by the prefix the app itself reports, MIGRATE … COPY), the .env is switched, the config cache rebuilt, workers restarted, maintenance mode off. A copy that is refused leaves the app exactly where it was. An app whose prefix cannot be read is not moved unless you ask for --no-copy; one whose .env points Redis at another host is left alone. cipi valkey share <app> goes back; cipi valkey flush-shared empties the shared instance and changes its password once nobody uses it. cipi app clone no longer copies REDIS_HOST, REDIS_PORT, REDIS_PASSWORD from the source; cipi sync keeps this server's Valkey settings for an app that exists and gives an imported one an instance here (its .env arrived with the other server's password, good for nothing). No password is ever on a command line: the client gets it in its environment, the copy on its standard input.

  • The server's SSH keys log in as any app user — and a disabled app accepts nothing else. sshd asks /usr/local/bin/cipi-ssh-keys (run as cipi) for the keys of the cipi user at every login as an app user: no copies to keep in step, and a key removed with cipi ssh remove stops working for the apps at once. Those keys already reach root, so this hands out nothing new; what it removes is the reason to enable an app's password just to look at it. An app with SSH access disabled (cipi ssh apps disable, the default on a new server) was closed from outside altogether; it now takes the server's keys and nothing else — AuthenticationMethods publickey, AuthorizedKeysFile none — while an enabled one takes its password and its own keys as before, next to them. Cipi's two older blocks in sshd_config become one managed section, validated by sshd -t before it replaces the live file; a block someone added lines to is kept. On every server, for every app, by the migration. cipi ssh apps sync rewrites the section.

  • cipi db restore <name> <file> opens the file as the owner of the tree it is in: the app user for a dump in an app's home, www-data for one in the panel's storage (where the API keeps the dumps uploaded through it). Root opening a name another user controls lends its rights to whatever the name points at — the rule 5.9.0 applied everywhere else under /home/<app>. A dump in a directory of root's is read as before.

Added

  • cipi autoupdate — nginx, MariaDB, PostgreSQL, Valkey, the Node.js runtimes (/opt/cipi/node and the system package) and Composer are patched every night at 04:20, with the code of the manual commands: patch releases only, Cipi's configuration kept, nginx -t before the reload, a Node runtime checked against its published SHA-256 and SSR apps restarted blue/green only when their runtime changed, Composer rolled back if the new phar does not start. One component after the other, the databases last; a database waits for the next night while a dump or a deploy is running. The four packages stay out of unattended-upgrades, which would restart them at any hour. cipi autoupdate off <name> for a component you want to patch by hand, cipi autoupdate run [name] for now. On for everything unless switched off — on existing servers too, from the migration: a database patch restarts the database, at 04:20, on the night it arrives. Composer below 2.10.3 (the security release of 2026-08-27) is updated by the migration itself; setup.sh installs nothing older.
  • cipi pending — what is waiting for a person: a reboot installed updates need (Ubuntu's flag, and the newest kernel in /boot against the running one), PHP below its security release or end of life, a newer package where the automatic update is off or its last run failed, Composer and Node.js below their security releases, apps that share one Valkey, Ubuntu's security updates switched off, a Cipi logrotate rule that logrotate refuses — and PHP extensions installed with PECL. Cipi installs extensions from apt only and has never used PECL; an extension built with pecl install is a file no package owns, nothing updates it, and PECL is deprecated by the PHP project in favour of PIE. Checked every morning at 07:30 and mailed when the list changes, then again after a week while it lasts (trigger pending_report); cipi status shows the list when there is one; --json for a script.
  • cipi reboot — whether a reboot is required and since when; cipi reboot now; and cipi reboot auto on [--at=HH:MM], off by default: a nightly job that restarts the server only on the nights a reboot is required, after a notification and a two-minute warning, and not while a package installation, a dump, a deploy or another cipi command is running.
  • cipi api token create --full-access — a token with the wildcard ability instead of a list: every endpoint and the MCP server, and the abilities later versions of the API add (a token holding today's whole list does not get those). f in the checklist. Also --name=, --abilities=a,b and --expires=YYYY-MM-DD, so a token can be created without the prompts — the command the GUI shows when you add a server now works as written.
  • A failed deploy releases its lock. The Laravel recipes end with after('deploy:failed', 'deploy:unlock'), and the migration adds the line to the deploy.php of the apps that exist: the deploy after a failed one starts, without cipi deploy <app> --unlock. A deploy refused because another one is running is not a failure for Deployer and releases nothing.
  • cipi auth create <app> opens the editor when it is run on a terminal (--no-edit to skip): an auth.json without credentials is of no use, and getting there took a second command.
  • cipi deploy <app> --history [--limit=30] [--json] — past deploys and rollbacks, newest first: result, release, duration, exit code, trigger, branch, when it started and ended. It reads deploy.log and its rotated files, newest first and only as far back as it takes. --json gives each run the keys of last in --status --json, with ISO 8601 times. cipi deploy --last [--json] is every app's last run in one call (and cipi deploy <app> --last one app's). Both also exist with the flag first — cipi deploy --history <app> — because a Cipi older than 5.9.0 answers "App '--history' not found" to that form and would deploy on the other: the panel uses the safe one. cipi deploy <app> --releases finds a release's duration in the rotated logs as well.
  • Horizon is detected at deploy. When a deploy finds laravel/horizon installed, QUEUE_CONNECTION=redis in the app's .env and no queue worker configured, it enables Horizon (what cipi worker horizon enable <app> does) — an app in that state has nothing processing its jobs. In the other two cases it says what to do, once per situation, and changes nothing: with queue:work workers already there (they are never replaced on their own) and with another queue connection (the two commands to run are printed; the .env is never edited). cipi worker horizon disable <app> is remembered: Horizon is not turned back on. Webhook deploys run as the app user and cannot enable it; cipi pending lists the apps left without a worker.
  • Databases linked to an app. cipi db create --app=<app> creates a database and shows it as that app's — the WordPress of a custom app, a second database of a Laravel app. cipi db link <database> <app> and cipi db unlink <database> do the same for one that exists. A link is a line in the app's entry of apps.json (databases: [{name, engine}]): it is in the projection the panel reads, travels with cipi sync, and is gone with the app — the database is not, and cipi app delete says which ones it left. It is a label: the database keeps its own user and password. cipi db list has an APP column on a terminal, and --json carries app and link for every database — linked, own (the one created with a Laravel app) or namespace (<app>_…, what cipi.yml lets an app declare). cipi app show lists the linked ones.
  • cipi backup status --json — what a backup page is drawn from: the destinations (never their keys), every profile with the apps and databases its globs cover right now, its last run, whether it is overdue or running, and the apps and databases no enabled profile takes. It only reads: no default profile is created and no "overdue" mail is sent, however often it is asked. cipi backup list --json [--profile=] lists the runs each destination holds with one listing per profile and bucket.
  • cipi backup run --detach [--profile=NAME] starts the run and returns; the output goes to backup.log, like the scheduled runs, and cipi backup status says how it ended. Under systemd the run gets a transient unit of its own, otherwise a session of its own — the panel's queue worker gives a command ten minutes and takes its children with it when it is recycled.
  • cipi backup profile edit <name> --exclude-databases= (and --exclude-tables=) with nothing after the equals sign empties the list; until now an exclusion could be changed but not removed.
  • An optional Git provider step in setup.sh. After the install the wizard asks where the repositories are — GitHub, GitLab (gitlab.com or self-hosted), Bitbucket, Azure DevOps, or Enter to skip — shows where the token is created and which permissions it needs, and saves it with cipi git <provider>-token (read without echo). With a token, cipi app create adds the deploy key and the webhook to each repository by itself. Skipping changes nothing, and without a terminal the step only prints the command for later.
  • The panel may manage Node runtimes, backup profiles and database links. /etc/sudoers.d/cipi-api gains cipi node install|default|upgrade|remove, cipi db link|unlink, cipi backup status --json, backup list --json, backup run --detach, backup verify, backup profile add|edit|remove|enable|disable and backup destination test. Migration 5.9.0 rewrites the file on servers with a panel, checks it with visudo and puts the previous one back if it is refused. Not there, on purpose: backup configure and backup destination add|edit|remove (an S3 secret on a command line, which the panel would also keep in its jobs table), backup key, backup fetch, backup prune, and a backup run that is not detached.

Changed

  • cipi db list, piped or run by the panel, prints the four columns it always had: the panel API before 1.39 reads that table with a regex.

Fixed

  • A custom app without a repository can be created from the panel. cipi app create --custom asked "Git — leave empty to use SFTP only" whenever --repository was not on the command line — also with no terminal, where the answer is end-of-file: the command stopped there and the panel showed the question as the error (creating a WordPress or any SFTP-only app from the GUI). It now asks on a terminal only. The summary and the prompt also say what a custom app's docroot is: a path inside ~/htdocs, / being htdocs itself.

  • sudo cipi node restart <app> works. cipi-node-switch accepts a sudo caller only when it is the app itself — right for the rule an app user has, wrong for cipi, which is root and merely started with sudo by the cipi admin or by the panel. cipi node restart, cipi node upgrade --restart, the process lines of cipi node status and the stop in cipi app delete were all refused with "cipi cannot manage ". cipi now calls the switch as root's own action.

  • The daily swap flush cannot take the server down. Root's crontab ran swapoff -a && swapon -a every morning with no check: on a small server whose swap was really in use, everything in it was pushed back into RAM at once and the OOM killer picked what to stop. It now runs only when there is something in swap and the available memory is more than twice that. setup.sh for new servers; the migration rewrites that one line of root's crontab and leaves every other line as it is.

  • A failed migration says what state the server is in. The message read "installation unchanged"; the new release's files were already in place, only /etc/cipi/version had not moved. It now says so, that the migration runs again on the next update (the nightly one too), and where the previous files are kept.

  • cipi scan notices a hash pass that lost files. The name of the error file was chosen in a subshell and never reached the caller, so the check for "could not read every file" always found nothing: cipi scan manifest installed the short list as the new baseline, and the nightly comparison reported the unread files as removed. The errors are now seen: the manifest is left as it was and the app is reported as not checked, as the code always meant.

  • cipi app clone copies a .env value with |, & or \ in it as it is. A | made sed fail and the clone stopped half way; an & came out as the old value pasted into the new one.

  • cipi sync updates an app whose .env has no DB_HOST (or any other DB_* key). The missing key ended the command there without a word — an SQLite app, for one — and the apps after it in the archive were not synced either.

  • cipi deploy --releases and the deploy emails show the commit again where a release has its .git. Run by root, git refused a repository owned by another user and the columns stayed empty.

Tests

  • bash tests/verify-5.9.0.sh, in two halves. The first: both proofs of concept, the log reader against .. and a second path, the swap check on sample /proc/meminfo values, and the migration run for real against a fake root (every command that would touch the machine stubbed): who leaves www-data and who does not, the move of the logs with nginx, supervisor or PHP-FPM refusing the new configuration and everything going back, the stopped worker that stays stopped, the Node switch, one app at a time, a second run that changes nothing. It also runs the new helpers, the .env functions with a value that carries a command, the sync .env merge, the integrity hashing and the Laravel recipe under set -e, on a fake home with sudo stubbed. What needs real accounts was run by hand as root against unprivileged users planting symlinks, the previous code and this one side by side on the same fixture, with and without set -e: where the previous code changed the owner of the target, overwrote it or printed it, this one leaves it untouched, and on an ordinary home both leave the same files, content, owners and modes (the differences are the ones listed here). nginx, supervisord, sshd and ssh-keygen themselves were not run, and none of this ran on a real server: try cipi deploy, cipi app env, cipi app edit --php and a cipi sync on a staging server before the release. The older suites that write a vhost or a supervisor program learn the new log directory.
  • The second half: the Horizon states and the advice given once; the history across rotated and gzipped logs, a run that starts before a rotation and ends after it, a time date cannot read, a control character in a banner, the forms that must never deploy; links (one app at most, own and namespace databases, the four columns checked with the old panel's regex); who opens a dump; the backup JSON (no key in it, covers, overdue, uncovered, nothing written), a detached run really started in its own session; the sudoers rules, parsed by visudo.

Ecosystem

  • cipi/api 1.39.0 — names the full-access role on its side (cipi:token-create --full-access, * (full access) in the token list); the CLI flag works with older versions of the package too, since the wildcard is Sanctum's own. New with it: deploy history and last deploys, Node runtimes (install, default, upgrade, remove), backup profiles, database links, the upload of a database dump in chunks.
  • cipi/gui 4.2.0 — a security fix of its own (what a user may do on an app is asked of the grants at every request, never taken from the page) and the pages for all of the above: a backup matrix, Node runtimes, the last deploy in the app list, dump upload, a confirmation dialog in place of the browser's, saved Artisan commands, deferred loading everywhere.
  • What changes for a server that updates: the server's keys log in as app users; the panel's Composer runs as www-data; six components are patched at night (cipi autoupdate off to opt out); a mail when something is waiting; a deploy that finds Horizon installed, the queues on Redis and no worker turns Horizon on; where a panel is installed its sudoers file is rewritten. What does not: no app's Valkey, no reboot, no SSH setting of an app.
  • Not run for real before the release, and worth a look on a staging server: the per-app logrotate rules (logrotate is not on the machine the release was prepared on — cipi pending reports a rule logrotate refuses), the cipi-valkey@ systemd unit (the instances themselves were run with the unit's command line, as real users, against a real server), the apt side of cipi autoupdate, and systemd-run for cipi backup run --detach (its fallback, a session of its own, was). The sshd section was checked with a real OpenSSH 9.6 on the layouts of existing servers; the panel helpers with the real www-data and a real Composer.
  • cipi/sdk, cipi-cli, cipi/agent: no change needed. The panels run cipi through the same sudoers whitelist, which is written by their own install from now on; cipi ssh add from the panel still works. The panel's log viewer asks for the same ~/logs/… paths and gets the same pages, and cipi/agent reads ~/logs through the symlinks. A server that had the API or the GUI removed by hand and the sudoers file left behind loses that file with the migration — expected, it reappears with the next cipi api <domain> / cipi gui <domain>.
  • Left as they are, by choice: open_basedir keeps /tmp/ for every app (packages that hard-code it would break with a per-app directory; a sibling app can no longer reach the pool, so it is no longer a cross-app vector), and the nightly self-update follows the latest branch without a signature check. On servers installed before this release, password SSH/SFTP for app users stays as it was (cipi ssh apps disable --all turns it off for every app user and for apps created later).
  • Still as it was: cipi app create and cipi sync import of a new app write the new home as root (no one can be that user yet); cipi sync push passes the passphrase to the remote cipi sync import on its command line, visible in ps on the target while it runs; cipi compliance and cipi disk read one line of REVISION and of shared/.env as root after checking that no link is on the way, and keep only a commit hash or a database name from it.