Deployment & Operations
Quick start snapshot
See Server Quick Start for the eight steps with KYPOST_BIND.
Runtime checks (server README)
docker compose ps
docker compose logs -f kypost-server
docker exec -it kypost-server ps aux
docker exec -it kypost-server ls -la /kypost/config /kypost/state
docker volume ls | grep kypost
Persistence:
docker compose up --buildkeeps volumes.docker compose down -vremoves volumes and stored data.
Reverse proxy networking
The server README devotes a long note to this. Summary:
KYPOST_BINDdecides which interface publishes 5866. The supplied.env.exampleselects127.0.0.1; Compose still requires the variable to be present.- For a proxy on the same host, use
127.0.0.1. For a proxy elsewhere, use the LAN IP or0.0.0.0to publish everywhere. - Better still, run the proxy as a container on
kypost-net(the Compose network) and point it athttp://KyPost-Server:5866. That DNS name stays valid across rebuilds and ignores published ports. - To detect a mistake, fetch
GET /api/statusafter sign-in.clientIpmust be your public address andproxyHeadersTrustedmust betrue(orfalsefor direct TLS termination in KyPost). IfclientIpis a gateway like172.x.0.1, every user shares one lockout bucket and the cookie is not markedSecure. - Behind different hosts, combine direct TLS in KyPost (
TLS_CERT_FILE+TLS_KEY_FILE) with a proxy. Prefer a certificate the proxy explicitly trusts and keep upstream verification enabled. Disabling upstream verification leaves the proxy-to-KyPost hop vulnerable to interception and should be limited to a network whose trust boundary you understand.
Full snippet and error recovery are in docs/Reverse_Proxy_Networking.md.
Updating (server)
The server checks GitHub releases hourly. It emails the primary admin once and shows the update in Configuration → Application.
Apply the current stable image with health-gated rollback:
./scripts/update-host.sh
That script resolves stable to a digest, verifies the attestation with gh attestation verify, preserves that digest for rollback. It needs Docker Compose v2, Buildx, gh. To pin a release, set KYPOST_VERSION=0.2.0 in .env.
For a locally built image with no published digest, the updater refuses it. Use git pull --ff-only && docker compose up --build -d instead. See CHANGELOG.md for the upgrade/rollback matrix. Back up first.
Automatic updates are opt-in and need systemd:
./scripts/install-auto-update.sh
It installs a daily timer at 03:15 local time plus up to one hour jitter, enables lingering for the Docker user. Disable with systemctl --user disable --now kypost-update.timer. Without systemd, schedule ./scripts/update-host.sh --auto with KYPOST_AUTO_UPDATE=true.
Linux distribution
From kypost-Linux/README.md:
- Own signed Flatpak remote at
https://busness-app.github.io/KyPost-for-Linux/kypost.flatpakrepo, app idcom.kysecurity.mail, plus Flathub for theorg.kde.Platform//6.11runtime. Each release also attaches a.flatpakbundle (no auto-updates). Seedocs/DISTRIBUTION.md. - The remote is live.
kypost.flatpakrepopoints athttps://busness-app.github.io/KyPost-for-Linux/repo/, whose summary is GPG-signed and carriesapp/com.kysecurity.mail/x86_64/masterandapp/com.kysecurity.mail/aarch64/master. - The OSTree repo republishes on every push to
main, soflatpak updatetracks the branch. The.flatpakbundles are a separate thing: they attach only to av*tagged release. The first isv0.2.0. scripts/verify-version.shkeepsCMakeLists.txt, the AppStream<release>entry, and the git tag from drifting apart, and CI gates av*build on all three agreeing. A binary reporting the previous version, or a stale AppStream entry that stops Discover offering the update, is the failure it exists to prevent.- CI builds aarch64 artifacts as well as x86-64, and gates the release on the version matching the tag.
Push relay deployment
Maintainer runs Cloudflare Workers. See Push Relays for setup, secrets, and redeploy. Self-hosters need no Firebase or Apple account.
What the READMEs do not say
- No managed hosting guide.
- No Kubernetes manifest or systemd unit beyond the auto-update timer.
- No log rotation config.