Skip to main content

Configuration

All configuration in torq is done through optional environment variables.

Server​

VariableDefaultPurpose
TORQ_DATA_DIR/dataDirectory for the SQLite database, uploaded attachments, secret.key, and automatic backups
TORQ_LISTEN_ADDR:8080HTTP listen address inside the container
TORQ_BASE_URL(empty)Public URL without trailing slash, e.g. https://torq.example.com. Enables links in notifications, passkeys, password reset, and, when HTTPS, the Secure cookie flag
TORQ_COOKIE_SECUREautotrue or false to force the Secure cookie flag; auto follows TORQ_BASE_URL (and any request arriving over HTTPS)
TORQ_TRUSTED_PROXIES(empty)Comma-separated CIDRs whose X-Forwarded-For header is trusted, so login throttling sees real client IPs behind a reverse proxy
TORQ_MAX_UPLOAD_MB25Per-file upload limit in MB for photos and documents (JPEG, PNG, WebP, HEIC, PDF)
TORQ_LOG_LEVELinfoLog verbosity: debug, info, warn, or error
TORQ_LOG_FORMATjsonLog format: json or text
TZUTCTime zone used for reminder dates and notification digest schedules (e.g. Europe/Berlin)
TORQ_DEMO_MODEfalseSet true for a public demo: account/webhook changes, uploads, and shop name and logo edits are disabled
Units and date formats are set in the UI

Units, date formats, and time formats are not environment variables. Each user chooses their own preferences in the app, and administrators set the defaults for new users under Settings → Instance. See Units and formats.

Email (optional)​

You can configure the mail server for email notifications either in the UI under Settings → Email server or via environment variables:

VariableDefaultPurpose
TORQ_SMTP_HOST(empty)SMTP server hostname
TORQ_SMTP_PORT(empty)SMTP server port (typically 587 for starttls, 465 for tls, or 25 for none)
TORQ_SMTP_SECURITYstarttlsTransport security: starttls, tls, or none
TORQ_SMTP_USERNAME(empty)SMTP authentication username
TORQ_SMTP_PASSWORD(empty)SMTP authentication password
TORQ_SMTP_PASSWORD_FILE(empty)Path to a file containing the SMTP password (useful with Docker secrets)
TORQ_SMTP_FROM(empty)Sender email address
TORQ_SMTP_FROM_NAME(empty)Sender display name

See Email notifications for details on precedence and testing.

Vehicle catalog​

VariableDefaultPurpose
TORQ_CATALOG_ONLINE_UPDATEStrueAllows administrators to refresh the bundled vehicle catalog from KBA, GitHub, and RDW under Settings → About & data sources → Update now. Set false to keep torq strictly offline. See Vehicle catalog

Spec sheet auto-fill (optional)​

Both TAVILY_API_KEY and GEMINI_API_KEY are required; without both, the feature stays disabled. See Spec sheet auto-fill.

VariableDefaultPurpose
TAVILY_API_KEY(empty)Tavily web search API key (free tier includes 1,000 credits/month; one lookup uses 8)
GEMINI_API_KEY(empty)Google Gemini API key, available at aistudio.google.com/apikey
GEMINI_MODELgemini-3.5-flashGemini model name. Lookups time out after 3 minutes, so pick a fast model. Update this if Google retires a model for new keys
Third-party data disclosure

When you trigger a spec-sheet auto-fill, the vehicle's make, model, chassis code, year, and engine are sent to Tavily, and those fields plus HSN/TSN and the search results are sent to Google Gemini.

Demo seeding (optional)​

VariableDefaultPurpose
TORQ_ENABLE_SEED(empty)Set true to allow running torq seed-demo on an empty instance to populate sample vehicles and the demo user

Where to put settings​

SetupLocation
Docker CLI-e NAME=value, or --env-file torq.env
Docker ComposeAn environment: block in docker-compose.yml, or a .env file next to it (see .env.example)
VPS deployment/opt/torq/torq.env (see deploy/env.example)

Example .env file​

torq.env
TZ=Europe/Berlin
TORQ_BASE_URL=https://torq.example.com
TORQ_TRUSTED_PROXIES=172.16.0.0/12
TORQ_MAX_UPLOAD_MB=25