Repository navigation
Version 5.9.0
[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 createandcipi synccreate them incipi-appsonly;www-datastill joins each app's group, which is all nginx and the panel need. Migration 5.9.0 removes every app user (members ofcipi-apps, keys ofapps.json; nothing else) fromwww-dataon 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 withcipi worker stopstays 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 namecipi app createwould 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
wwwpool socket is 0600 (setup.sh,cipi php install; the migration adds the line to the placeholder Cipi wrote and leaves a hand-editedwww.confalone, with a note). No vhost points at that pool andwww-dataowns the socket, so nothing changes for nginx. -
/etc/sudoers.d/cipi-apiexists only while a panel is installed.setup.shno longer writes it on every server;cipi api <domain>andcipi gui <domain>write it when they install,cipi api remove/cipi gui removedrop 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-notifyvalidates every argument before it uses one. The exit code must be 1–3 digits and is compared as a string, never with-eqor(( )); 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/shadowis "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, withdeploy,deploy-ok, a numeric status, the app's ownlogs/deploy.log) are unchanged. No migration: self-update installs the new helper before anything else. -
An option name is a name.
parse_argsaccepts letters, digits,-and_in the name of an option and ignores anything else, so nothing a caller writes before the=reachesprintf -vas 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 installscommon.shbefore anything else. -
Root builds and backs up in private directories.
cipi self-updatecloned 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>andcipi api upgradebuilt in/tmp/cipi-api-buildand backed the panel.envand token database up to/tmp/cipi-api-backup-<epoch>, the GUI's upgrade to/var/tmp/cipi-gui-backup-<epoch>. All of them aremktemp -dnow, mode 0700;cipi api removeandcipi gui removeclean the new names as well as the old. So is the directorycipi guicopies its bundled package into (/tmp/cipi-gui-pkg-$$, the line the first report pointed at), and the onecipi sync exportstages in: that was/tmp/cipi-sync-<time>, world-readable for as long as the export ran, with every exported app's.env, the decryptedapps.json,databases.json,smtp.jsonand 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.logare 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 bothcipi deploy(root) and a webhook deploy (the app user) append to, is a file the app user owns inside that directory.~/logsstays 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>/inopen_basedir, so code that reads~/logsfrom 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 -tfirst (a configuration that already fails is not touched), the edit,nginx -tagain, 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 whoseopen_basedirsomeone rewrote is left alone. The log files from before the move stay in~/logsas<name>.old, with their old rotations: delete them when you no longer need them;deploy.logstarts 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-permissionsand everycipi deployran plainchownandchmodon names under the home (~/.ssh/*.pub,shared/.env,shared/storage/*,~/logs): a symlink of that name aimed them at any file. Ownership is nowchown -h -Ron the home, which walks the tree by descriptor and changes a link, never what it points at, and everychmodandsetfaclinside the home is done as the app user. Log files root left in~/logsandshared/storage/logsare handed back from inside that directory (cd, thenchown -h -R --from=root .) and only when its physical path is the one its name says: withsharedorshared/storagea 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 withsudo -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.shandnode.json,~/.cipi/webhook.json,shared/.env(cipi app envincluding the editor,--showand--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 generatedcipi.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 asroot:rootinside a home in the past is handed back whole (chown -h -Ron the top-level entry) the first time it is in the way. Not changed:cipi app createandcipi sync importof a new app, where nobody can be that user before the command has finished. -
A value from an app's
.envis 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, andcipi syncrebuilds the.envwith awk reading the keptDB_*values from the environment. Before, such a value ran as a command of root's (above). -
cipi syncreads and writes an existing app as that app's user.exportcopied.env,auth.json,deploy.phpand the SSH files withcp, 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/storageis archived and unpacked by the app user, and an update writes.env,auth.jsonanddeploy.phpthrough the helpers. The passphrase reachesopensslthrough its environment (-pass env:), no longer on a command line every local user can read inps; 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,REVISIONand Deployer'sreleases_logas the app user, and so docipi deploy --releasesand the deploy notifications. -
cipi scanhashes a tree inside the app's home, or none.currentandhtdocsare the app's names. Pointed outside the home — at/etcin the test — the nightly scan had root read and hash that tree, and so didsudo 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 allowsTIOCSTI, could type into it._cipi_remount_rwwrites its error to amktempfile. -
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-logsalso 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.shwrites thecipi-nosshrulecipi ssh appsalready used and sets the default to disabled: a new app gets its SSH password as before,cipi app createsays access from outside is off, andcipi ssh apps enable <app>(orenable --all) opens it. Deploys usessh localhostand are not affected. Servers already installed are not changed: their default stays what it was. -
In the panel's trees, Composer, artisan and
.envedits run aswww-data./opt/cipi/apiand/opt/cipi/guibelong towww-data.cipi api update,cipi gui update,cipi api statusand the nightlycipi self-updaterancomposer config,composer require,composer reinstallandcomposer showthere as root: Composer loads the plugins invendor/and runs the scripts incomposer.json, both files ofwww-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 aswww-data(panel_composerinlib/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-updatechowns all of/opt/cipito root before it updates the panel, and what is in the tree is still whatwww-datawrote. The.envof both trees —APP_URL,LOG_STACK,SESSION_DRIVER, the SSO keys ofcipi gui sso— is edited and read aswww-datatoo: root'ssed -i,>>andchown www-dataon that name went wherever a symlink led, and thechownhanded the file over. The same fortoken-abilities.txt, the SQLite pragmas (root ransqlite3on the path the.envnames), the copiescipi api upgrade/cipi gui upgradetake of.envand the database before a rebuild (a link there ended up, as a regular file owned bywww-data, in the new tree), and the permission repair, which chowned and chmoddedstorage,.envanddatabase.sqliteby name.cipi gui reset-userwrites the new password in a file of root's making under/run, not instorage/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-logsnamed/home/*/shared/storage/logs/*.logand/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>, withsu <app> <group>, and the two/home/*lines are gone from the shared rule. No script in the rule — logrotate runs those as root even withsu. Logs whose group iswww-datafrom 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 atcipi 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 oneFLUSHDBemptied 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 sameAPP_NAMEshare 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.envis 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.envpoints Redis at another host is left alone.cipi valkey share <app>goes back;cipi valkey flush-sharedempties the shared instance and changes its password once nobody uses it.cipi app cloneno longer copiesREDIS_HOST,REDIS_PORT,REDIS_PASSWORDfrom the source;cipi synckeeps this server's Valkey settings for an app that exists and gives an imported one an instance here (its.envarrived 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.
sshdasks/usr/local/bin/cipi-ssh-keys(run ascipi) for the keys of thecipiuser at every login as an app user: no copies to keep in step, and a key removed withcipi ssh removestops 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 insshd_configbecome one managed section, validated bysshd -tbefore 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 syncrewrites 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-datafor 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/nodeand 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 -tbefore 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 ofunattended-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.shinstalls nothing older.cipi pending— what is waiting for a person: a reboot installed updates need (Ubuntu's flag, and the newest kernel in/bootagainst 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 withpecl installis 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 (triggerpending_report);cipi statusshows the list when there is one;--jsonfor a script.cipi reboot— whether a reboot is required and since when;cipi reboot now; andcipi 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 anothercipicommand 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).fin the checklist. Also--name=,--abilities=a,band--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 thedeploy.phpof the apps that exist: the deploy after a failed one starts, withoutcipi 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-editto skip): anauth.jsonwithout 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 readsdeploy.logand its rotated files, newest first and only as far back as it takes.--jsongives each run the keys oflastin--status --json, with ISO 8601 times.cipi deploy --last [--json]is every app's last run in one call (andcipi deploy <app> --lastone 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> --releasesfinds a release's duration in the rotated logs as well.- Horizon is detected at deploy. When a deploy finds
laravel/horizoninstalled,QUEUE_CONNECTION=redisin the app's.envand no queue worker configured, it enables Horizon (whatcipi 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: withqueue:workworkers already there (they are never replaced on their own) and with another queue connection (the two commands to run are printed; the.envis 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 pendinglists 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>andcipi db unlink <database>do the same for one that exists. A link is a line in the app's entry ofapps.json(databases: [{name, engine}]): it is in the projection the panel reads, travels withcipi sync, and is gone with the app — the database is not, andcipi app deletesays which ones it left. It is a label: the database keeps its own user and password.cipi db listhas an APP column on a terminal, and--jsoncarriesappandlinkfor every database —linked,own(the one created with a Laravel app) ornamespace(<app>_…, whatcipi.ymllets an app declare).cipi app showlists 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 tobackup.log, like the scheduled runs, andcipi backup statussays 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 withcipi git <provider>-token(read without echo). With a token,cipi app createadds 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-apigainscipi 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|disableandbackup destination test. Migration 5.9.0 rewrites the file on servers with a panel, checks it withvisudoand puts the previous one back if it is refused. Not there, on purpose:backup configureandbackup 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 --customasked "Git — leave empty to use SFTP only" whenever--repositorywas 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,/beinghtdocsitself. -
sudo cipi node restart <app>works.cipi-node-switchaccepts a sudo caller only when it is the app itself — right for the rule an app user has, wrong forcipi, which is root and merely started with sudo by thecipiadmin or by the panel.cipi node restart,cipi node upgrade --restart, the process lines ofcipi node statusand the stop incipi app deletewere all refused with "cipi cannot manage ".cipinow calls the switch as root's own action. -
The daily swap flush cannot take the server down. Root's crontab ran
swapoff -a && swapon -aevery 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.shfor 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/versionhad 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 scannotices 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 manifestinstalled 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 clonecopies a.envvalue 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 syncupdates an app whose.envhas noDB_HOST(or any otherDB_*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 --releasesand 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/meminfovalues, and the migration run for real against a fake root (every command that would touch the machine stubbed): who leaveswww-dataand 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.envfunctions with a value that carries a command, the sync.envmerge, the integrity hashing and the Laravel recipe underset -e, on a fake home withsudostubbed. 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 withoutset -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,sshdandssh-keygenthemselves were not run, and none of this ran on a real server: trycipi deploy,cipi app env,cipi app edit --phpand acipi syncon 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
datecannot 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 byvisudo.
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 offto 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 pendingreports a rule logrotate refuses), thecipi-valkey@systemd unit (the instances themselves were run with the unit's command line, as real users, against a real server), the apt side ofcipi autoupdate, andsystemd-runforcipi 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 realwww-dataand a real Composer. - cipi/sdk, cipi-cli, cipi/agent: no change needed. The panels run
cipithrough the same sudoers whitelist, which is written by their own install from now on;cipi ssh addfrom the panel still works. The panel's log viewer asks for the same~/logs/…paths and gets the same pages, and cipi/agent reads~/logsthrough 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 nextcipi api <domain>/cipi gui <domain>. - Left as they are, by choice:
open_basedirkeeps/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 thelatestbranch without a signature check. On servers installed before this release, password SSH/SFTP for app users stays as it was (cipi ssh apps disable --allturns it off for every app user and for apps created later). - Still as it was:
cipi app createandcipi sync importof a new app write the new home as root (no one can be that user yet);cipi sync pushpasses the passphrase to the remotecipi sync importon its command line, visible inpson the target while it runs;cipi complianceandcipi diskread one line ofREVISIONand ofshared/.envas root after checking that no link is on the way, and keep only a commit hash or a database name from it.