OpenQAOpenQA
Configuration

Environment Variables

Complete reference for all OpenQA environment variables.

🔧 Configuration Priority

OpenQA uses a layered configuration system with the following priority:

Database Config (Web UI) > Environment Variables > Defaults

This means you can configure everything via the web interface at /config, and those settings will override environment variables. Learn more →

💡 Two Configuration Methods

Method 1: Web UI Only (Recommended for demos/development)

  • No .env file needed
  • Configure everything via /config page
  • Changes take effect immediately

Method 2: Environment Variables + Web UI (Recommended for production)

  • Set defaults via .env or docker-compose
  • Override specific values via web UI
  • Best for automated deployments

Quick Setup

Copy the example file and edit it:

bash
1cp .env.example .env
2# Edit .env with your values

Security (Required for Production)

VariableDefaultDescription
OPENQA_JWT_SECRET-JWT secret for authentication (required in production)
OPENQA_AUTH_DISABLEDfalseDisable authentication (NEVER in production)
NODE_ENVdevelopmentSet to "production" for production deployments

LLM Configuration

VariableDefaultDescription
LLM_PROVIDERopenaiLLM provider: openai, anthropic, or ollama
OPENAI_API_KEY-OpenAI API key (required if using OpenAI)
ANTHROPIC_API_KEY-Anthropic API key (required if using Anthropic)
OLLAMA_BASE_URLhttp://localhost:11434Ollama server URL (if using Ollama)
LLM_MODELgpt-4oModel to use for test generation

Target Application

VariableDefaultDescription
SAAS_URL-URL of the application to test
SAAS_AUTH_TYPEnoneAuthentication type: none, basic, or session
SAAS_USERNAME-Username for authentication
SAAS_PASSWORD-Password for authentication

GitHub Integration

VariableDefaultDescription
GITHUB_TOKEN-GitHub personal access token
GITHUB_OWNER-GitHub repository owner/organization
GITHUB_REPO-GitHub repository name

GitLab Integration

VariableDefaultDescription
GITLAB_TOKEN-GitLab personal access token
GITLAB_PROJECT_ID-GitLab project ID
GITLAB_URLhttps://gitlab.comGitLab instance URL

Agent Behavior

VariableDefaultDescription
AGENT_INTERVAL_MS3600000Time between test sessions (ms). Default: 1 hour
AGENT_MAX_ITERATIONS20Maximum actions per test session
AGENT_AUTO_STARTtrueStart testing automatically on launch

Web UI

VariableDefaultDescription
WEB_PORT4242Port for the web interface
WEB_HOST0.0.0.0Host to bind the web server
CORS_ORIGINS*Allowed CORS origins (comma-separated)

Database

VariableDefaultDescription
DB_PATH./data/openqa.dbPath to SQLite database file

Git Listener

VariableDefaultDescription
GIT_LISTENER_ENABLEDfalseEnable automatic testing on git events
GIT_LISTENER_POLL_INTERVAL60000Polling interval for git events (ms)

Example .env File

bash
1# LLM Configuration
2LLM_PROVIDER=openai
3OPENAI_API_KEY=sk-your-api-key-here
4 
5# Target Application
6SAAS_URL=https://your-app.com
7SAAS_AUTH_TYPE=session
8SAAS_USERNAME=test@example.com
9SAAS_PASSWORD=testpassword
10 
11# GitHub Integration (Optional)
12GITHUB_TOKEN=ghp_your-token
13GITHUB_OWNER=your-username
14GITHUB_REPO=your-repo
15 
16# Agent Behavior
17AGENT_INTERVAL_MS=3600000
18AGENT_MAX_ITERATIONS=20
19AGENT_AUTO_START=true
20 
21# Web UI
22WEB_PORT=3000
23WEB_HOST=0.0.0.0
24 
25# Database
26DB_PATH=./data/openqa.db
27 
28# Git Listener (Optional)
29GIT_LISTENER_ENABLED=true
30GIT_LISTENER_POLL_INTERVAL=60000

Next Steps