The server reads everything from environment variables (12-factor). Defaults are safe for
local development; BISCUIT_ENV=production additionally refuses to start with the dev token secret.
Settings are named BISCUIT_*. Each one also accepts its old PUKU_* name (e.g. PUKU_ROLE) when the BISCUIT_ variable isn't set, so deployments from before the rename keep working.
Server
| Variable |
Default |
Purpose |
BISCUIT_ENV |
development |
development (text logs) · production (JSON logs, strict checks) · test |
BISCUIT_ADDR |
:8080 |
Listen address. |
BISCUIT_ROLE |
all |
api (HTTP only) · worker (routine scheduler only) · all (both). |
DATABASE_URL |
postgres://biscuit@localhost:5432/biscuit?sslmode=disable |
PostgreSQL 14+ connection string. Use sslmode=require in production. |
BISCUIT_DB_MAX_CONNS |
20 |
Pool size per process (≥ 2; one connection is reserved for LISTEN). Keep replicas × this below Postgres max_connections. |
BISCUIT_TOKEN_SECRETS |
dev secret |
Comma-separated HMAC keys, each ≥ 32 bytes. First signs, all verify — prepend a new key to rotate, remove the old one after BISCUIT_TOKEN_TTL. |
BISCUIT_TOKEN_TTL |
720h |
Session lifetime. |
BISCUIT_CORS_ORIGINS |
http://localhost:5173,tauri://localhost,http://tauri.localhost |
Comma-separated browser origins allowed to call the API. |
Models and search
| Variable |
Default |
Purpose |
GROQ_API_KEY |
— |
Enables live model replies. Empty → offline echo model (dev/CI). |
GROQ_MODEL |
openai/gpt-oss-120b |
Groq's default model: for new bots when Gemini isn't set, and the fallback when another provider fails. |
GEMINI_API_KEY |
— |
Google Gemini (AI Studio). Set → gemini-* models run on Gemini, new bots start on GEMINI_MODEL, and Gemini and Groq cover for each other. |
GEMINI_MODEL |
gemini-3.5-flash-lite |
Default model for new bots when GEMINI_API_KEY is set; Groq's fallback model. |
BISCUIT_SEARCH_KEY |
— |
Web search for bots' web_search tool: a Brave Search API key (default) or a Tavily key. Without one, search uses Gemini's Google Search grounding with GEMINI_API_KEY (free tiers have small quotas); with neither, bots search on their computer. |
BISCUIT_SEARCH_PROVIDER |
brave |
brave or tavily: which API BISCUIT_SEARCH_KEY belongs to. |
BISCUIT_AUTO_REVIEW |
off |
on: a separate model reviews writes an Allow automatically rule would let run on their own, and asks the user instead when an action doesn't clearly serve their request (e.g. instructions injected by a page or email). |
BISCUIT_LLM_BASE_URL |
— |
Our own OpenAI-compatible model server (vLLM, SGLang, TGI, Ollama), e.g. http://vllm:8000/v1. |
BISCUIT_LLM_API_KEY |
— |
Key for that server, if it needs one (no Authorization header is sent when empty). |
BISCUIT_LLM_NAME |
puku |
Provider name for that server in metrics and llm_usage rows. |
BISCUIT_LLM_MODELS |
— |
Models served there: exact names, or prefixes ending in - or /. Everything else goes to Groq, which also answers when our server fails before replying. Required when both a base URL and a Groq key are set. Any OpenAI-compatible host works; models that should appear in the app also need an entry in apps/web/src/lib/models.ts. |
BISCUIT_LLM_CONCURRENCY |
32 |
Max concurrent upstream model streams per process. |
Limits and plan
| Variable |
Default |
Purpose |
BISCUIT_REPLY_BACKLOG |
512 |
Max replies in flight per process; beyond it POST /messages returns 503 + Retry-After. |
BISCUIT_RATE_RPS |
20 |
Sustained requests/second per user (or IP). Per process. |
BISCUIT_RATE_BURST |
60 |
Burst size per user. |
BISCUIT_MAX_BODY_BYTES |
1048576 |
Request body cap. |
BISCUIT_PLAN_TOKENS |
2000000 |
Monthly model-token allowance per workspace; Usage and the sidebar show use against it. |
Secrets and MCP
| Variable |
Default |
Purpose |
BISCUIT_GITHUB_REPOS |
— |
Repos (owner/name, comma-separated) the GitHub pull request tools may touch. Empty → any repo the connected token can reach. |
BISCUIT_SEAL_KEY |
first token secret |
Encrypts connected-app tokens and Vault logins at rest. Set it explicitly in production: changing it (or rotating token secrets while unset) makes stored tokens unreadable, and apps must be reconnected and Vault logins saved again. |
BISCUIT_MCP_STDIO |
off |
on lets workspace owners/admins connect stdio MCP servers, which run as processes on the API host. See CAPABILITIES.md. |
BISCUIT_MCP_ALLOW_PRIVATE |
off |
on allows MCP connections to private-network or plain-HTTP endpoints (blocked by default). |
Email and links
| Variable |
Default |
Purpose |
BISCUIT_SMTP_URL |
— |
smtp://user:pass@host:587 (STARTTLS) for password resets, invites and support emails. Unset: each email is written to the log instead of sent (development). |
BISCUIT_MAIL_FROM |
— |
Sender address; required with SMTP. |
BISCUIT_APP_URL |
http://localhost:5173 |
The web app's public address, used for links in emails (/reset/…, /invite/…). |
BISCUIT_SUPPORT_EMAIL |
— |
Where support requests are emailed (Reply-To is the sender). Unset: requests are only stored and logged. |
BISCUIT_PUBLIC_URL |
http://localhost:8080 |
This API's public address. OAuth callbacks are {BISCUIT_PUBLIC_URL}/v1/oauth/{google,github}/callback. |
Voice
| Variable |
Default |
Purpose |
BISCUIT_STT_MODEL |
whisper-large-v3-turbo |
Voice chat: speech to text (Groq; needs GROQ_API_KEY). |
BISCUIT_TTS_MODEL, BISCUIT_TTS_VOICE |
playai-tts, Celeste-PlayAI |
Voice chat: the bots' spoken replies (Groq). Without GROQ_API_KEY the app uses the device's own speech. |
Accounts and events
| Variable |
Default |
Purpose |
BISCUIT_GOOGLE_CLIENT_ID, BISCUIT_GOOGLE_CLIENT_SECRET |
— |
“Continue with Google”. Both set → the option appears on the sign-in screen. |
BISCUIT_GITHUB_CLIENT_ID, BISCUIT_GITHUB_CLIENT_SECRET |
— |
“Continue with GitHub”. Both set → the option appears. |
BISCUIT_INBOUND_DOMAIN |
— |
Email-triggered routines: each workspace receives mail at <slug>@<domain>. Point your provider's inbound parse (Postmark, Mailgun or SendGrid) at POST /v1/inbound/email. Empty → off. |
BISCUIT_SLACK_SIGNING_SECRET |
— |
Slack-triggered routines: your Slack app's signing secret. Set the Events API request URL to POST /v1/inbound/slack. Empty → off. |
BISCUIT_GITHUB_WEBHOOK_SECRET |
— |
GitHub-triggered routines: the webhook secret; point the webhook (JSON) at POST /v1/inbound/github. Empty → off. |
Shutdown and logs
| Variable |
Default |
Purpose |
BISCUIT_SHUTDOWN_GRACE |
20s |
Time to drain in-flight requests on SIGTERM. |
BISCUIT_LOG_LEVEL |
info |
debug · info · warn · error. |
The bots' computers
| Variable |
Default |
Purpose |
BISCUIT_COMPUTER |
auto |
Live browser for bots: auto (on when Chrome is found) · on (fail startup without Chrome) · off. |
BISCUIT_CHROME_PATH |
auto-detect |
Chrome/Chromium binary. |
BISCUIT_COMPUTER_MAX |
4 |
Concurrent browsers per process (≈ 150–300 MB each). |
BISCUIT_COMPUTER_MAX_AGE |
30m |
Hard limit on one browser session. |
BISCUIT_COMPUTER_MAX_STEPS |
40 |
Steps a bot takes on its computer before it checks in and asks whether to keep going. |
BISCUIT_COMPUTER_HARD_MAX_STEPS |
200 |
Absolute cap on steps for one task, however many times you say keep going. |
BISCUIT_COMPUTER_DENY_HOSTS |
— |
Comma-separated hosts the agent may never open (suffix match). |
BISCUIT_CHROME_NO_SANDBOX |
off |
Set 1 only where Chrome's sandbox can't run (some containers; Ubuntu 23.10+ with a Chromium that lacks the setuid sandbox). Weakens isolation from visited pages — prefer Google Chrome, which ships the setuid sandbox. |
BISCUIT_COMPUTER_PROXY |
— |
Egress proxy for agent browsers, e.g. http://proxy:3128. |
BISCUIT_COMPUTER_BACKEND |
chrome |
Where browsers run: chrome (one local process per task) · remote (an existing CDP browser). |
BISCUIT_COMPUTER_CDP_URL |
— |
remote only, required: ws:// or wss:// URL. {owner} and {session} are filled per task, e.g. ws://controld:9300/v1/computers/{owner}/cdp (see COMPUTERS.md). Several, comma-separated, spread workspaces over hosts. Lightpanda needs --advertise-host set to the name in this URL. |
BISCUIT_COMPUTER_CDP_TOKEN |
— |
remote only: bearer token sent on connect (controld's CONTROLD_TOKEN). |
BISCUIT_COMPUTER_CDP_NAME |
remote |
remote only: backend name in logs, e.g. lightpanda. |
BISCUIT_COMPUTER_ISOLATED |
off |
remote only: set 1 when the remote host filters egress itself; skips the in-page network guard. |
Memory limit
| Variable |
Default |
Purpose |
GOMEMLIMIT |
512MiB (set in code if unset) |
Go soft memory limit; set to ~90% of the container limit. |
Web and desktop builds
Read by Vite at build time.
| Variable |
Purpose |
VITE_API_URL |
Base URL of the API. Set → the app asks you to sign in and runs on the server: bots, chats (streamed replies) and routines are saved and sync live across tabs and devices. Unset → the app runs on its built-in demo data. |
VITE_GROQ_API_KEY |
Local-only direct model calls (never deploy a build with it). |
VITE_SITE_URL |
The Biscuit website, opened by the logo in the app. Defaults to the deployed site. |
VITE_CHAT_URL |
Chat proxy URL. Default /api/chat (same origin); desktop builds set the deployed proxy, e.g. https://chat.puku.sh/api/chat. |
The desktop app (apps/desktop) uses the same variables at build time. Its origins are
tauri://localhost (macOS, Linux) and http://tauri.localhost (Windows): add them to the API's
BISCUIT_CORS_ORIGINS when a desktop build calls the API.
Chat proxy (website)
Set in the Vercel project that serves the website (apps/site/api/chat.js, the same handler as apps/web/api/chat.js); it answers at https://biscuits-bot.vercel.app/api/chat.
| Variable |
Default |
Purpose |
GROQ_API_KEY |
— |
Server-side key for /api/chat. Unset → GET /api/chat answers {configured: false} and the apps keep demo replies. |
GROQ_MODEL |
openai/gpt-oss-120b |
The model every proxied request runs on (the client's model is ignored). |
Phone app builds
Read by Expo when it bundles apps/mobile (put them in apps/mobile/.env or the EAS profile).
| Variable |
Purpose |
EXPO_PUBLIC_CHAT_URL |
The chat proxy on your deployed site, e.g. https://<your-site>/api/chat. Use this for any build you hand to someone: the key stays on the server. |
EXPO_PUBLIC_GROQ_API_KEY |
Calls Groq straight from the phone. Local testing only: the key ships inside the app. Takes precedence over the proxy. |
EXPO_PUBLIC_GROQ_MODEL |
Default model for the direct key (default openai/gpt-oss-120b); the in-app model picker can change it per chat. |
EXPO_PUBLIC_BUILD |
Set to development by the development EAS profile. |
Desktop releases
| Variable |
Purpose |
TAURI_SIGNING_PRIVATE_KEY |
Signs auto-updates in npm run release:desktop (falls back to ~/.tauri/biscuit-updater.key). |
DESKTOP_API_URL |
API the release build points at (default none: the app asks at sign-in). |
DESKTOP_CHAT_URL |
Chat proxy for the release build (default https://biscuits-bot.vercel.app/api/chat). |
UPDATES_REPO |
Public repository that hosts latest.json, the update and the DMG (default nibir404/biscuit-releases). |
Sign in with Google and GitHub
Both are optional; the sign-in screen shows each one the server has credentials for, above email.
Google — Google Cloud console → Create credentials →
OAuth client ID → Web application. Authorized redirect URI: {BISCUIT_PUBLIC_URL}/v1/oauth/google/callback
(locally http://localhost:8080/v1/oauth/google/callback). Configure the consent screen with the email
and profile scopes. For Gmail as a connected app, also add the redirect URI {BISCUIT_PUBLIC_URL}/v1/connect/gmail/callback and the scopes gmail.readonly and gmail.send (Google reviews apps that use them before going public). Put the client ID and secret in BISCUIT_GOOGLE_CLIENT_ID / _SECRET.
GitHub — Developer settings → OAuth Apps → New OAuth App.
Authorization callback URL: {BISCUIT_PUBLIC_URL}/v1/oauth/github/callback. Generate a client secret, and
set BISCUIT_GITHUB_CLIENT_ID / _SECRET.
How accounts match: the same Google/GitHub account always signs into the same user; otherwise a
provider-verified email that already has a Biscuit account signs into it (and links it); otherwise a
new account with the starter crew is created. People who signed up this way have no password until
they set one with “Forgot password?”. The web app returns to {its address}/auth/callback; the
desktop app signs in through the system browser and picks the session up when it's done; the page there
has an “Open Biscuit” button (the app's biscuit:// link) to switch back.