Skip to content

Getting Started

Time to complete: ~15 minutes (self-hosted) / ~5 minutes (hosted)

BetBlocker blocks gambling sites and apps at the network level on enrolled devices. This guide gets you from zero to a protected device.


  • A running BetBlocker instance (self-hosted) or an account on betblocker.com (hosted)
  • One enrolled and protected device
  • Optionally: an accountability partner linked to your account

RequirementMinimum
Docker24+
Docker Composev2 (bundled with Docker Desktop)
Open ports80 (web), 8443 (API)
RAM1 GB
Disk5 GB

Option B — Self-hosted (build from source)

Section titled “Option B — Self-hosted (build from source)”
RequirementVersion
Rust toolchainSee rust-toolchain.toml
Node.js20+
PostgreSQL16 with TimescaleDB extension
Redis7+

No server required. Create an account and skip to Enrolling Your First Device.


Terminal window
# Clone or download the release
git clone https://github.com/JerrettDavis/BetBlocker.git
cd betblocker/deploy
# Configure
cp .env.example .env
# Edit .env — at minimum set DB_PASSWORD and BETBLOCKER_EXTERNAL_URL
nano .env
# Pull images and start
docker compose up -d
# Verify all five containers are healthy
docker compose ps

Expected output — all services should show healthy:

NAME STATUS
betblocker-api-1 Up (healthy)
betblocker-worker-1 Up (healthy)
betblocker-web-1 Up (healthy)
betblocker-db-1 Up (healthy)
betblocker-cache-1 Up (healthy)

If a service is unhealthy, check its logs: docker compose logs api


Run the setup wizard once after first boot:

Terminal window
docker compose exec api /betblocker-api setup

Alternatively, run the bundled helper script:

Terminal window
../scripts/setup.sh

The setup wizard will:

  1. Run database migrations
  2. Generate cryptographic keys (JWT signing, blocklist signing, device CA)
  3. Prompt you to create the first admin account
  4. Perform an initial sync from the community blocklist feed (https://feed.betblocker.org/v1)

Save the admin credentials securely. They are not recoverable without direct database access.

Open https://your-server:8443/v1/blocklist/version in a browser or with curl:

Terminal window
curl -s https://your-server:8443/v1/blocklist/version | jq .
# {"version": 1, "entry_count": 12345, "updated_at": "..."}

Log in to the web dashboard at http://your-server (or https://betblocker.com for hosted).

Navigate to Admin > Blocklist to:

  • Review what domains are currently blocked
  • Add domains manually if needed
  • Enable or disable the community feed sync

The community feed syncs automatically. The background worker refreshes it on a schedule — no manual action required after initial setup.


From the web dashboard:

  1. Go to Devices > New Enrollment
  2. Choose your enrollment tier:
    • Self — you control unenrollment (with a configurable time delay)
    • Partner — an accountability partner must approve unenrollment
  3. Copy the enrollment token or QR code

Download the agent for your platform from the dashboard or your server’s download page:

PlatformInstaller
Windows.msi installer
macOS.pkg installer
Linuxsystemd package (.deb / .rpm)
AndroidAPK via Play Store or sideload
iOSApp Store (requires MDM for Authority tier)

See the platform guides for platform-specific installation steps.

During agent installation, enter:

  • Server URL: your BETBLOCKER_EXTERNAL_URL (or https://betblocker.com for hosted)
  • Enrollment token: from Step 1

The agent will:

  1. Register the device with the server
  2. Download the blocklist
  3. Install itself as a system service
  4. Begin blocking immediately

In the dashboard, the device should appear under Devices with status Active and a recent heartbeat timestamp within 60 seconds.

Test blocking works:

# On the enrolled device, try resolving a known gambling domain
nslookup betway.com
# Should return NXDOMAIN or the interstitial IP

An accountability partner can see your device status, receive tamper alerts, and must approve any unenrollment request (if you enrolled under the Partner tier).

  1. Go to Partners > Invite Partner
  2. Enter their email address
  3. They receive an invitation email with a link to create an account or log in
ItemPartner can see
Device online/offline statusYes
Last heartbeat timestampYes
Block attempt count (aggregated)Yes
Individual blocked domainsOnly with your explicit consent
Your browsing historyNever

Partners cannot modify your enrollment configuration — they can only approve or deny unenrollment requests.