Astrixion Docs

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:

  1. Docker installed, with its daemon running and Linux containers enabled on Windows;
  2. curl on Linux or macOS, or PowerShell on Windows;
  3. network access to Sonar and the container registry; and
  4. the operator-managed WORKER_BOOTSTRAP_SECRET from 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:

curl -fsSL https://docs.astrixion.ai/run-worker.sh | bash

The launcher prompts for:

  • WORKER_BOOTSTRAP_SECRET without echoing it;
  • the worker image: standard, nuclei, or service-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:

curl -fsSL https://docs.astrixion.ai/run-worker.sh | bash -s -- \
  --backend-url https://sonar.astrixion.ai \
  --type standard \
  --scale 4

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 / macOSWindows PowerShellDefaultPurpose
--backend-url-BackendUrlhttps://sonar.astrixion.aiSonar backend origin.
--secret-Secretinteractive promptWorker bootstrap bearer secret.
--type-Typeinteractive prompt, then standardstandard, nuclei, or service-detection.
--scale-Scaleinteractive prompt, then 1Number of new worker containers to start.
--tags-Tagscanonical worker tagOverride the comma-separated routing tags.
--name-prefix-NamePrefixbbmw-<type>Prefix for generated container names.
--stop-StopoffRemove all workers created by this launcher on the host.

Verify

List the containers created by the launcher:

docker ps --filter label=bbm.run-worker=1

Then follow one container's logs:

docker logs -f <container-name>

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 Published and Running.

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:

curl -fsSL https://docs.astrixion.ai/run-worker.sh | bash -s -- --stop

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.

On this page