Skip to main content

Preflight and Postflight Checks

Control Zero Self-Managed includes automated health checks that run before installation (preflight) and after installation or upgrade (postflight). These checks verify that the environment meets requirements and that all services are operating correctly.

Preflight Checks

Preflight checks run before installation to verify the host environment is ready.

Running preflight checks

czctl preflight

Check Reference

CheckWhat It VerifiesFailure Meaning
docker-versionDocker 24.0 or later is installedDocker is missing or outdated. Install or upgrade Docker before proceeding.
compose-versionDocker Compose 2.20 or later is installedDocker Compose is missing or outdated. Install the Compose plugin.
disk-spaceAt least 10 GB available on the Docker data partitionInsufficient disk space. Free space or expand the volume.
memoryAt least 4 GB RAM availableInsufficient memory. Add RAM or reduce other workloads.
cpu-coresAt least 2 CPU cores availableInsufficient CPU. The compiled policy engine requires 2 cores minimum for acceptable latency.
port-availabilityDefault ports (443, 8443, 8080, 9000) are not in usePort conflict. Stop the conflicting service or configure alternate ports.
file-permissionsThe installation directory is writablePermission issue. Run the installer as a user with write access to the target directory.
clock-syncSystem clock is within 5 minutes of UTCClock skew can cause license validation failures and audit log timestamp issues. Configure NTP.

Output format

[preflight] Checking Docker version... [pass] Docker 26.1.3
[preflight] Checking Compose version... [pass] Docker Compose 2.27.0
[preflight] Checking disk space... [pass] 48 GB available
[preflight] Checking memory... [pass] 16 GB available
[preflight] Checking CPU cores... [pass] 4 cores
[preflight] Checking port 443... [pass] Available
[preflight] Checking port 8443... [pass] Available
[preflight] Checking port 8080... [pass] Available
[preflight] Checking port 9000... [pass] Available
[preflight] Checking file permissions... [pass] /opt/controlzero is writable
[preflight] Checking clock sync... [pass] Clock offset: +0.3s

[preflight] Result: ALL CHECKS PASSED (10/10)

Postflight Checks

Postflight checks run after installation or upgrade to verify all services are healthy.

Running postflight checks

czctl postflight

Check Reference

CheckWhat It VerifiesFailure Meaning
gateway-healthGateway service responds to health endpointThe gateway container may not have started. Check logs with docker compose logs gateway.
api-healthManagement API responds to health endpointThe API container may not have started. Check logs with docker compose logs api.
policy-enginePolicy engine evaluates a test policy within latency thresholdThe policy engine is not responding. May indicate a configuration or resource issue.
audit-db-writeA test record can be written to and read from the audit databaseDatabase is not accepting writes. Check disk space and container status.
dashboard-accessDashboard is reachable on the configured portThe dashboard container or reverse proxy may not be running.
license-validThe installed license key passes validationLicense key is invalid, expired, or missing. See Licensing.
health-endpointsAll service health endpoints return HTTP 200One or more services are degraded. Check individual service logs.
tls-certTLS certificates are valid and not expiring within 30 daysCertificate is invalid or expiring soon. Renew or regenerate certificates.
scout-connectivityScout agent (if configured) can reach the APINetwork path between Scout and API is blocked. Check firewall rules.

Output format

[postflight] Checking gateway health... [pass] Responding on port 8443
[postflight] Checking API health... [pass] Responding on port 8080
[postflight] Checking policy engine... [pass] Evaluation latency: 1.2ms
[postflight] Checking audit database... [pass] Write/read successful
[postflight] Checking dashboard access... [pass] Accessible on port 443
[postflight] Checking license... [pass] Valid until 2027-04-01
[postflight] Checking health endpoints... [pass] All endpoints returning 200
[postflight] Checking TLS certificate... [pass] Expires in 342 days
[postflight] Checking Scout connectivity... [skip] Scout not configured

[postflight] Result: ALL CHECKS PASSED (8/8, 1 skipped)

Running Checks Manually

Individual checks

Run a single check by name:

czctl preflight --check disk-space
czctl postflight --check gateway-health

Verbose output

For detailed diagnostic information on each check:

czctl postflight --verbose

JSON output

For integration with monitoring systems:

czctl postflight --format json
{
"timestamp": "2026-04-03T10:00:00Z",
"checks": [
{ "name": "gateway-health", "status": "pass", "detail": "Responding on port 8443" },
{ "name": "api-health", "status": "pass", "detail": "Responding on port 8080" }
],
"summary": { "total": 8, "pass": 8, "fail": 0, "skip": 1 }
}

Common Failures and Fixes

CheckCommon CauseFix
disk-spaceDocker images and audit logs consuming spaceRun docker system prune --volumes and configure log rotation
port-availabilityAnother service on the same portStop the conflicting service or change Control Zero ports in docker-compose.yml
clock-syncNo NTP configured in isolated environmentSet up NTP against an internal time source
gateway-healthConfiguration error in gateway.ymlCheck docker compose logs gateway for the specific error
audit-db-writeDatabase volume fullExpand the volume or purge old audit data per your retention policy
license-validExpired license keyApply a new key with czctl update-license per Licensing
tls-certSelf-signed cert expiredRegenerate with czctl generate-ca --domain <domain> --output config/certs/ and redeploy