Configuration
All configuration in torq is done through optional environment variables.
Server
| Variable | Default | Purpose |
|---|---|---|
TORQ_DATA_DIR | /data | Directory for the SQLite database, uploaded attachments, secret.key, and automatic backups |
TORQ_LISTEN_ADDR | :8080 | HTTP 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_SECURE | auto | true 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_MB | 25 | Per-file upload limit in MB for photos and documents (JPEG, PNG, WebP, HEIC, PDF) |
TORQ_LOG_LEVEL | info | Log verbosity: debug, info, warn, or error |
TORQ_LOG_FORMAT | json | Log format: json or text |
TZ | UTC | Time zone used for reminder dates and notification digest schedules (e.g. Europe/Berlin) |
TORQ_DEMO_MODE | false | Set true for a public demo: account/webhook changes, uploads, and shop name and logo edits are disabled |
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:
| Variable | Default | Purpose |
|---|---|---|
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_SECURITY | starttls | Transport 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
| Variable | Default | Purpose |
|---|---|---|
TORQ_CATALOG_ONLINE_UPDATES | true | Allows 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.
| Variable | Default | Purpose |
|---|---|---|
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_MODEL | gemini-3.5-flash | Gemini model name. Lookups time out after 3 minutes, so pick a fast model. Update this if Google retires a model for new keys |
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)
| Variable | Default | Purpose |
|---|---|---|
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
| Setup | Location |
|---|---|
| Docker CLI | -e NAME=value, or --env-file torq.env |
| Docker Compose | An 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
TZ=Europe/Berlin
TORQ_BASE_URL=https://torq.example.com
TORQ_TRUSTED_PROXIES=172.16.0.0/12
TORQ_MAX_UPLOAD_MB=25