Skip to content

Getting Started

Deploy the Cloudflare control plane ($0 free tier), enroll servers, and launch your first workload.

FlareLens runs its serverless control plane inside your own Cloudflare account and executes workloads on your own servers—eliminating both proprietary PaaS markups and dedicated management VMs. Small and medium fleets fit inside Cloudflare’s $0/month Free Tier.

Prerequisites

  • A Cloudflare account (Free or Workers Paid).
  • At least one Linux, macOS, or Windows Server host running Docker Engine (24.0+).

Setup Procedure

  1. Deploy the Control Plane

    Deploy with the 1-click Deploy to Cloudflare button or directly from your terminal using Wrangler:

    Provision Control Planebash
    git clone https://github.com/antwig2/flarelens.git && cd flarelens
    npm install
    
    # Apply D1 SQLite migrations
    npx wrangler d1 migrations apply flarelens-control --remote
    
    # Configure required edge secrets
    npx wrangler secret put INGEST_SECRET        # Shared token for enrolled agents
    npx wrangler secret put DASHBOARD_PASSWORD   # Operator console password
    npx wrangler secret put VAULT_MASTER_KEY     # 32-byte key for AES-256-GCM Vault
    
    # Publish Worker + Operator Console
    npx wrangler deploy
  2. Enroll Your Servers

    Install flarelensd (~15 MB static Go binary) on each VM or bare-metal server. The installer verifies the binary’s SHA-256 digest, writes /etc/flarelens/agent.toml, generates a local Curve25519 WireGuard keypair, and starts the systemd unit.

    Enroll Linux or macOS hostbash
    curl -fsSL https://flarelens.dev/install.sh | sudo bash -s -- \
      --endpoint https://ops.example.com \
      --token "<YOUR_INGEST_SECRET>" \
      --tags "role=app,env=prod,region=eu-central"
    Enroll Windows Server hostpowershell
    irm https://flarelens.dev/install.ps1 | iex

    Within 15 seconds, the host reports Online under Fleet Management with live CPU, RAM, disk, and container metrics.

  3. Launch Your First Workload

    Open your FlareLens console, go to Deployments → + New Service, and choose a 1-click starter template or paste a declarative manifest—no Git repository required:

    checkout-api.ymlyaml
    # $schema: https://flarelens.dev/schemas/fleet.schema.json
    name: checkout-api
    env: prod
    strategy: blue_green
    enabled: true
    
    image: ghcr.io/acme/checkout-api:v1.4.0
    domain: api.example.com
    internal_port: 8080
    health_path: /healthz
    
    placement:
      strategy: spread
      replicas: 2
      required_tags: ["role=app", "env=prod"]
    
    resources:
      memory_mb: 512
      cpu_cores: 1.0

    Saving records immutable revision rev-1 in D1 + R2, schedules replicas across eligible servers, verifies /healthz, and swaps Traefik ingress atomically in under a millisecond.

Type to search…

↑↓ navigate↵ selectEsc close