Skip to content

Version 5.22

Latest

Choose a tag to compare

@andreapollastri andreapollastri released this 29 Nov 21:03
405b391

[5.22.0] — 2026-11-29

Backups run again. From 5.19.1 to 5.21.0 cipi backup run stopped at its first step on a server that had a backup profile: on those versions no backup was made — not the scheduled ones, not one started by hand or from the panel (#577). This release fixes it, and at the update runs the profiles that are behind.

HTTP/2 and HTTP/3, when you ask for them. A vhost of Cipi is listen 443 ssl;: HTTP/1.1 over TLS, with nginx's HTTP/2 and HTTP/3 code out of reach — which is why most of nginx's security releases of this year did not concern a server Cipi set up. That stays the default. Each of the two is now one setting for the whole server, off until someone turns it on (#575).

Fixed

  • cipi backup run made no backup on a server that had a profile (5.19.1 → 5.21.0, #577). The run ended at once with Stopped unexpectedly at backup.sh:1281 in _bk_run() (exit 1): return 1, before a file was read or a database dumped: the scheduled runs (the message is in /var/log/cipi/backup.log), cipi backup run in every form — --profile=<name>, <app>, --dry-run — and the runs started from the panel (--detach). cipi backup profile list stopped the same way, and cipi backup status after its list of destinations.
    • Who: every server with backups set up, from its update to 5.19.1, 5.19.2, 5.20.0, 5.20.1 or 5.21.0 — the first is of 2026-11-28 — until its update to this release. On those versions there is no way to make a backup with Cipi. The runs made before are whole and where they were: status --json (the panel's page), list, verify, prune, check, destination, configure and profile show|add|edit|remove|enable|disable were not affected.
    • Why nobody was told: a run that stops there never gets to the notification of a failed backup. The watchdog (cipi backup check, every hour) reports a profile after twice its interval — two days for a nightly one.
    • Why: 5.19.1 gave the function that makes the nightly profile of a first setup (_bk_ensure_default_profile) a status that says whether it made one, for profile_created in cipi backup configure --json. "There is a profile already" became status 1 — and run, profile list and status call it on a line of its own, where under cipi's set -e a status of 1 ends the command. Its status is 0 again when there is nothing to make, and configure reads whether the profile was made from a variable.
  • Migration 5.22.0 runs the profiles that are behind. With the fix alone the next backup would be at the profile's next slot: the following night for a nightly profile, the following week for a weekly one. On a server that comes from 5.19.1 – 5.21.0 the update runs, in the background and one after the other (cipi backup run --profile=<name>, output in backup.log), each enabled profile whose last run — ended well or not — is older than its own interval, and says which ones it started; cipi backup status says when they are done.
    • Not run: a profile that is disabled, that is running, within its interval, or made less than one interval ago. Nothing on a server that comes from another version, or without backups.
    • It cannot stop the update: what cannot be read or started is said, with the command (cipi backup run), and left to the schedule.
    • What it cannot give back: the hours a server spent on those versions have no run — cipi backup list shows the gap.

Added

  • cipi nginx http2 on|off|status [--json]: one file, /etc/nginx/conf.d/cipi-http2.conf (http2 on;). Every HTTPS vhost nginx loads — the apps, the panel, its API — answers HTTP/2 to a client that asks for it and HTTP/1.1 to the others. No vhost is written, so there is nothing a later rewrite could lose.
  • cipi nginx http3 on|off|status [--json]: QUIC on 443/udp, for every app with a certificate.
    • The socket: /etc/nginx/conf.d/cipi-http3.conf, a server block that holds 443/udp with its options (reuseport, which nginx takes once per address — so not in a vhost, which may go away) and is its default server: a QUIC connection that names no app is refused in the handshake, as cipi nginx default-server does for TCP.
    • The vhosts: each server block Cipi put on :443 gets listen 443 quic; and listen [::]:443 quic; next to listen 443 ssl;, and Alt-Svc: h3=":443"; ma=86400 — the header a browser learns HTTP/3 from, since its first request is always over TCP. The header is at server level and, where a location has headers of its own (the HTML and the build assets of a static or SPA Node app), after those too: nginx gives a location its server's headers only when it sets none itself.
    • Kept across rewrites: the lines are written by one function (nginx_vhost_http3, lib/common.sh) at http3 on and whenever a vhost is written again (nginx_vhost_apply_tls) — a new alias, a PHP switch, a certificate, the page cache. An app that gets its certificate later answers HTTP/3 from then on. off takes the lines out and gives back each vhost byte for byte.
    • The firewall: 443/udp is opened in UFW as HTTP/3's own rule (cipi-http3) and closed by off. cipi firewall remove 443 --proto=udp names the command that closes it.
    • What it leaves alone: the panel and its API (their vhosts are certbot's; HTTP/2 reaches them, HTTP/3 does not); an app without a certificate; a vhost on HTTPS that is not written the way Cipi writes it, which is named in the output and in status (without).
  • Not on an nginx that lacks the fixes. Turned on, nginx's HTTP/2 and HTTP/3 fixes are what stands between a stranger and the server: both are refused on an nginx below its security floor and on the Ubuntu archive's build (which has no http2 directive and no HTTP/3 at all, and which Cipi's nightly update does not reach) — cipi nginx upgrade first. --force gets past the floor at the server's shell, never from the panel.
  • Every change is tested before nginx reloads. nginx -t refuses: every file is put back as it was and nginx's reason is shown. QUIC already configured by hand, or http2 on; in a file of your own, is found and named instead of being written over. And one thing nginx -t cannot see: 443/udp held by another program is found only by the reload, which then keeps the configuration it had and says so in its error log alone — so after the reload Cipi asks who listens on 443/udp, and when it is not nginx every file goes back.
  • A Zero Trust lock closes 443/udp with 80/443. cipi zt lock http and cipi zt tailscale|netbird lock http dropped the TCP rules only: with HTTP/3 on, 443/udp left open would have been a way to the apps around the lock. Every lock now closes it, every unlock (and cipi zt disable) opens it again where HTTP/3 is on, cipi nginx http3 on under a lock leaves it closed and says who holds it, and cipi firewall allow 443 --proto=udp is refused under a lock as 443/tcp always was. Nothing is lost: Cloudflare reaches an origin over TCP only and gives visitors HTTP/3 from its edge, and the mesh interface is open as a whole.
  • cipi firewall status --json carries protocols, for the panel's Firewall tab (cipi/api 1.51.0, cipi/gui 4.13.0): http2 and http3, each with enabled, available and the reason when this nginx cannot do it, and elsewhere (config files Cipi did not write that turn it on); for HTTP/3 also https_vhosts, vhosts and without, udp (open, closed, or no-firewall when UFW is not active) and held_by (cloudflare, tailscale, netbird); and nginx (version, patched | vulnerable | distro, the floor, and autoupdate: whether it gets its patch releases every night). The 443/udp rule reads managed_by: "http3". The panel's sudoers allow nginx http2|http3 status --json, on and off, each spelled out, nothing after them. cipi firewall status has a line for HTTP/3's port while it is on.
  • cipi nginx security says of each whether it is on and by whom (Cipi's switch, or configuration Cipi did not write, named), has a red line when either is on over an nginx that is not at the floor, and a line when either is on while nginx's nightly update (cipi autoupdate) is off — on says that too, when it is the case.

Changed

  • cipi nginx default-server: a default server for QUIC does not count as the one of :443 — it is another socket's — so the catch-all for TCP is still written, and still reported, with HTTP/3 on.

Notes

  • HTTP/2 and HTTP/3: nothing changes until one of the two is turned on: a server installed or updated to this release is listen 443 ssl;, as before — the migration of this release is about the backups alone. cipi self-update rewrites the panel's sudoers, as it does at every update.
  • The backups of a server that is not on this release yet. The nightly cipi self-update (03:50) brings it; until then a server on 5.19.1 – 5.21.0 makes no backup. Sooner: cipi self-update — and cipi self-update --now where an update delay (cipi self-update policy) would hold this release for its hours.
  • Which to turn on. HTTP/3 without HTTP/2 works, but a visitor whose network blocks UDP then gets HTTP/1.1: the two are usually turned on together, and http3 on says so while HTTP/2 is off. A domain proxied by Cloudflare gets HTTP/2 and HTTP/3 from Cloudflare's edge whatever the origin speaks.
  • In front of the server. A provider's firewall (a cloud firewall, a security group) has to let 443/udp through too; UFW is only the server's own. status says when UFW is not active.
  • A reload and HTTP/3. At a reload (a certificate renewed, a vhost changed) new workers take over 443/udp, and an HTTP/3 connection open at that moment can be cut: the browser opens it again. Connections over TCP finish on their old worker, as before.
  • Bans. cipi firewall block and CrowdSec refuse every protocol to an address, 443/udp included. fail2ban's bans are over TCP — the SSH port, and every TCP port for a repeat offender — so they do not keep an address from the sites over HTTP/3.
  • tests/verify-5.22.0.sh (140 checks) runs both commands against stubs of nginx (which refuses what nginx refuses about these files: http2 twice, the socket's options twice), systemctl, ss and ufw: the lines of a vhost on, twice, off and written again; an nginx that cannot or should not; refusals, a port taken and a failed reload with every file back; both kinds of lock; the firewall's JSON; the sudoers. Not run there: nginx itself — the configuration it writes is what nginx's own documentation gives for HTTP/2 and HTTP/3.
  • The backups, tested through the cipi binary. The backup checks of 5.19.0 loaded the library into a shell without set -e, where a status of 1 on a line of its own goes by unnoticed — which is how #577 got through five releases. The ones of this release run cipi backup … itself over a sandbox: configure twice, run in every form with a profile there (a run made and kept, its state, the crontab's line), profile list, status and ten more commands; then the same run over the function as it was from 5.19.1 to 5.21.0, which stops as the issue reports. The migration is run as cipi self-update runs it: from each of those versions and from others, with profiles behind and not, one running, nothing to read, nothing to start them with — it ends well every time. Not run there: a dump of a real database and an upload, which this fix does not touch.