Quick Start

Get a Beacon instance running end-to-end in under 30 minutes. This guide covers deploying the Worker control plane, running the dashboard, and enrolling your first device.

Prerequisites

Step 1 — Clone the repository

git clone https://github.com/synertek-cloud-services/beacon.git
cd beacon
pnpm install

Step 2 — Create the D1 database

# Create the database in Cloudflare
wrangler d1 create beacon-db

# Copy the database ID from the output and paste it into wrangler.toml
# under [[d1_databases]]

# Apply the schema
wrangler d1 execute beacon-db --file=worker/schema.sql

Step 3 — Configure Worker secrets

# Generate a secure random string for API token signing
wrangler secret put SIGNING_SECRET

# Set the dashboard origin (for CORS)
wrangler secret put DASHBOARD_ORIGIN
# e.g.: https://rmm.yourdomain.com

Step 4 — Deploy the Worker

cd worker
wrangler deploy

The Worker is now live at https://beacon-worker.<your-account>.workers.dev (or your custom domain if configured).

Step 5 — Deploy the dashboard

The dashboard is a static Vite app. Build it and serve it from any static host (Cloudflare Pages, nginx, etc.).

cd ../dashboard
pnpm build
# Output is in dashboard/dist/

Cloudflare Pages (recommended):

wrangler pages deploy dist --project-name=beacon-dashboard

Set the VITE_WORKER_URL environment variable in your Pages project to your Worker URL before building, or enter the Worker URL on the dashboard’s first-run setup screen.

On first load you’ll be prompted to enter your Worker URL and create an admin account.

Step 6 — Enroll your first device

  1. In the dashboard, go to Companies and create a new company
  2. Open the company and click Generate Enrollment Token
  3. Copy the enrollment token
  4. On the target endpoint, download the Beacon agent binary for your platform from the Releases page
  5. Run enrollment:
./beacon-agent --worker-url https://beacon-worker.<account>.workers.dev \
               --enroll-token ent_<your-token>

The device appears in the Beacon dashboard under Devices within 60–90 seconds.

Next steps