Run Sonar workers on a host
Start standard, nuclei, or service-detection workers without cloning the BBM repository.
The published worker launcher requires Docker and curl. It checks Docker, asks Sonar for registry
access, registers the returned TLS registry with docker login, pulls Sonar's configured worker
image, and starts the requested number of containers. Each container then asks Sonar for its
RabbitMQ and MinIO configuration when it starts.
You do not need a BBM checkout or separate RabbitMQ, MinIO, or registry credentials.
Before you start
The host needs:
- Docker installed, with its daemon running and Linux containers enabled on Windows;
curlon Linux or macOS, or PowerShell on Windows;- network access to Sonar and the container registry; and
- the operator-managed
WORKER_BOOTSTRAP_SECRETfrom the team credential channel.
The launcher checks whether Docker is installed and reachable. If it is missing or stopped, the launcher prints OS-specific installation or startup instructions and exits without requesting credentials.
Never expose the bootstrap secret
Do not paste the bootstrap secret into docs, chat, source control, or a generated image. The backend requires it to be at least 32 characters.
Start workers
Run the launcher directly from docs.astrixion.ai:
The launcher prompts for:
WORKER_BOOTSTRAP_SECRETwithout echoing it;- the worker image:
standard,nuclei, orservice-detection; and - the number of workers to start.
It uses https://sonar.astrixion.ai by default. To use another Sonar deployment or avoid the image
and count prompts, pass those values as arguments:
The secret is still requested interactively. Avoid passing --secret directly unless the shell
history and process list on the host are appropriately protected.
The launcher uses the image tag returned by Sonar, warns when the Docker host is not AMD64, and starts containers with an init process and 1 GiB of shared memory. If any container fails to start, the command exits unsuccessfully and reports the partial count.
| Linux / macOS | Windows PowerShell | Default | Purpose |
|---|---|---|---|
--backend-url | -BackendUrl | https://sonar.astrixion.ai | Sonar backend origin. |
--secret | -Secret | interactive prompt | Worker bootstrap bearer secret. |
--type | -Type | interactive prompt, then standard | standard, nuclei, or service-detection. |
--scale | -Scale | interactive prompt, then 1 | Number of new worker containers to start. |
--tags | -Tags | canonical worker tag | Override the comma-separated routing tags. |
--name-prefix | -NamePrefix | bbmw-<type> | Prefix for generated container names. |
--stop | -Stop | off | Remove all workers created by this launcher on the host. |
Verify
List the containers created by the launcher:
Then follow one container's logs:
Verify that:
- every requested container remains running;
- the log reports successful bootstrap without exposing credentials;
- worker pulses appear in Sonar;
- the workers advertise the expected routing tag; and
- pending tasks for that tag can move to
PublishedandRunning.
Add or remove capacity
Run the launcher again to add more containers. --scale is the number added by that invocation; it
does not resize or replace workers already running on the host.
Remove every worker created by either launcher on the host with:
Stop removes all launcher-managed workers
The stop command matches the shared bbm.run-worker=1 Docker label. It removes standard, nuclei,
and service-detection workers created by the launcher, not only one type.
Troubleshoot
- Docker error: confirm Docker is installed, the daemon is running, and the current user can access it.
- Bootstrap
401: retrieve the current secret through the team credential channel; do not generate a client-only replacement. - Bootstrap/network error: check the Sonar URL, TLS, firewall, DNS, and host reachability.
- Registry login or pull failure: confirm the host can reach the registry returned by Sonar.
- Architecture warning: published worker images target AMD64. Configure supported emulation or move the workers to an AMD64 host if the pulled image cannot run.
- Workers pulse but tasks remain pending: compare the task's target tags with the tags advertised by the workers and check routing capacity.