Standalone or with a control plane
Run the Synthaea agent on its own, with local alerts only, or connected to a control plane over mTLS: what each mode gives you and how to set it up.
Last updated
The agent detects on the device in both modes. The difference is where the results go and what a fleet adds on top.
| Standalone | With a control plane | |
|---|---|---|
| On-device detection (rules, Sigma, YARA, ML, correlator) | yes | yes |
Local alerts in alerts.ndjson, synthaea-ctl detections | yes | yes |
| Detections and health uploaded over mTLS | no | yes |
| Console: cases, triage, fleet health, notifications | no | yes |
| Content rollout by rings, fleet prevalence | no | yes (as these features land) |
| Readiness | works today | development stack; not production-hardened |
Standalone
This is what you get right after installing a package. The shipped
/etc/synthaea/agent.toml points at a placeholder control plane with
offline_fallback = true: the agent notes that the upload is disabled and keeps
detecting. Nothing leaves the host.
Read what it finds:
sudo synthaea-ctl status # version, uptime, pipeline health
sudo synthaea-ctl health # every attached sensor
sudo synthaea-ctl detections # most recent detections
sudo tail -f /var/log/synthaea/alerts.ndjson
To run the agent by hand, in the foreground, without any upload whatever the configuration says:
sudo /var/lib/synthaea/current/agent run --standalone
agent status checks that the collectors can load without attaching them, which is a
quick way to test a new host.
With a control plane
The control plane is the server repository: one Next.js application, PostgreSQL and an nginx proxy that terminates the agents' mTLS. Today it runs as a development stack with Docker Compose; it is under active development and not hardened for production. Do not expose it to the internet.
1. Start the stack
From the server repository: PostgreSQL, the app on http://localhost:3000 and the mTLS proxy on :8443.
git clone https://github.com/synthaea-lab/server && cd server
cp .env.example .env
./scripts/generate-dev-certs.sh
docker compose up
curl http://localhost:3000/api/health
The certificate script writes a development CA, the proxy's certificate and a test
agent client certificate (agent-test.crt, CN agent-test-001) under certs/. To
reach the stack from another machine, such as a lab VM, name that address when
generating them, because the agent refuses a server name that is not in the
certificate: DEV_CERT_SANS="IP:192.0.2.10" ./scripts/generate-dev-certs.sh.
The development compose file publishes PostgreSQL and the proxy on every interface of
the host. On a shared network, override the published ports as the server's
README-SETUP.md describes.
2. Enroll the agent
The server identifies an agent by its client certificate's common name: an agent record
whose enrollment ID equals that name must exist, or ingest answers
403 Agent not enrolled. The server's
README-SETUP.md
shows how to create it for the test certificate.
3. Point the agent at it
Copy the CA and the client certificate to the endpoint, then fill the [server] section
of agent.toml (see Configuration):
[server]
control_plane_url = "https://192.0.2.10:8443"
mtls_cert = "/etc/synthaea/certs/client.crt"
mtls_key = "/etc/synthaea/certs/client.key"
ca_cert = "/etc/synthaea/certs/ca.pem"
mtls_passphrase = "file:/etc/synthaea/certs/client.key.pass"
offline_fallback = true
Restart the service. To try a server without editing the file, the same values can be passed on the command line:
sudo /var/lib/synthaea/current/agent run --server https://192.0.2.10:8443 \
--ca-cert ca.crt --cert agent-test.crt --key agent-test.key
A server named with --server never receives the client certificate from
agent.toml; pass --cert and --key explicitly.
What happens when the server goes away
Uploads go through an on-disk spool capped by storage.spool_max_mb. When the control
plane is unreachable, detection carries on, the spool fills, and delivery resumes on its
own when the server is back; past the cap the oldest segments are shed and counted in
the health beacon. A certificate or authentication error keeps the backlog and backs off
instead of discarding it, so rotating a certificate does not erase data.