Ubuntu 26.04 can't take existing boxes without the PHP version work in #2309 / #2319
@JoshData — in March you asked what a migration to 26.04 would need: which packages changed, whether config changes are required, which Nextcloud version is right, and whether the Nextcloud database survives across versions. This is an answer to the last two, from provisioning runs rather than reading.
Short version: fresh 26.04 installs already work. Existing boxes cannot follow, and the missing piece is PHP version handling that two open PRs already implement.
Fresh installs are fine
@jvolkenant's raccoon branch provisions green on 26.04 — a from-scratch vagrant up ends with "Your Mail-in-a-Box is running", all services active, no failed units, PHP 8.5.4, Nextcloud 33. It needed four small fixes, which are in jvolkenant/mailinabox#1. That half is in decent shape.
Existing boxes hit a wall
I then tested what an operator would actually do: provision a 22.04 box (Nextcloud 27.1.11, a test user, a calendar, an address book), archive its /home/user-data, restore that onto a fresh 26.04 box, and run setup.
Upgrading to Nextcloud version 28.0.14
This version of Nextcloud is not compatible with PHP>=8.4.
You are currently running 8.5.4.Nextcloud refuses to skip major versions, so the upgrade has to walk 27 → 28 → … → 33, and every hop runs occ upgrade. But each release also refuses to run on too new a PHP, and 26.04 ships 8.5:
| Nextcloud | PHP it accepts |
|---|---|
| 27 | 8.0 – 8.2 |
| 28, 29 | 8.0 – 8.3 |
| 30 | 8.1 – 8.3 |
| 31, 32 | 8.1 – 8.4 |
| 33 | 8.2 – 8.5 |
On PHP 8.5, only Nextcloud 33 can execute at all. The intermediate hops aren't merely missing from setup/nextcloud.sh — they cannot run on the target machine.
The same wall from the other side
So I tried the reverse: walk Nextcloud forward on 22.04 before the OS move, so a box arrives at 26.04 already on 33. That is a much better shape — no chain has to cross the OS boundary at all.
That works, up to a point. Running the walk on a 22.04 box — Nextcloud 27.1.11 restored from a real one, with a test user, a calendar and an address book:
Upgrading to Nextcloud version 28.0.14
Upgrading to Nextcloud version 29.0.16
Upgrading to Nextcloud version 30.0.17
This version of Nextcloud requires at least PHP 8.1
You are currently running 8.0.30.Two hops land cleanly — the database ends at 29.0.16.1, the test calendar and address book are both intact — and the third stops, because 22.04 pins PHP 8.0 while Nextcloud 30 wants 8.1 or newer. Same wall, opposite side: on 26.04 the PHP is too new for the hops, on 22.04 it is too old.
The failure mode is worth noting too. The 30 files were already unpacked when occ upgrade refused, so the box is left with a 29 database under 30 code, and Nextcloud won't start until either PHP moves or the files are rolled back. The automatic pre-upgrade copy under owncloud-backup/ is what saves it.
Both directions need the same capability: running a given Nextcloud hop under a PHP that hop accepts.
Which is already written, twice, and open since 2023
- #2309 (@kiekerjan) parameterises the PHP version across the tree and installs the older PHP for the hops that need it, removing it afterwards. 47 comments, consensus apparently reached in April 2025 — "I think we are at a point that we can get this merged" — now CONFLICTING and untouched for 17 months.
- #2319 (@downtownallday) takes a different route: a Docker-based Nextcloud migration that doesn't depend on the installed PHP at all, explicitly so that backups of older systems can be migrated.
For what it's worth, I first tried the naive thing — moving PHP_VER from 8.0 to 8.2 — and it fails: the old and new php*-fpm both end up installed, the new one gets restarted once per package during setup, and systemd cuts it off with start-limit-hit. That is a small demonstration of why #2309 does the careful version-juggling that it does, rather than a bump.
I don't have a view on which of the two is better and it isn't mine to have. But 26.04 depends on one of them, which is new information: in 2025 this was "let's get off an EOL PHP", and it could wait. It can't now.
What I can contribute on top
The walk itself, which neither PR carries — they were written when Nextcloud 25 was current. Pinned and checked against the app store's per-platform listing:
| Hop | contacts | calendar | user_external |
|---|---|---|---|
| 28.0.14 | 5.5.4 | 4.7.20 | 3.4.0 |
| 29.0.16 | 6.0.7 | 4.7.20 | 3.4.0 |
| 30.0.17 | 7.3.19 | 5.5.23 | (none exists) |
| 31.0.14 | 7.3.19 | 5.5.23 | 4.0.0 |
| 32.0.14 | 8.3.19 | 6.5.4 | 4.0.0 |
| 33.0.8 | 8.8.0 | 6.5.4 | 4.0.0 |
No user_external release covers Nextcloud 30 — 3.4.0 stops at 29, 4.0.0 starts at 31 — so that hop installs none; it returns at 31 and the app:enable below the chain runs regardless.
Core pins use the SHA256 sums Nextcloud publishes: .sha1 sidecars are gone for these releases. wget_verify needs to accept SHA256 for that, and @binarykitchen has already written exactly that change — it's inside his 26.04 commit in #2575 rather than standalone.
Open PRs this depends on
Listed in case it helps prioritise:
| PR | Why it matters here |
|---|---|
| #2309 or #2319 | the prerequisite; 26.04 cannot take existing boxes without one of them |
| #2583 (@raccettura) | ReadWritePaths for php-fpm. Any PHP version change re-triggers #2582 without it |
| #2575 (@binarykitchen) | contains the wget_verify SHA256 support, bundled with the Ubuntu bump |
What I'm asking
Which of #2309 / #2319 should the 26.04 work build on? I'm happy to rebase whichever you pick onto current main, put the Nextcloud 27→33 walk on top, and report back with a real migration run — with @kiekerjan's or @downtownallday's agreement, since it's their work.
What I could not test
- ActiveSync actually working. Z-Push installs and the box comes up clean, but I haven't synced a device.
- The VirtualBox path — no VirtualBox on this host. My runs are libvirt/QEMU.
- Anything past Nextcloud 29 on 22.04, for the PHP reason above.
Related, and deliberately not duplicated here: #2573 (Vagrant bump), #2536 (older support-range EPIC).
Source: mail-in-a-box/mailinabox