Files
coulobre/docs/deployment.md
T

629 lines
27 KiB
Markdown
Raw Normal View History

# 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.
## Install the package and configure local services
Run these commands from a Coulobre checkout on the server.
```sh
sudo apt install apache2 mariadb-server rabbitmq-server python3-venv python3-dev \
build-essential pkg-config default-libmysqlclient-dev
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-panel
sudo python3 -m venv /opt/coulobre
sudo /opt/coulobre/bin/pip install '.[server,mariadb]'
sudo install -d -m 0750 /etc/coulobre
sudo install -d -o coulobre-panel -g coulobre-panel -m 0755 /var/www/coulobre-panel-static
if ! sudo test -e /etc/coulobre/panel.env; then
sudo install -m 0600 deploy/panel.env.example /etc/coulobre/panel.env
fi
```
Generate separate random values for the Django secret key, the database
password, and the broker password. Use this command for each value.
```sh
python3 -c 'import secrets; print(secrets.token_urlsafe(48))'
```
Start MariaDB and RabbitMQ. In `sudo mariadb`, create the panel database and
login. Substitute the generated database password.
```sh
sudo systemctl enable --now mariadb rabbitmq-server
```
```sql
CREATE DATABASE coulobre_panel CHARACTER SET utf8mb4;
CREATE USER 'coulobre'@'localhost' IDENTIFIED BY 'replace-with-database-password';
GRANT ALL PRIVILEGES ON coulobre_panel.* TO 'coulobre'@'localhost';
```
Create a dedicated RabbitMQ virtual host and login. Enter the generated broker
password when prompted by `rabbitmqctl add_user`.
```sh
sudo rabbitmqctl add_vhost coulobre
sudo rabbitmqctl add_user coulobre
sudo rabbitmqctl set_permissions -p coulobre coulobre '.*' '.*' '.*'
```
Set `listeners.tcp.1 = 127.0.0.1:5672` in `/etc/rabbitmq/rabbitmq.conf` and
restart RabbitMQ to bind its AMQP listener to loopback. Keep MariaDB and
RabbitMQ management and cluster ports private. [RabbitMQ listener settings](https://www.rabbitmq.com/docs/networking#listeners)
Edit `/etc/coulobre/panel.env` with `sudoedit`. Set `COULOBRE_ALLOWED_HOSTS`
to the hostname browsers will use, enter the Django secret and the database
password, and place the broker password after `coulobre:` in
`COULOBRE_BROKER_URL`. The sample connects to MariaDB through its local Unix
socket and uses the dedicated RabbitMQ virtual host.
## Prepare the panel
Run the Django management commands as the service user with the same
environment the systemd services will use.
```sh
panel_manage() {
sudo systemd-run --quiet --wait --pipe --collect --uid=coulobre-panel \
--property=EnvironmentFile=/etc/coulobre/panel.env \
/opt/coulobre/bin/python -m django "$@"
}
panel_manage check --deploy
panel_manage migrate --noinput
panel_manage collectstatic --noinput
sudo systemd-run --quiet --pty --collect --uid=coulobre-panel \
--property=EnvironmentFile=/etc/coulobre/panel.env \
/opt/coulobre/bin/python -m django createsuperuser
```
HTTPS proxy mode enables HSTS for the panel hostname. Django reports `W005`
and `W021` for the optional subdomain and browser preload settings.
## Configure Apache and DNS
Install the shared Apache directives and enable the modules for your setup.
Replace the example hostname in the chosen virtual host with the hostname
from `COULOBRE_ALLOWED_HOSTS`.
```sh
sudo install -m 0644 deploy/apache/panel-proxy.inc /etc/coulobre/panel-proxy.inc
sudo a2enmod headers proxy proxy_http
```
### Public server
Publish A or AAAA records for the IPv4 and IPv6 addresses that can reach the
panel. Allow TCP ports 80 and 443 at the firewall. If the server is behind NAT,
use the router's public address in DNS and forward those ports to Apache.
Install the TLS virtual host, enable `mod_ssl`, and set the certificate and key
paths for the panel hostname.
```sh
sudo a2enmod ssl
sudo install -m 0644 deploy/apache/panel-tls.conf.example \
/etc/apache2/sites-available/coulobre-panel.conf
```
### LAN only
Use the same TLS virtual host with a hostname that internal DNS resolves to the
server's private address. Use a certificate that clients on the LAN trust, such
as one issued by your internal CA. Limit access to the panel's HTTP and HTTPS
ports to your private network. On a host with public and private web traffic,
use the private address in the panel's virtual hosts in place of `*`.
### External reverse proxy
Point the public DNS records at the reverse proxy. Configure it to redirect
HTTP to HTTPS, preserve the requested hostname when forwarding, and replace
`X-Forwarded-For` with the client address. The origin example uses HTTP on a
private network. Use a TLS connection to Apache if the upstream connection
crosses an untrusted network.
```sh
sudo a2enmod remoteip
sudo install -m 0644 deploy/apache/panel-origin.conf.example \
/etc/apache2/sites-available/coulobre-panel.conf
```
Set `192.168.10.20` to the private listener address on the Apache host and
`192.168.10.10` to the network peer address of your reverse proxy. Use the
proxy address in both `RemoteIPInternalProxy` and the `CONN_REMOTE_ADDR`
access rule. Restrict the origin port to the proxy at the firewall too. The
rule checks the peer connection, so it still applies when Apache recognizes a
different visitor IP from the trusted proxy.
[Apache client IP handling](https://httpd.apache.org/docs/2.4/mod/mod_remoteip.html)
Each virtual host sends its HTTPS indicator to Gunicorn itself. The TLS
virtual host handles HTTPS at Apache, while the private origin is reserved
for the external proxy's HTTPS traffic. Apache passes a single visitor IP
based on the connection or a trusted proxy. [Django HTTPS proxy settings](https://docs.djangoproject.com/en/5.2/ref/settings/#secure-proxy-ssl-header)
The addresses for hosted sites, mail, and authoritative DNS can differ from
the panel hostname. Configure the corresponding public DNS records for each
service using its reachable address.
## Start the services
Install and enable the three units. The panel's socket directory is available
to Apache workers. The scheduler stores its state in a private directory and
there is one scheduler for the installation.
```sh
sudo install -m 0644 deploy/systemd/coulobre-panel.service \
deploy/systemd/coulobre-worker.service deploy/systemd/coulobre-beat.service \
/etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now coulobre-panel.service coulobre-worker.service coulobre-beat.service
sudo a2ensite coulobre-panel
sudo apache2ctl configtest
sudo systemctl reload apache2
```
Sign in with the administrator account. Add a hosting account and request an
Apache preview to verify that RabbitMQ, the scheduler, and the worker are
connected. Follow their logs with `journalctl`.
```sh
sudo journalctl -u coulobre-panel -u coulobre-worker -u coulobre-beat
```
## 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
[socket setup](development.md#enable-local-web-activation).
Create a dedicated account and install the worker. Its systemd unit grants
access to the activation socket for this worker process.
```sh
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-provisioner
sudo install -m 0644 deploy/systemd/coulobre-provisioner.service /etc/systemd/system/
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_WEB_ACTIVATION=1` in `/etc/coulobre/panel.env`, apply pending
database migrations, and restart the panel services.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat
sudo systemctl enable --now coulobre-provisioner.service
```
Open a completed Apache preview and select **Activate site**. The panel queues
the request and shows its progress when you select **Refresh status**. Use
**Retry activation** after a reported failure. Operators need permission to view
hosting accounts and web provisioning plans and the **Can add web activation**
permission.
The worker applies the domain shown in the preview. If the account's primary
domain changes before the worker starts, create a preview for the new domain.
An existing web node reservation stays bound to the domain it was created for.
2026-11-21 13:40:50 +01:00
The same worker measures allocated space in a website's document root. Use
**Measure website storage** on a deployed hosting account and reload the page
to see the latest result. [Website storage measurement](development.md#measure-website-storage)
To enforce hard limits, prepare a dedicated ext4 volume with user quotas for
the managed sites. Use **Change storage limit** on the deployed account to
apply the hosting plan's default or choose a per-site value.
[Website storage quotas](development.md#apply-a-website-storage-limit)
## Enable HTTPS for hosted websites
Once a site is active, obtain the website certificate with Certbot on the
web node and enable its HTTPS virtual host. Each site uses its own
certificate. The renewal hook reloads Apache after Certbot renews it.
[Hosted website HTTPS setup](development.md#enable-https-for-a-hosted-website)
### Request HTTPS from the panel
Set up Apache's HTTP-01 webroot and the Certbot renewal hook on the local
web node. Register a Certbot account if this node does not already have one,
using an email address monitored by the operator.
[Hosted website HTTPS setup](development.md#enable-https-for-a-hosted-website)
```sh
sudo certbot register --email hostmaster@example.org --agree-tos
sudo groupadd --system coulobre-https-provisioning
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-https-provisioner
sudo install -m 0644 deploy/systemd/coulobre-https-apply.socket \
deploy/systemd/coulobre-https-apply@.service \
deploy/systemd/coulobre-https-provisioner.service /etc/systemd/system/
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_WEB_HTTPS=1` in `/etc/coulobre/panel.env`, then apply
pending migrations and restart the panel services.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat
sudo systemctl enable --now coulobre-https-apply.socket \
coulobre-https-provisioner.service
```
On an active site's Apache preview, select **Enable HTTPS** and use
**Refresh status** to follow the request. This requires the **Can add
website HTTPS request** permission and access to view hosting accounts
and web provisioning plans. The worker uses the manifest's primary
domain and keeps Certbot logs and credentials on the web node. If the
request fails, check the diagnostic and use **Retry HTTPS** after
resolving the problem. Certbot handles later renewals.
The panel uses HTTP-01 for initial issuance. For DNS validation, obtain
the certificate on the web node with its configured Certbot DNS plugin
and the expected lineage name. The panel can then enable HTTPS using
that certificate. Certbot renews it with its saved authenticator.
[Certbot DNS plugins](https://eff-certbot.readthedocs.io/en/stable/using.html#dns-plugins)
## Set up SFTP access for hosted websites
Use OpenSSH on the local web node. The site account starts in `/public`
inside its hosting directory. OpenSSH allows public key authentication
and restricts the connection to file transfers.
[OpenSSH server configuration](https://man.openbsd.org/sshd_config)
```sh
sudo apt install openssh-server
sudo groupadd --system coulobre-sftp
sudo install -d -m 0755 /etc/ssh/coulobre-authorized-keys
sudo install -m 0644 deploy/openssh/coulobre-sftp.conf.example \
/etc/ssh/sshd_config.d/00-coulobre-sftp.conf
sudo sshd -t
sudo systemctl reload-or-restart ssh.service
```
Install the worker and socket to manage keys from the panel.
```sh
sudo groupadd --system coulobre-sftp-provisioning
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-sftp-provisioner
sudo install -m 0644 deploy/systemd/coulobre-sftp-apply.socket \
deploy/systemd/coulobre-sftp-apply@.service \
deploy/systemd/coulobre-sftp-provisioner.service /etc/systemd/system/
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_WEB_SFTP=1` in `/etc/coulobre/panel.env`, then apply
pending migrations and restart the panel services.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat
sudo systemctl enable --now coulobre-sftp-apply.socket \
coulobre-sftp-provisioner.service
```
On an active hosting account, open **SFTP access**. Assigned customers
can manage keys for their accounts. Operators need **Can view hosting
account** and **Can change site SFTP access**.
Select one or more `.pub` files to add keys to the hosting account.
A file can contain one OpenSSH public key per line. Each key has its own
fingerprint and **Remove key** action. Use **Revoke SFTP access** to
remove all keys for new connections. Revoke access and close any existing
SFTP sessions before transferring the hosting account to another customer.
Connect to the web node's SSH hostname and port, which may differ from
the hostname that a reverse proxy uses for web traffic.
## Back up hosted website files
Use the web node commands to archive a website's document root and
restore the entire tree or a selected file. The archive stays on the
web node at the path supplied by the operator.
[Website backup and restore](development.md#back-up-and-restore-hosted-website-files)
## Provision local databases from the panel
Enable the [database provisioning socket](development.md#enable-local-database-provisioning)
on the panel host. Install the MariaDB worker under a dedicated identity with
access to that socket.
```sh
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-db-provisioner
sudo install -m 0644 deploy/systemd/coulobre-database-provisioner.service /etc/systemd/system/
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_DATABASE_PROVISIONING=1` in `/etc/coulobre/panel.env`, then
apply pending migrations and restart the panel services.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat
sudo systemctl enable --now coulobre-database-provisioner.service
```
Open a hosting account and select **Provision database** for a database request.
Reload the account page to see the status. Use **Retry provisioning** after a
reported failure. Operators need permission to view hosting accounts and
database requests and the **Can add database provisioning** permission.
The MariaDB node stores the application login in the root-only file
`/var/lib/coulobre/database-node/<database-name>.json`. Use the credentials
from that file when configuring the hosted application.
2026-11-21 01:41:06 +01:00
Use the MariaDB node commands to create a compressed SQL dump for an individual
managed database and restore it to an empty database with the same identity.
[Database backup and restore](development.md#back-up-and-restore-a-managed-database)
## Back up an account's website and databases
Download an account backup manifest from the panel. Use it to create one ZIP
on a single server or bundle native archives from separate nodes. The CLI can
also include mailbox archives when the downloaded manifest lists mailboxes.
[Account backup and recovery](development.md#back-up-a-hosting-account)
### Start local account backups from the panel
Enable this option when the panel, website, and the account's MariaDB
databases run on the same server. The backup service uses the default MariaDB
socket and the website and database registries on that server.
```sh
sudo groupadd --system coulobre-backup-requests
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-backup-worker
sudo install -m 0644 deploy/systemd/coulobre-account-backup.socket \
deploy/systemd/coulobre-account-backup@.service \
deploy/systemd/coulobre-backup-worker.service /etc/systemd/system/
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_ACCOUNT_BACKUPS=1` in `/etc/coulobre/panel.env`, then apply
pending migrations and restart the panel services.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat
sudo systemctl enable --now coulobre-backup-worker.service
```
Open the account and select **Create backup**. Operators need permission to
view hosting accounts, Apache previews, and database requests, plus
**Can add account backup job**. Reload the page to see the status and the path
of the completed ZIP. Only one backup can be queued or running for an account
at a time. The node gives each backup up to 30 minutes.
Archives are stored under `/var/lib/coulobre/account-backups/` with root-only
2026-11-21 15:08:48 +01:00
access. Retrieve them on the server. The account's **Backup archives** page
shows all backup requests, archive sizes reported by the node, and expiration
status. Recover archives with the
[account bundle commands](development.md#recover-backups-from-the-bundle).
#### Schedule backups for an account
Select **Schedule backups** on the account page. Choose a daily time or a
weekly day and time, all in UTC. To pause the schedule, clear
**Enable scheduled backups** and save. The account page shows the next
scheduled run and identifies the source of each backup in the history.
Operators also need **Can change account backup schedule** to manage schedules.
The scheduler captures the account's current resources when it queues the
backup. If an account already has a backup queued or running at dispatch,
the scheduler skips that occurrence. After a period offline, it queues at
most one missed backup per account and continues with the next future time.
2026-11-21 15:08:48 +01:00
#### Manage retention of scheduled account backups
Automatic expiration is disabled by default. To offer it in the panel,
enable local account backups first, then install the retention drop-in.
```sh
sudo install -D -m 0644 deploy/systemd/coulobre-account-backup@.service.d/retention.conf \
/etc/systemd/system/coulobre-account-backup@.service.d/retention.conf
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_BACKUP_RETENTION=1` in `/etc/coulobre/panel.env`.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat coulobre-backup-worker
```
Open **Backup archives** and select **Manage retention**. Enter a count of
1 to 90 to keep the latest successful scheduled backups or clear the field
to disable expiration for the account. Manual backups and scheduled backups
marked **Protected** are kept in addition to that count. Operators need
the usual backup permissions, permission to view mailbox requests, and
**Can manage account backup retention**.
The planner selects at most one older archive per account every five
minutes. Backups used by a queued or running restore are ineligible.
The backup node checks the retained ZIP manifests and their entry lists
before removing an older archive. If any retained ZIP is missing or fails
those checks, the candidate is kept and the result appears in the archive
history. Changing the policy or protecting an archive cancels any expiration
for the account that has yet to start. An expiration already in progress can
finish.
Expired entries stay in the history and lose their restore actions. Keep
the corresponding `.expired` records beside the ZIPs to prevent a late
worker delivery from recreating an expired archive.
#### Restore from local account backups in the panel
Enable local account backups first. Install the restore socket and give the
backup worker access to it. The archive and the resources being restored
must be on the same server.
```sh
sudo groupadd --system coulobre-restore-requests
sudo install -m 0644 deploy/systemd/coulobre-account-restore.socket \
deploy/systemd/coulobre-account-restore@.service /etc/systemd/system/
sudo install -D -m 0644 deploy/systemd/coulobre-backup-worker.service.d/restore.conf \
/etc/systemd/system/coulobre-backup-worker.service.d/restore.conf
```
Enable the options you need in `/etc/coulobre/panel.env`.
| Setting | Additional restore permission |
| --- | --- |
| `COULOBRE_LOCAL_WEBSITE_RESTORE=1` | **Can add website restore job** |
| `COULOBRE_LOCAL_DATABASE_RESTORE=1` | **Can restore an account database** |
| `COULOBRE_LOCAL_MAILBOX_RESTORE=1` | **Can restore an account mailbox** |
Install the socket service drop-in for each enabled action. If you replace
an existing website-only restore unit, install the website drop-in to keep
website recovery enabled. MariaDB recovery uses the local default MariaDB
socket. Mailbox recovery uses local Postfix and Dovecot.
```sh
# Website restores
sudo install -D -m 0644 deploy/systemd/coulobre-account-restore@.service.d/website.conf \
/etc/systemd/system/coulobre-account-restore@.service.d/website.conf
# Database restores
sudo install -D -m 0644 deploy/systemd/coulobre-account-restore@.service.d/database.conf \
/etc/systemd/system/coulobre-account-restore@.service.d/database.conf
# Mailbox restores
sudo install -D -m 0644 deploy/systemd/coulobre-account-restore@.service.d/mailbox.conf \
/etc/systemd/system/coulobre-account-restore@.service.d/mailbox.conf
```
```sh
panel_manage migrate --noinput
sudo systemctl daemon-reload
sudo systemctl restart coulobre-panel coulobre-worker coulobre-backup-worker
```
Operators also need the backup permissions listed above and permission to
view mailbox requests for any backup that includes mail. Select the restore
action on a completed backup.
- **Restore website** restores one file or all website files. A single file
needs an existing parent directory. Select **Replace the existing file at
this path** to permit overwriting. The old and restored copies must fit
within the website quota during staging. The whole website option needs
an empty document root.
- **Restore database** offers databases listed in the backup that still
belong to the account. Use the matching empty managed database and keep
the application disconnected during recovery. If the import fails after
creating objects, inspect the database before attempting another restore.
- **Restore mailbox** offers mailboxes listed in the backup that still
belong to the account. Use a newly provisioned mailbox with no Maildir.
Keep delivery and client access paused for that mailbox during recovery,
with Postfix and Dovecot running for local checks. The restored mailbox
uses the destination credentials and current quota configuration.
The **Backup restores** section shows each target, source backup, operator,
and result. Keep the request records under
`/var/lib/coulobre/account-restores/` while corresponding jobs could still be
delivered. If the panel cannot confirm a restore, check the destination
before submitting another. For resources on separate servers, use the
[account bundle commands](development.md#recover-backups-from-the-bundle).
#### Include mailboxes on the same server
Complete the [Postfix and Dovecot setup](development.md#apply-a-mailbox-manifest)
on the same server. Install the service drop-in so the backup service can
create its temporary Maildir copies on the mail volume.
```sh
sudo install -D -m 0644 deploy/systemd/coulobre-account-backup@.service.d/mail.conf \
/etc/systemd/system/coulobre-account-backup@.service.d/mail.conf
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_ACCOUNT_BACKUP_MAIL=1` in `/etc/coulobre/panel.env` and
restart `coulobre-panel` and `coulobre-backup-worker`. Operators with
permission to view mailbox requests can select **Include mailboxes** when
starting or scheduling an account backup. They can also edit an existing
schedule that includes mail. If you disable mailbox backups while such a
schedule is enabled, the subsequent jobs report a failure until you adjust
the schedule or re-enable local mailbox backups. Provision all listed
mailboxes before requesting a backup with mail. For mailboxes on a separate
server, use the
[bundle workflow for separate nodes](development.md#bundle-backups-from-separate-nodes).
2026-11-21 01:41:06 +01:00
## Publish local DNS zones from the panel
Enable the [DNS publishing socket](development.md#enable-local-dns-publishing)
on the panel host. Install the BIND9 publishing worker under a dedicated
identity with access to that socket.
```sh
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-dns-publisher
sudo install -m 0644 deploy/systemd/coulobre-dns-publisher.service /etc/systemd/system/
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_DNS_PUBLISHING=1` in `/etc/coulobre/panel.env`, then apply
pending migrations and restart the panel services.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat
sudo systemctl enable --now coulobre-dns-publisher.service
```
Open a hosting account and select **Publish zone**. Reload the account page to
see progress and the last SOA serial confirmed by the local BIND9 node.
Operators need permission to view hosting accounts and DNS zones and the
**Can add DNS publication** permission.
Each request captures the reviewed SOA serial and records. You can edit the
zone while it publishes. Publish the newer revision after the current request
finishes. Use **Retry publishing** if the current revision failed.
## Provision local mailboxes from the panel
2026-11-21 02:00:40 +01:00
Set up [Postfix and Dovecot](development.md#apply-a-mailbox-manifest) on the
Ubuntu 24.04 or 26.04 panel host and enable the
[mailbox provisioning socket](development.md#enable-local-mailbox-provisioning).
Install the dedicated worker that connects to that socket.
```sh
sudo useradd --system --user-group --no-create-home --home-dir /nonexistent \
--shell /usr/sbin/nologin coulobre-mail-provisioner
sudo install -m 0644 deploy/systemd/coulobre-mailbox-provisioner.service /etc/systemd/system/
sudo systemctl daemon-reload
```
Set `COULOBRE_LOCAL_MAILBOX_PROVISIONING=1` in `/etc/coulobre/panel.env`, then
apply pending migrations and restart the panel services.
```sh
panel_manage migrate --noinput
sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat
sudo systemctl enable --now coulobre-mailbox-provisioner.service
```
Open a hosting account and select **Provision mailbox** for a mailbox request.
Reload the account page to see the status. Use **Retry provisioning** after a
reported failure. Operators need permission to view hosting accounts and
mailbox requests and the **Can add mailbox provisioning** permission.
The initial password stays in the root-only credentials file on the mail node.
To locate that file, download the manifest and use the node's `apply` command.
Reapplying the manifest preserves the password and prints the file path.
Set a per-mailbox storage limit on the hosting plan for new mailbox requests.
Enable Dovecot quota enforcement on the mail node before provisioning them.
[Mailbox storage limits](development.md#enforce-mailbox-storage-limits)
2026-11-21 13:32:08 +01:00
For an existing mailbox, change its limit from the account page. Coulobre
queues the update for mailboxes provisioned through the local worker. Use
the node command for manually provisioned mailboxes.
[Change a mailbox storage limit](development.md#change-a-mailbox-storage-limit)
Back up mail on the node that hosts the mailbox. The archive can be used to
recover messages and folders into a newly provisioned mailbox with the same
address. [Mailbox backup and restore](development.md#back-up-and-restore-a-mailbox)