Support local web activation over a restricted Unix socket

This commit is contained in:
parkel committed 2026-11-21 01:10:25 +01:00
1 parent 1fbe97d879
commit 7f706c39b5
6 files changed
+144 -2

No files matched your search

+22
View File
@@ -570,6 +570,28 @@ 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.
### Enable local web activation
On a web node with the same Apache and PHP-FPM setup, systemd can accept local
activation requests at `/run/coulobre-web-apply.sock`. Install the matching
Coulobre package in a root-owned virtual environment at `/opt/coulobre` before
enabling the socket.
```sh
getent group coulobre-web-provisioning >/dev/null || sudo groupadd --system coulobre-web-provisioning
sudo install -m 0644 deploy/systemd/coulobre-web-apply.socket \
deploy/systemd/coulobre-web-apply@.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now coulobre-web-apply.socket
```
Grant group membership only to the service identity responsible for provisioning
sites. The socket accepts one version 1 site manifest as UTF-8 JSON, up to 4 KiB.
After sending the manifest, shut down the writing half of the connection and
read the JSON reply to EOF. A `configured` reply includes the account ID and
domain. A `failed` reply includes a diagnostic in `problem`. Retry the same
manifest if the connection closes before a reply arrives.
## Run an isolated PHP test site
Open a completed preview for the account's current domain and select **Download