Trellis Now Supports Ubuntu 26.04
Trellis v1.33.0 and trellis-cli v1.20.0 are out with support for Ubuntu 26.04 LTS. New local VMs and servers created with trellis-cli now use 26.04 by default. Ubuntu 24.04 is still supported.
Getting Trellis onto 26.04 also meant updating MariaDB to 11.8 and changing how Trellis adds APT repositories, so this release includes changes for existing servers too.
Ubuntu 26.04
Ubuntu 26.04 broke Trellis in two places. apt-key no longer exists, which Trellis used to add the nginx and MariaDB signing keys, and MariaDB 10.11 has no packages for 26.04. Both are fixed in v1.33.0. We’ve tested full provisioning on a fresh 26.04 cloud image, and CI now runs on 26.04.
DigitalOcean (ubuntu-26-04-x64) and Hetzner Cloud (ubuntu-26.04) both offer 26.04, and trellis server create now uses it by default.
For existing sites, the simplest way onto 26.04 is to create a new server, provision it, and deploy to it.
Staying on 24.04
trellis-cli v1.20.0 creates 26.04 VMs and servers by default, and 26.04 requires Trellis v1.33.0 or later. If your project uses an older version of Trellis, update it first, or keep using 24.04.
For local development, set the Ubuntu version in trellis.cli.yml before creating the VM:
vm:
ubuntu: "24.04"
For new servers, pass the image to trellis server create:
trellis server create --image ubuntu-24-04-x64 production
The first boot of a new 26.04 VM takes about two minutes longer than usual because of an upstream issue with how the VM’s network interfaces are named. trellis-cli v1.20.0 handles it, and later starts are fast.
MariaDB 11.8
Trellis now installs MariaDB 11.8 LTS, which is supported until February 2030, up from 10.11.
A few related fixes went in alongside the version bump:
- Trellis now runs
mariadb-upgradeafter installing MariaDB. MariaDB’s packages try to run it on startup, but that fails once Trellis sets a root password, which left system tables on the old version after a major upgrade. - Repositories for other MariaDB versions are removed, so changing
mariadb_versionno longer leaves two repositories configured. - Tables created with
utf8mb4but no collation keep usingutf8mb4_general_ci. MariaDB 11.2+ would otherwise useutf8mb4_uca1400_ai_ci, and database dumps that use it can’t be imported into MySQL or older versions of MariaDB.
Existing servers aren’t upgraded automatically. Provisioning switches the repository to 11.8 but leaves the installed 10.11 packages in place. To upgrade, back up your databases first, then run:
trellis provision --tags mariadb --extra-vars "mariadb_server_package_state=latest mariadb_client_package_state=latest" production
To stay on 10.11 on Ubuntu 24.04, set mariadb_version: "10.11" in group_vars/all/main.yml.
APT repositories now use the deb822 format
The nginx, MariaDB, and Sury PHP repositories are now added with Ansible’s deb822_repository module. Each one gets its own .sources file and signing key in /etc/apt/keyrings, and the old .list files are removed the next time you provision.
This replaces the nginx_ppa and mariadb_ppa variables. If you set either one in your group_vars, provisioning stops with an error that names the new variables:
nginx_repo_uri,nginx_repo_suite, andnginx_repo_signing_keymariadb_repo_uri,mariadb_repo_suite, andmariadb_repo_signing_key
For example, to use nginx’s stable packages instead of mainline:
nginx_repo_uri: "https://nginx.org/packages/{{ ansible_facts['distribution'] | lower }}"
To apply the new repositories on existing servers:
trellis provision --tags nginx,mariadb,php production
Thanks to @MikeiLL for starting this change.
Also in trellis-cli v1.20.0
- A new
vm.mount_typeoption lets you choose the Lima mount type (9p,virtiofs, orreverse-sshfs) trellis key generate --key-nameis now--name
More info
- Trellis v1.33.0 release notes
- trellis-cli v1.20.0 release notes
- Trellis server requirements
- Trellis local development
Questions or problems upgrading? Let us know!