Skip to main content

Docker Compose Deployment

Deploy Watchlight Beacon on any Linux or macOS host using Docker Compose. This is the fastest path from zero to a running control plane.

Prerequisites

RequirementDetails
Docker Engine 24+Install Docker
Docker Compose v2Included with Docker Desktop; or install separately
2 GB RAM minimum4 GB recommended for Tier 2, 8 GB for Tier 3
GHCR access tokenGitHub PAT with read:packages scope (provided by Watchlight AI)
curl, opensslRequired by the installer script

Quick Start with the Beacon Installer

The self-contained installer (install-beacon.sh) is the recommended way to deploy Beacon with Docker Compose. It embeds all configuration files, manages secrets via OpenBao, and handles TLS setup automatically.

Download and Install

# Download the installer
curl -fsSL https://docs.watchlight.ai/install-beacon.sh -o install-beacon.sh
chmod +x install-beacon.sh

# Run the installer (interactive prompts)
./install-beacon.sh --ghcr-token <your-ghcr-token>

The installer will:

  1. Validate prerequisites (Docker version, Compose, available ports)
  2. Pull container images from GHCR
  3. Generate secrets in memory and store them in OpenBao (never written to disk)
  4. Start PostgreSQL and OpenBao infrastructure
  5. Start all Beacon application services
  6. Register a discovery scanner
  7. Configure TLS via Caddy reverse proxy
  8. Verify all containers are healthy

Non-Interactive Mode

Set environment variables to skip interactive prompts:

export BEACON_DOMAIN=beacon.company.com
export VERSION=0.3.0-preview
export GHCR_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
./install-beacon.sh

Deployment Profiles

The installer supports three profiles to match your deployment scenario.

ProfileUse CaseTLSDatabaseSecret Provider
eval (default)Evaluation and developmentCaddy auto-TLS (self-signed or Let's Encrypt)Embedded PostgreSQLEmbedded OpenBao
productionEnterprise productionService-level TLS (BYO certs)External database (BYO)AWS Secrets Manager, Azure Key Vault, or env
production-caddySmaller productionCaddy auto-TLSExternal database (BYO)AWS Secrets Manager, Azure Key Vault, or env
note

Caddy and OpenBao are optional infrastructure components included for convenience in evaluation. Production deployments (production profile) do not require either — you bring your own TLS certificates and secret provider (AWS Secrets Manager, Azure Key Vault, or environment variables).

Evaluation Profile

./install-beacon.sh --profile eval --ghcr-token <token>

Deploys all services with embedded infrastructure (PostgreSQL, OpenBao, Caddy). Uses self-signed TLS by default. Set a real domain for automatic Let's Encrypt certificates:

./install-beacon.sh --profile eval --domain beacon.company.com --ghcr-token <token>

Production Profile

./install-beacon.sh --profile production \
--tls-cert /path/to/cert.pem \
--tls-key /path/to/key.pem \
--ghcr-token <token>

Uses your own TLS certificates and external database. No Caddy proxy -- services handle TLS directly.

Production with Caddy

./install-beacon.sh --profile production-caddy \
--domain beacon.company.com \
--ghcr-token <token>

Caddy handles TLS termination, but uses an external database rather than the embedded PostgreSQL.

Tier-Based Deployment

The installer deploys Tier 1 services by default. Higher tiers will be configurable as Tier 2 and Tier 3 images become available in the installer.

TierServices Deployed
Tier 1wl-registry, wl-registry-frontend, wl-discover, postgresql, openbao, caddy
Tier 2Tier 1 + wl-apdp, wl-apdp-frontend
Tier 3Tier 2 + wl-proxy, wl-secrets-broker

Installer CLI Reference

Install Flags

FlagDefaultDescription
--ghcr-token TOKEN(prompt)GHCR access token for image pulls
--profile PROFILEevalDeployment profile: eval, production, production-caddy
--domain DOMAINsystem hostnameDomain name for TLS certificates
--version TAG0.3.0-previewContainer image version tag
--license-key KEY(none)Watchlight license key (JWT)
--log-level LEVELinfoLog level: debug, info, warn, error
--registry-port PORT8443HTTPS port for the registry dashboard
--install-dir PATH/opt/watchlight-beaconInstallation directory
--agent-reg-mode MODEopenAgent registration: open, token_required, disabled
--tls-cert PATH(none)TLS certificate (production profile)
--tls-key PATH(none)TLS private key (production profile)

Operations

FlagDescription
--statusShow container states, health, and access URLs
--upgradePull new images and restart services (preserves data)
--uninstallStop all containers and remove volumes and install directory

Environment Variables

Key environment variables used by Beacon services:

VariableServiceDescription
DATABASE_URLwl-registryPostgreSQL connection string
HOSTwl-registryBind address (default 0.0.0.0)
PORTwl-registryListen port (default 8080)
LOG_LEVELall servicesLog verbosity
REGISTRY_URLwl-discoverURL of the wl-registry API
AGENT_IDwl-discoverScanner agent identity
AGENT_REGISTRATION_MODEwl-registryopen, token_required, disabled
WL_LICENSE_KEYall servicesLicense key for production use

TLS Architecture

All external traffic is encrypted by default:

  • Caddy profiles: Caddy terminates TLS and reverse-proxies to backend services
  • Production profile: Each service handles TLS directly using provided certificates
  • Internal traffic: OpenBao and PostgreSQL use self-signed TLS on an isolated Docker network
  • Self-signed mode: Set domain to localhost; Caddy generates self-signed certs and exports a CA cert to ./beacon-ca.crt
  • Let's Encrypt: Set a public domain and ensure ports 443/80 are accessible

Common Operations

# View all service logs
docker compose -f docker-compose.yml logs -f

# View logs for a specific service
docker compose -f docker-compose.yml logs -f wl-registry

# Stop services (preserves data)
docker compose -f docker-compose.yml down

# Restart after reboot
docker compose -f docker-compose.yml up -d

# Check status via the installer
./install-beacon.sh --status

# Upgrade to a new version
./install-beacon.sh --upgrade --version 0.4.0 --ghcr-token <token>

# Full reset (destroys all data)
./install-beacon.sh --uninstall

Troubleshooting

IssueSolution
docker login returns unauthorizedVerify your GHCR token has read:packages scope
Port conflict on 8443Use --registry-port to change the default
Browser certificate warningTrust the CA cert exported to ./beacon-ca.crt, or use curl -k
Services fail to startCheck logs: docker compose -f docker-compose.yml logs
wl-discover not finding containersEnsure target containers are on the beacon-partner Docker network
Database connection errorsCheck PostgreSQL health: docker inspect beacon-postgres --format='{{.State.Health.Status}}'
License expiredContact sales@watchlight.ai for renewal

Next Steps