virling Docs
v0.3.0 virling.com GitHub Start free
virling Docs

Environment variables

Every setting can be given as a flag or an environment variable. See CLI for the flags.

VariableDefaultWhat it does
VIRLING_DATA./virling-dataFolder for virling.sqlite, events.duckdb and secret.key. /data in the Docker image.
VIRLING_ADDR0.0.0.0:8080Address and port to listen on.
VIRLING_APPfalseServe sign-in and the app, and run payment sync.
VIRLING_HOSTEDfalseRun as the hosted service, where Agency teams can add seats past the 3 included. Off, a team is capped at 3 users.
VIRLING_BASE_URLhttp://localhost:8080Public URL, used in sign-in links and script snippets. No trailing slash needed. With https:// and no path, such as https://stats.example.com, apps such as claude.ai can connect to the MCP server with OAuth sign-in. With a path, such as https://example.com/virling, sign-in is off and apps connect with an API key.
VIRLING_SECRET_KEYunset64 hex characters that encrypt provider keys. Unset: secret.key in the data folder is used, and created if missing.
VIRLING_TRUST_PROXYfalseRead the client IP from X-Forwarded-For, and trust Cloudflare’s cf-* headers from a proxy on this host or a private network, such as cloudflared. Only behind a proxy you control.
VIRLING_EVENTS_PER_SECOND200Events accepted per site per second.
VIRLING_SMTP_URLunsetSMTP URL for sign-in emails, such as smtps://user:pass@smtp.example.com:465. Unset: emails are logged.
VIRLING_MAIL_FROMVirling <login@virling.com>Sender for sign-in emails.
VIRLING_TURNSTILE_SITE_KEYunsetCloudflare Turnstile site key. With the secret, the sign-in form asks visitors to pass a Turnstile check before a link is emailed. Unset: no check.
VIRLING_MCP_URLunsetOptional separate https origin with no path, such as https://mcp.example.com, that serves only the MCP server. The app and sign-in stay on VIRLING_BASE_URL.
VIRLING_TURNSTILE_SECRETunsetCloudflare Turnstile secret key. Needs the site key too. When the check is on and Cloudflare cannot confirm a visitor, no link is sent. The widget must be created for the hostname of VIRLING_BASE_URL.
VIRLING_SELF_TRACK_SITEunsetA site tracked on this server, such as virling.com. When set, the sign-in page loads <VIRLING_BASE_URL>/v.js for that site, so visits that start on the sign-in page are counted, and a new account keeps the visitor ID it signed up from. Unset: the sign-in page loads no script.
VIRLING_MARKETINGfalseServe the virling.com landing pages and waitlist.
VIRLING_WAITLIST_FROMRahul at Virling <hello@virling.com>Sender for waitlist emails.
VIRLING_OPENAI_KEYunsetOpenAI key every site’s AI answers ask ChatGPT with.
VIRLING_ANTHROPIC_KEYunsetAnthropic key for Claude in AI answers.
VIRLING_PERPLEXITY_KEYunsetPerplexity key for AI answers.
VIRLING_GEMINI_KEYunsetGoogle Gemini key for AI answers.
VIRLING_OPENROUTER_KEYunsetOpenRouter key for AI answers, used for each assistant without its own key.
VIRLING_APPLICATIONS_URLunsetURL of the website’s applications feed, listed in the admin panel.
VIRLING_APPLICATIONS_TOKENunsetBearer token for the applications feed.
VIRLING_AI_ANSWERS_BUDGET_USDunsetEstimated USD a month after which AI answer runs pause until the next month. Unset: no cap.
VIRLING_DODO_API_KEYunsetDodo Payments API key that bills the hosted plans. Needs VIRLING_HOSTED and the Dodo variables below. Unset: no billing.
VIRLING_DODO_API_URLhttps://live.dodopayments.comDodo API to call. https://test.dodopayments.com for test mode.
VIRLING_DODO_WEBHOOK_SECRETunsetSigning secret of the Dodo webhook that points at /api/webhooks/dodo.
VIRLING_DODO_PERSONAL_PRODUCTunsetDodo subscription product for Personal.
VIRLING_DODO_AGENCY_PRODUCTunsetDodo subscription product for Agency.
VIRLING_DODO_SEAT_ADDONunsetDodo add-on billed for each Agency user past the 3 included.
VIRLING_DODO_PERSONAL_FOUNDING_PRODUCTunsetDodo product for Personal at the founding price, $11.40 a month.
VIRLING_DODO_AGENCY_FOUNDING_PRODUCTunsetDodo product for Agency at the founding price, $29 a month.
VIRLING_FOUNDERS_URLhttps://virling.com/api/foundersWhere sign-up looks up founding pre-orders by email.
VIRLING_FOUNDERS_TOKENunsetBearer token for that lookup, the same as the virling.com worker’s FOUNDERS_TOKEN secret.
RUST_LOGinfoLog level and filter, such as debug or virling=debug.

VIRLING_MARKETING, VIRLING_WAITLIST_FROM and the VIRLING_DODO_* variables exist for virling.com and the hosted service. A self-hosted server does not need them.

Minimal production set

VIRLING_DATA=/var/lib/virling
VIRLING_BASE_URL=https://stats.example.com
VIRLING_APP=true
VIRLING_TRUST_PROXY=true
VIRLING_SMTP_URL=smtps://user:pass@smtp.example.com:465
VIRLING_MAIL_FROM=Virling <stats@example.com>

Connect your payment provider and see revenue by channel.

Start free
Was this page helpful?No Edit this page on GitHub