This guide is the canonical reference for the smallest environment-variable sets needed to run Von locally, test safely, and stand up a minimal cloud development environment.
If MongoDB is already running locally and you are happy with the default local Ollama path, Von can start without any explicit environment variables because:
MONGO_URIdefaults tomongodb://localhost:27017/VON_DB_NAMEdefaults tovon_db- the active LLM provider falls back to Ollama when no explicit remote provider is configured
For an explicit local shell, use:
$env:MONGO_URI = 'mongodb://localhost:27017/'
$env:VON_DB_NAME = 'von_db'If you do not want to rely on local Ollama defaults, add one provider option:
$env:OPENAI_API_KEY = '<YOUR-OPENAI-KEY>'
# or
$env:GEMINI_API_KEY = '<YOUR-GEMINI-KEY>'
# or
$env:OLLAMA_HOST = 'http://<host>:11434'GEMINI_API_KEY is the primary Gemini variable. Von also accepts the legacy
GOOGLE_API_KEY name for compatibility, but new setups should use
GEMINI_API_KEY.
Von does not have a separate local/cloud switch for MongoDB. It inspects the
effective Mongo URI host and logs one of:
Connecting to LOCAL MongoDB at ...Connecting to REMOTE MongoDB at ...
That means cloud behaviour is controlled by the Mongo URI and startup guardrails, not by a separate deployment-mode flag.
For backend tests, do not use von_db.
Use:
$env:VON_DB_NAME = 'test_von_db'For mock-only test flows that should not require MongoDB at all:
$env:VON_USE_MOCK_DB = '1'run.ps1 intentionally blocks starting the real server with
VON_DB_NAME=test_von_db.
For a remote host or coding-agent session running against Atlas:
$env:MONGO_URI = '<YOUR-ATLAS-URI>'
$env:VON_DB_NAME = 'von_db'
$env:MONGO_ALLOW_LOCAL_FALLBACK = '0'
$env:VON_SKIP_BROWSER_LAUNCH = '1'
$env:FLASK_SECRET_KEY = '<32+ chars>'Why these matter:
MONGO_ALLOW_LOCAL_FALLBACK=0prevents Atlas failures from silently falling back to localhostMONGO_DNS_FALLBACK_URI=<direct-host Atlas URI>can still be used as a non-local recovery path when SRV/DNS resolution is flakyVON_SKIP_BROWSER_LAUNCH=1avoids remote hosts trying to open a local browserFLASK_SECRET_KEYis required for sane hosted session handling and is mandatory when strict hosted OAuth startup is enabled
For stricter hosted Mongo startup, also set:
$env:VON_MONGO_STRICT_STARTUP = '1'
$env:VON_MONGO_STARTUP_PROBE = '1'
$env:VON_MONGO_REQUIRE_TLS = '1'
$env:VON_MONGO_ALLOWED_HOST_SUFFIXES = '.mongodb.net'Von does not currently include Playwright or Cypress browser e2e tests in this repo. Frontend automated coverage is Jest + jsdom. Browser testing against a cloud deployment is therefore manual smoke testing over HTTPS.
For browser testing without login:
- public HTTPS in front of Von is enough
- the supported OpenStack path keeps Flask bound to
127.0.0.1and exposes it via NGINX
For browser testing with Google login:
$env:GOOGLE_OAUTH_CLIENT_ID = '<YOUR-CLIENT-ID>'
$env:GOOGLE_OAUTH_CLIENT_SECRET = '<YOUR-CLIENT-SECRET>'
$env:GOOGLE_OAUTH_REDIRECT_URI = 'https://<your-domain>/von/api/auth/google/callback'
$env:GOOGLE_OAUTH_STRICT_STARTUP = '1'Important constraints:
- the browser must access the same host as
GOOGLE_OAUTH_REDIRECT_URI - strict hosted OAuth forbids
GOOGLE_OAUTH_ENABLE_DYNAMIC_REDIRECTS=true - dynamic redirects are intended only for local/ngrok-style development
Prefer file-based secret injection on hosted systems when possible:
MONGO_URI_FILEGOOGLE_OAUTH_CLIENT_ID_FILEGOOGLE_OAUTH_CLIENT_SECRET_FILE
Use the tracked OpenStack/Catalyst path in:
docs/engineering/openstack_deployment.mdinfra/openstack/environments/dev/dev.tfvars.example
Recommended progression:
-
Start with anonymous browser access only.
- inject
TF_VAR_bootstrap_mongo_uri - keep
bootstrap_mongo_strict_startup=false - keep OAuth unset
- deploy and verify
/health,/admin/db/health?probe=rw, UI load, and a basic chat request
- inject
-
Harden Mongo once Atlas connectivity is stable.
- set
bootstrap_mongo_allow_local_fallback=false - enable
bootstrap_mongo_strict_startup=true - enable
bootstrap_mongo_startup_probe=true
- set
-
Add Google login only after DNS and HTTPS are stable.
- inject
TF_VAR_bootstrap_flask_secret_key - inject
TF_VAR_bootstrap_google_oauth_client_id - inject
TF_VAR_bootstrap_google_oauth_client_secret - set
bootstrap_google_oauth_redirect_urito the public callback URL - enable strict OAuth startup
- inject
-
Treat cloud browser validation as manual smoke plus existing repo tests.
- Jest/jsdom for frontend automation
VON_DB_NAME=test_von_dbfor pytest- manual browser checks for the live hosted instance