Overview
A self-hosted Forager deployment consists of four components:Prerequisites
Before starting, ensure the following are available on your server:Step 1 — Deploy Supabase
Self-hosted Supabase runs as a Docker Compose stack.Clone the Supabase Docker setup
Configure the .env file
.env and set the following. Generate secure random values for secrets — do not reuse the example values.ANON_KEY and SERVICE_ROLE_KEY must be valid JWTs signed with your JWT_SECRET, not raw random strings. Use the Supabase self-hosting JWT generator at supabase.com/docs/guides/self-hosting#api-keys to generate them correctly..env:Start Supabase
http://your-server-ip:3000 to verify Supabase is running before continuing.Set your public Supabase URL
SUPABASE_URL for all subsequent steps is https://your-server-ip:8000 or, if you put a reverse proxy in front, https://supabase.yourcompany.com. Make a note of it — you’ll need it in every step below.Step 2 — Run Database Migrations
Forager’s schema is managed as ordered SQL migrations. Apply them using the Supabase CLI against your self-hosted instance.Get the Forager migration bundle
supabase/migrations/, numbered chronologically. Do not skip or reorder them.Link the CLI to your instance
Verify the schema
companies, profiles, location_nodes, assets, anchor_snapshots, attestations, webhooks, sprints, site_memberships.Step 3 — Deploy Edge Functions
Forager uses five Edge Functions (Deno). Deploy them using the Supabase CLI.Deploy all functions
--project-ref with your self-hosted API URL:Set function secrets
Step 4 — Configure Supabase Auth
Enable email auth
Set redirect URLs
- Site URL:
https://forager.yourcompany.com - Additional redirect URLs:
https://forager.yourcompany.com/**
Configure invite email template (optional)
Step 5 — Configure Storage
The floor plan images uploaded by admins are stored in a Supabase Storage bucket.Verify the bucket exists
20260506000004_floor_plans_bucket.sql creates the floor-plans bucket and its RLS policies automatically. In Studio → Storage, confirm the bucket exists and is set to private (not public).Verify storage policies
20260511000001_floor_plans_update_delete_policies.sql adds update and delete policies. If you see permission errors when admins upload floor plans, re-apply these two migration files.Step 6 — Deploy the Web Dashboard
The web dashboard is a Next.js application.Get the dashboard source
forager-web source bundle from Harbingers.Install dependencies
Create the .env.local file
Build and start
Set up a reverse proxy
forager.yourcompany.com) at the Next.js process using nginx or Caddy. Example nginx config:Step 7 — Get Your Custom Android APK
The Android app has your Supabase URL and anon key compiled into the binary. You cannot use the standard APK from the Harbingers downloads page. Harbingers builds a signed APK for your deployment using an automated pipeline — no manual compilation step is required on your end.Contact Harbingers to trigger your build
- Your
SUPABASE_URL - Your
SUPABASE_ANON_KEY - Your organisation name or a short identifier (used as the
customer_idin your build) - Your desired license expiry date in
YYYY-MM-DDformat
Receive and install your download link
forager-<customer-id>-v<version>.apk.Download the APK before the link expires. If the link expires, contact support — a new link can be generated from the same build at any time.Distribute the APK
- Your MDM solution (recommended for fleet management)
- An internal file share or intranet download page
- Direct side-load using
adb install forager-<customer-id>-v<version>.apk
License expiry
Each self-hosted APK is built with a hard-coded expiry date. When the app launches after the expiry date:- A full-screen lock screen appears with the expiry date and instructions to contact support
- All navigation is blocked — the back button does not dismiss the screen
- The lock applies on every launch, even if the device is offline
Step 8 — First Login and Provisioning
Log in as super admin
https://forager.yourcompany.com/admin. Sign in with the email address you set as SUPER_ADMIN_EMAIL. This automatically provisions your internal admin company and grants you admin access in the app.Create your first company
Accept the invite and sign in to the app
Ongoing Operations
Backups
Back up the Postgres database regularly. The Supabase Docker stack stores data in a named volume (supabase_db_data). A simple pg_dump approach: