~8 min read

Overview

Thumper-Run is configured through environment variables at both build time and runtime. Variables are organized by the component they configure. Most have sensible defaults and only need to be set when you want to override the default behavior.

Desktop users rarely need to touch these — the Tauri shell handles configuration automatically. Web shell and self-hosted deployments will use these variables extensively.

Web Shell Server

These variables configure the SSR web shell server (tr-web-shell). They control binding, static file serving, hot-reload, and compression.

VariableDefaultDescription
TR_WEB_HOST127.0.0.1Bind address for the web server
TR_WEB_PORT3001Port for the web server
TR_API_BASE_URL(derived)Base URL for API endpoints; derived from host/port if unset
TR_STATIC_DIR./staticPath to static assets directory
TR_HOT_RELOADtrue (debug)Enable hot-reload for development; disabled in release builds
TR_LOG_LEVELinfoLog verbosity: trace, debug, info, warn, error
TR_CORS_ENABLEDtrue (debug)Enable CORS headers; only in debug builds by default
TR_CORS_ORIGINS*Comma-separated list of allowed CORS origins
TR_COMPRESSIONtrueEnable gzip/brotli response compression
TR_SIDECAR_MODEfalseRun as a Tauri sidecar (SSR desktop mode)

Authentication (Rauthy OIDC)

Authentication uses Rauthy as the OpenID Connect provider. These variables are required for the web shell and self-hosted deployments. The desktop app handles auth through the Tauri IPC layer.

VariableDefaultDescription
RAUTHY_URL(required)Base URL of the Rauthy OIDC server
RAUTHY_CLIENT_ID(required)OAuth2 client ID registered in Rauthy
RAUTHY_CLIENT_SECRET(required)OAuth2 client secret for server-side token exchange
RAUTHY_REDIRECT_URI(required)Callback URL after OIDC login (must match Rauthy config)

Security

Security-sensitive variables used for server-side encryption and key management.

VariableDefaultDescription
MANAGED_KEY_SECRET(required)AES-256-GCM hex key (64 hex characters / 32 bytes) for server-side encryption of managed secrets
MANAGED_KEY_SECRET must be exactly 64 hex characters representing a 256-bit key. Generate it with: openssl rand -hex 32. Never commit this value to source control. If this key is lost, all server-managed encrypted data becomes unrecoverable.

Billing (Stripe)

Stripe integration for subscription billing on the web shell. Not required for desktop-only or self-hosted deployments without billing.

VariableDefaultDescription
STRIPE_SECRET_KEY(required)Stripe secret API key (sk_live_* or sk_test_*)
STRIPE_WEBHOOK_SECRET(required)Webhook signing secret for verifying Stripe events (whsec_*)
STRIPE_PUBLISHABLE_KEY(required)Public key for client-side Stripe.js (pk_live_* or pk_test_*)
Never expose STRIPE_SECRET_KEY or STRIPE_WEBHOOK_SECRET to the client. Only STRIPE_PUBLISHABLE_KEY is safe to include in frontend code. Use test keys (sk_test_*, pk_test_*) for development and staging.

Database

Database connection strings for the web shell backend. The desktop app uses local SQLite via the CRDT layer and does not require these variables.

VariableDefaultDescription
DATABASE_URL(required)PostgreSQL connection string (postgres://user:pass@host/db)
REDIS_URL(optional)Redis connection string for session cache and pub/sub
SQLX_OFFLINEtrueUse cached query metadata instead of live database connection during builds

Desktop Shell

Variables that affect the Tauri desktop application. These are typically set automatically by the Tauri runtime or configured through the app’s settings UI.

VariableDefaultDescription
TR_DATA_DIR~/.local/share/tr-desktopRoot data directory for app storage, models, and CRDT databases
TR_DEV_TOOLSfalseEnable WebView developer tools (inspector, console)

Build Time

Variables injected at compile time via build scripts. These are baked into the binary and cannot be changed at runtime.

VariableDefaultDescription
CARGO_PKG_VERSION(from Cargo.toml)Semantic version from the package manifest
BUILD_TIMESTAMP(generated)ISO 8601 timestamp of the build
GIT_COMMIT(generated)Short git commit hash at build time
GA_MEASUREMENT_ID(optional)Google Analytics measurement ID for the web shell (web only)

GPU / Performance

GPU and performance tuning variables. These are typically set by Thumper’s platform patches automatically based on your hardware, but can be overridden for debugging or advanced tuning.

VariableDefaultDescription
MIOPEN_FIND_MODE2 (FAST)MIOpen kernel selection strategy for AMD GPUs. 2=FAST (use cached), 1=DYNAMIC_HYBRID (re-benchmark)
MIOPEN_FIND_ENFORCE(unset)Set to 4 for ONE-TIME warmup benchmark only. Never leave set in production.
TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL0Enable experimental AOTriton kernels for newer AMD architectures
GGML_BACKEND_DL(unset)Path to dynamically-loaded GGML backend library for llama.cpp GPU offload
Most GPU variables are set automatically by Thumper’s launch system based on your detected hardware. Override them only if you know what you’re doing — incorrect values can cause 10x slower inference or silent numerical errors.

Key Takeaways

  • Desktop users rarely need environment variables — the Tauri shell auto-configures
  • Never commit secrets (MANAGED_KEY_SECRET, STRIPE_SECRET_KEY) to source control
  • Use SQLX_OFFLINE=true to build without a live database connection
  • GPU variables are set automatically by platform patches — override with caution