Local File Storage
You can run LenserFight locally without installing Docker or setting up Supabase. In local mode the web app stores all data in the browser's IndexedDB — no filesystem setup required. The CLI writes auth tokens to ~/.lenserfight/lenserfight.json, which it creates automatically on first use.
Use this path to:
- Try LenserFight before committing to a full deployment
- Develop and test lenses offline
- Use CLI commands without a cloud connection
What works in local mode
| Feature | Local mode | Requires Supabase |
|---|---|---|
| Create and edit lenses | ✅ | — |
| Run lenses locally (BYOK) | ✅ | — |
CLI commands (lf run, lf lens, lf publish) | ✅ | — |
| Workflow authoring | ✅ | — |
| Local agent definitions | ✅ | — |
| Multi-user access | — | ✅ |
| Auth (login / sessions) | — | ✅ |
| RLS-enforced data isolation | — | ✅ |
| Production media uploads | — | ✅ |
| Sync to LenserFight Cloud | — | ✅ |
Prerequisites
- Node.js 20+
- pnpm
- The LenserFight repository cloned
Setup
Two commands from the repository root — that's the full setup:
# 1. Install dependencies
pnpm install --frozen-lockfile
# 2. Create the env file and start the app
cat > .env.local << 'EOF'
DATA_SOURCE=file
WEB_BASE_URL=http://localhost:3000
API_URL=http://localhost:8786
EOF
pnpm nx run web:serveThe app starts at http://localhost:3000. Supabase is not contacted. Lenses and workflows are stored in IndexedDB — no directories to create.
.env.localis gitignored — it won't be committed.
Create your first lens
- Open
http://localhost:3000 - Navigate to Lenses → New Lens
- Enter a title and prompt content
- Save
The lens is persisted in IndexedDB in your browser.
Migrating to Supabase later
When you're ready to use the full cloud stack:
Install and start Supabase:
bashpnpm supabase start pnpm supabase:db:resetUpdate
.env.local:bashDATA_SOURCE=supabase SUPABASE_URL=http://127.0.0.1:54321 SUPABASE_ANON_KEY=<your-local-anon-key>Import any local lenses using the CLI:
bashlf lens import --from ~/.lenserfight/lenses/Restart the app.
Where data lives
| Layer | Storage |
|---|---|
| Lenses, workflows, agents (web app) | Browser IndexedDB — origin http://localhost:3000 |
| Auth tokens, developer tokens (CLI) | ~/.config/lenserfight/config.json (Linux/Pardus) · ~/Library/Application Support/lenserfight/config.json (macOS) · %APPDATA%\lenserfight\config.json (Windows) — created by lf init or lf auth login |
| Keychain secrets (CLI, CI) | OS keychain, or ~/.lenserfight/gateway/keys/ when LF_GATEWAY_KEY_FILE_FALLBACK=1 |
Related
- Storage Adapters Reference — full adapter interface spec and design
- Installation — full Supabase setup (Option A)
- Environment Variables — all
DATA_SOURCEoptions - Local Database Setup — Supabase local setup and schema