Docker and server operations¶
Basic Docker commands¶
List containers:
Follow logs:
Recent logs:
Stop without deleting volumes:
Be careful with:
That deletes persistent data volumes.
Health vs readiness¶
Server modules expose liveness/readiness through shared observability wiring. Caddy's friendly edge maps the most
important readiness checks to /health/... paths visible on /index.
A container being Up does not necessarily mean the application is ready; launcher/smoke scripts wait for
readiness.
Smoke tests¶
Repository scripts:
Standalone Control Plane + two independent Community Nodes:
The standalone smoke test verifies independent networks/volumes, stable node identities, signed registration and that a node keeps its identity across a restart.
Persistence¶
Durable:
- node registry PostgreSQL;
- mailbox PostgreSQL;
- node identity volumes;
- Community Node gateway attachment-blob volume (
gateway-blob-data); - registry signing/authority material.
Ephemeral/rebuildable:
- Redis phone alias bindings and invitation routes (apps claim them again every few hours).
Backups¶
Use repository backup/restore scripts rather than copying live database files:
For an installation created by the server installer, the Windows offline snapshot script is
app/Backup-SparrowDeployment.ps1 in the installation folder (see server/installer/README.md).
Troubleshooting sequence¶
- Open deployment
/index. - Check the failing health link.
docker compose ps.- Read logs for only the failing service first.
- Check PostgreSQL/Redis health.
- Check Caddy logs if the service is healthy internally but the public route returns 502.
- For Community Node registration, verify the directory URL and
/v1/control-planes. - For attachment failures, inspect gateway blob/ticket logs, blob volume capacity and configured size/retention values.
- For client disconnects, inspect gateway health (
/v1/circuit) and Android transport logs. - For a sign-up whose alias claim is rejected with
PHONE_VERIFICATION_FAILED, check thepresence-directorylogs and thatCONTROL_PLANE_DIRECTORY_PUBLIC_KEYis the key of the Directory whose phone verifier signed the attestation. - For a public installation with automatic sslip.io hostnames that became unreachable after the internet
provider changed the public IP, run Start / apply settings in the installer: it moves the generated
names to the new IP (previous settings in
backups/public-ip-*). Custom DNS names must be updated at your DNS provider.
Caddy 502 errors¶
A Caddy 502 usually means Caddy is running but its upstream container is unavailable/not ready. Check the upstream service rather than changing public routes first.
Session requests that fail¶
When a gateway, as the last hop of a circuit, cannot reach a mailbox node for the app, it logs Session request to <host> failed: <reason> (only the node and the reason, nothing about the app or the mailbox). Look for these in the gateway logs when apps report "the mailbox node did not answer the session node".