From d9e72734521a84b00e04fc82f1aa71661656b6ba Mon Sep 17 00:00:00 2001 From: Peter van Arkel Date: Sat, 21 Nov 2026 23:32:53 +0100 Subject: [PATCH] Document and verify single-server deployments on Debian 13 --- docs/deployment.md | 63 +++++++++++++++++++++++++++++++-------------- docs/development.md | 37 +++++++++++++------------- 2 files changed, 63 insertions(+), 37 deletions(-) diff --git a/docs/deployment.md b/docs/deployment.md index 775f6c6..1291370 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,8 +1,19 @@ # Install Coulobre Panel on one server This setup runs the panel, its Celery worker and scheduler, MariaDB, RabbitMQ, -and Apache on one Ubuntu server. Use Ubuntu 24.04 or later. Apache serves the -panel and its static files and connects to Gunicorn over a Unix socket. +and Apache on one server. Apache serves the panel and its static files and +connects to Gunicorn over a Unix socket. + +| Distribution | Panel | Managed websites | Local mailbox setup | +| --- | --- | --- | --- | +| Ubuntu 26.04 | Yes | PHP 8.5 FPM | Dovecot 2.4 | +| Debian 13 (Trixie) | Yes | PHP 8.4 FPM | Dovecot 2.4 | +| Ubuntu 24.04 | Yes | — | Dovecot 2.3 | + +Use the distribution's PHP-FPM packages on a managed web node. Coulobre uses +their pool directory, configuration test command, and systemd service. Debian +13 supplies Python 3.13 for the panel virtual environment. +[Debian 13 release notes](https://www.debian.org/releases/trixie/release-notes/whats-new.en.html) ## Install the package and configure local services @@ -260,11 +271,22 @@ local services that the installation will offer before checking them. selected test mailbox to a fresh destination on that node. If SpamAssassin is enabled, verify normal delivery and the GTUBE test. +### Debian 13 verification + +The single-server setup was verified on a fresh Debian 13 amd64 VM with the +distribution packages and systemd. The test covered direct and reverse-proxied +panel HTTPS, account access and plan limits, website activation and PHP-FPM +pool changes, service health, SFTP, ext4 user quotas, MariaDB provisioning, +Postfix delivery, Dovecot IMAP and quotas, and authoritative BIND9 publishing. +Certbot issued and renewed a hosted website certificate using a local ACME +test CA. An account backup restored an individual file, the complete website, +a MariaDB database, and a Dovecot mailbox. + ## Activate local websites from the panel -Use the local activation worker when the panel and the Ubuntu 26.04 web node -share a server. Install Apache and PHP 8.5 FPM on the host and follow the -[web node setup](development.md#apply-a-manifest-on-an-ubuntu-web-node) and +Use the local activation worker when the panel and the web node share a +Debian 13 or Ubuntu 26.04 server. Follow the +[web node setup](development.md#apply-a-manifest-on-a-web-node) and [socket setup](development.md#enable-local-web-activation). Create a dedicated account and install the worker. Its systemd unit grants @@ -905,14 +927,16 @@ and cURL extensions. Serve phpMyAdmin on a dedicated HTTPS hostname with its own PHP-FPM pool. The pool needs read access to its bridge configuration and write access to its private session directory. -The examples below use the Ubuntu 26.04 package paths. Adjust the TLS files, -hostname, and panel origin in the example configurations before enabling the -virtual host. If the distribution's Apache configuration exposes phpMyAdmin -globally, disable it and include the package configuration only in the -dedicated virtual host. +Set `php_version` to the version for your distribution before running the +commands below. Adjust the TLS files, hostname, and panel origin in the example +configurations before enabling the virtual host. If the distribution's Apache +configuration exposes phpMyAdmin globally, disable it and include the package +configuration only in the dedicated virtual host. ```sh -sudo apt install phpmyadmin php8.5-fpm php8.5-mysql php8.5-curl +php_version=8.5 # Use 8.4 on Debian 13. +sudo apt install phpmyadmin "php${php_version}-fpm" "php${php_version}-mysql" \ + "php${php_version}-curl" sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \ --shell /usr/sbin/nologin coulobre-phpmyadmin sudo install -d -g coulobre-phpmyadmin -m 0750 \ @@ -926,7 +950,7 @@ sudo install -m 0644 deploy/phpmyadmin/coulobre-signon.php \ sudo install -m 0644 deploy/phpmyadmin/config.inc.php.example \ /etc/phpmyadmin/conf.d/99-coulobre-signon.php sudo install -m 0644 deploy/phpmyadmin/pool.conf.example \ - /etc/php/8.5/fpm/pool.d/coulobre-phpmyadmin.conf + "/etc/php/${php_version}/fpm/pool.d/coulobre-phpmyadmin.conf" sudo install -m 0644 deploy/phpmyadmin/apache.conf.example \ /etc/apache2/sites-available/coulobre-phpmyadmin.conf ``` @@ -946,9 +970,9 @@ panel_manage migrate --noinput panel_manage collectstatic --noinput sudo a2enmod ssl proxy_fcgi sudo a2ensite coulobre-phpmyadmin -sudo php-fpm8.5 --test +sudo "php-fpm${php_version}" --test sudo apache2ctl configtest -sudo systemctl reload php8.5-fpm apache2 +sudo systemctl reload "php${php_version}-fpm" apache2 sudo systemctl restart coulobre-panel ``` @@ -960,13 +984,13 @@ database. Sign out of phpMyAdmin to end its session. ### Open a mailbox in Roundcube -On Ubuntu 26.04 with PHP 8.5, use the current Roundcube 1.7 Complete -release from [Roundcube Downloads](https://roundcube.net/download/). Verify +Use the Roundcube 1.7 Complete release. Verify the archive and install Roundcube in `/opt/roundcube` following the [upstream manual setup](https://github.com/roundcube/roundcubemail/wiki/Installation). +[Roundcube downloads](https://roundcube.net/download/) The Ubuntu 26.04 package at version 1.6.11 cannot start with PHP 8.5. Install the required PHP extensions for Roundcube and its database, as -well as `php8.5-curl` for the bridge. +well as the matching PHP cURL package for the bridge. Use the mail server already configured for Coulobre. Confirm that a mailbox can sign in over TLS using its full email address. Configure a @@ -981,6 +1005,7 @@ Roundcube maintenance jobs. Keep the application code and configuration owned by root. ```sh +php_version=8.5 # Use 8.4 on Debian 13. sudo useradd --system --user-group --no-create-home --shell /usr/sbin/nologin coulobre-roundcube sudo install -d -o root -g coulobre-roundcube -m 0750 /etc/coulobre-roundcube sudo install -o root -g coulobre-roundcube -m 0640 /dev/null /etc/coulobre-roundcube/bridge.key @@ -988,7 +1013,7 @@ sudo sh -c 'openssl rand -hex 32 > /etc/coulobre-roundcube/bridge.key' sudo install -D -m 0644 deploy/roundcube/coulobre_webmail.php \ /opt/roundcube/plugins/coulobre_webmail/coulobre_webmail.php sudo install -m 0644 deploy/roundcube/pool.conf.example \ - /etc/php/8.5/fpm/pool.d/coulobre-roundcube.conf + "/etc/php/${php_version}/fpm/pool.d/coulobre-roundcube.conf" sudo install -o root -g coulobre-roundcube -m 0640 deploy/roundcube/config.inc.php.example \ /etc/coulobre-roundcube/webmail.inc.php sudoedit /etc/coulobre-roundcube/webmail.inc.php @@ -1068,7 +1093,7 @@ To provision Postfix and Dovecot on another host, use the [separate-node setup](#provision-mail-and-dns-on-separate-servers). Set up [Postfix and Dovecot](development.md#apply-a-mailbox-manifest) on the -Ubuntu 24.04 or 26.04 panel host and enable the +panel host and enable the [mailbox provisioning socket](development.md#enable-local-mailbox-provisioning). Install the dedicated worker that connects to that socket. diff --git a/docs/development.md b/docs/development.md index c25f727..874e161 100644 --- a/docs/development.md +++ b/docs/development.md @@ -311,7 +311,7 @@ notation for `responsible_name`, such as `hostmaster.example.net` for by hand. Render the zone file and validate it with the `named-checkzone` utility -provided by the Ubuntu `bind9-utils` package. The rendered zone is written to +provided by the `bind9-utils` package. The rendered zone is written to standard output. See the [BIND9 command reference](https://bind9.readthedocs.io/en/stable/manpages.html#named-checkzone). ```sh @@ -351,7 +351,7 @@ the strings in the TXT record. [RFC 1035](https://www.rfc-editor.org/rfc/rfc1035 ### Apply a zone manifest -Install `bind9` and `bind9-utils` on an Ubuntu DNS node. Use BIND9's default +Install `bind9` and `bind9-utils` on the DNS node. Use BIND9's default IN view and enable `allow-new-zones yes;` in the existing `options` block. On an authoritative-only DNS node, set `recursion no;` and configure `allow-transfer` to match your secondary servers. Set @@ -415,11 +415,11 @@ coulobre-mail-node inspect coulobre-mailbox-1.json ### Apply a mailbox manifest -Use Ubuntu 24.04 with Dovecot 2.3 or Ubuntu 26.04 with Dovecot 2.4. Install -Postfix, `dovecot-imapd`, and `dovecot-lmtpd`. Install Coulobre in a root-owned -virtual environment on the node. Use a Postfix hostname outside the set of -hosted mail domains and keep those domains in Postfix's virtual mailbox -address class. See the [Postfix virtual domain guide](https://www.postfix.org/VIRTUAL_README.html). +Install Postfix, `dovecot-imapd`, and `dovecot-lmtpd`. Debian 13 and Ubuntu +26.04 use Dovecot 2.4. Ubuntu 24.04 uses Dovecot 2.3. Install Coulobre in a +root-owned virtual environment on the node. Use a Postfix hostname outside +the set of hosted mail domains and keep those domains in Postfix's virtual +mailbox address class. See the [Postfix virtual domain guide](https://www.postfix.org/VIRTUAL_README.html). On a fresh mail node, create the virtual mail user and empty lookup files. @@ -479,7 +479,7 @@ service lmtp { } ``` -#### Dovecot 2.4 on Ubuntu 26.04 +#### Dovecot 2.4 on Debian 13 and Ubuntu 26.04 For a fresh, dedicated mail node, use the [Dovecot 2.4 configuration example](../deploy/dovecot/coulobre-2.4.conf.example) @@ -785,20 +785,21 @@ coulobre-web-node render coulobre-web-plan-1.json apache > apache.conf coulobre-web-node render coulobre-web-plan-1.json php-fpm > php-fpm.conf ``` -The command reads the manifest and packaged templates locally. The isolated -Ubuntu check below demonstrates loading the configuration. +The command reads the manifest and packaged templates locally. -## Apply a manifest on an Ubuntu web node +## Apply a manifest on a web node -Use a dedicated Ubuntu 26.04 node with Apache and PHP 8.5 FPM installed from -the distribution packages. Enable FastCGI in Apache and start the native -services before applying a manifest. +Install Apache and PHP-FPM from the distribution packages. Use PHP 8.4 on +Debian 13 and PHP 8.5 on Ubuntu 26.04. Enable FastCGI in Apache and start the +services before applying a manifest. Each site's virtual host connects to its +own FPM socket. ```sh -sudo apt install apache2 php8.5-fpm +php_version=8.5 # Use 8.4 on Debian 13. +sudo apt install apache2 "php${php_version}-fpm" sudo a2enmod proxy_fcgi -sudo service php8.5-fpm start -sudo service apache2 restart +sudo systemctl enable --now "php${php_version}-fpm" +sudo systemctl restart apache2 ``` Install the matching Coulobre package in a root-owned virtual environment on @@ -838,7 +839,7 @@ The status command reads local state. It exits with code 0 for `configured`, code 2 for the other report states, and code 1 if it cannot read the manifest or inspect the node. Use an HTTP request to verify the site's response as well. -#Website aliases reuse the activation and HTTPS sockets. The web node stores +Website aliases reuse the activation and HTTPS sockets. The web node stores alias reservations under `/var/lib/coulobre/web-node/aliases/` and creates separate Apache virtual hosts that share the primary site's document root and PHP-FPM socket. Existing website deployment manifests use the primary domain