Configuration Reference

All configuration lives in /opt/tronexus/.env  ·  File is chmod 600 — never commit it

Overview

The entire Tronexus stack is configured through a single .env file. The installer generates this file from your wizard answers, with secrets auto-generated. You can edit it manually at any time — restart the affected service afterwards.

cd /opt/tronexus

# Edit configuration
nano .env

# Restart all services
docker compose restart

# Restart a specific service
docker compose restart auth
Security: The .env file contains secrets. It is chmod 600 by default. Never commit it to version control. The .gitignore excludes it.

General

VariableExampleDescription
TRONEXUS_DOMAINyourdomain.comBase domain for all services. All subdomains derive from this value.
TZEurope/AmsterdamTimezone used by n8n, monitoring, and log timestamps. Use tz database format.

Postgres

VariableExampleDescription
POSTGRES_USERtronexusDatabase superuser. Used by all services that connect to Postgres.
POSTGRES_PASSWORD••••••••Database password. Use a strong random value. Auto-generated by installer.
POSTGRES_DBtronexusDefault database name. Set automatically by installer.
Multiple databases: Tronexus Auth creates its own auth database automatically on first start. You do not need to create it manually.

Auth API

VariableDefaultDescription
AUTH_GOOGLE_CLIENT_IDGoogle OAuth client ID. From Google Cloud Console → APIs & Services → Credentials.
AUTH_GOOGLE_CLIENT_SECRETGoogle OAuth client secret.
AUTH_JWT_SECRETauto-generatedSecret used to sign JWT access tokens. Rotate only if you need to invalidate all sessions.
AUTH_JWT_ALGORITHMHS256JWT signing algorithm. HS256 is recommended for self-hosted use.
AUTH_ACCESS_TOKEN_EXPIRE_MINUTES15Access token lifetime in minutes. Short is safer — clients should refresh proactively.
AUTH_REFRESH_TOKEN_EXPIRE_DAYS30Refresh token lifetime in days. Refresh tokens rotate on each use.
AUTH_API_BASE_URLhttps://auth-api.yourdomain.comPublic base URL of the Auth API. Used to build OAuth redirect URIs.
AUTH_DB_NAMEauthPostgres database name for the Auth API. Created automatically on first start.
AUTH_APP_IDset by bootstrapDefault app UUID. Written to .env by the bootstrap script.
AUTH_RATE_LIMIT_WINDOW60Rate limiting window in seconds.
AUTH_RATE_LIMIT_MAX20Maximum requests per IP per window.
AUTH_LOCKOUT_ATTEMPTS10Number of rate limit violations before IP lockout.
AUTH_LOCKOUT_SECONDS900IP lockout duration in seconds (15 minutes).

Redis

VariableDefaultDescription
REDIS_HOSTtronexus-redisRedis hostname. Resolves via Docker network. Do not change unless running Redis externally.
REDIS_PORT6379Redis port. Default is standard Redis port.
Redis is internal-only. No external port is exposed. It stores rate limiting counters and OAuth state tokens with TTLs.

Ollama

VariableDefaultDescription
OLLAMA_REMOTEfalseSet to true to disable the local Ollama container and use a remote inference server instead.
OLLAMA_REMOTE_URLURL of the remote Ollama instance (e.g. http://192.168.1.x:11434). Only used when OLLAMA_REMOTE=true.
OLLAMA_DEFAULT_MODELmistral:7b-instruct-q4_K_MDefault model for the monitoring script's AI summary. Must be pulled first.

LiteLLM

VariableDefaultDescription
LITELLM_MASTER_KEYauto-generatedMaster API key for LiteLLM. Used by Open WebUI and other services to authenticate with the proxy.
OPENAI_API_KEYOptional. Enables routing to OpenAI models via LiteLLM.
ANTHROPIC_API_KEYOptional. Enables routing to Anthropic Claude models.
AWS_ACCESS_KEY_IDOptional. For AWS Bedrock model access.
AWS_SECRET_ACCESS_KEYOptional. For AWS Bedrock model access.

Open WebUI

VariableDefaultDescription
WEBUI_SECRET_KEYauto-generatedSecret key for Open WebUI session signing. Changing this invalidates all active sessions.

n8n

VariableDefaultDescription
N8N_ENCRYPTION_KEYauto-generatedKey used to encrypt stored credentials in n8n. Do not change after initial setup — it will break existing credentials.
N8N_BASIC_AUTH_ACTIVEfalseEnable HTTP basic auth on the n8n UI. Set to true if you need additional access control.
N8N_BASIC_AUTH_USERadminUsername for n8n basic auth.
N8N_BASIC_AUTH_PASSWORDPassword for n8n basic auth.

pgAdmin

VariableExampleDescription
PGADMIN_DEFAULT_EMAIL[email protected]Login email for the pgAdmin web interface.
PGADMIN_DEFAULT_PASSWORDauto-generatedLogin password for pgAdmin.

Monitoring

VariableExampleDescription
TELEGRAM_BOT_TOKEN1234567890:AAF...Bot token from @BotFather on Telegram. Required for monitoring alerts.
TELEGRAM_CHAT_ID123456789Your Telegram chat ID. Get it from @userinfobot.
INFERENCE_HOST192.168.1.xIP of remote inference server. Used by monitoring for health checks.

The monitoring script runs daily at 18:00 via cron and sends a Telegram message with an AI-generated summary of server health. To change the schedule:

crontab -e
# Change: 0 18 * * * to your preferred schedule

Adding Models to LiteLLM

Edit /opt/tronexus/litellm/config.yaml to add models:

model_list:
  # Local Ollama model
  - model_name: mistral
    litellm_params:
      model: ollama/mistral:7b-instruct-q4_K_M
      api_base: http://tronexus-ollama:11434

  # OpenAI (requires OPENAI_API_KEY in .env)
  - model_name: gpt-4o
    litellm_params:
      model: gpt-4o
      api_key: os.environ/OPENAI_API_KEY

  # Anthropic Claude (requires ANTHROPIC_API_KEY in .env)
  - model_name: claude-sonnet
    litellm_params:
      model: anthropic/claude-sonnet-4-20250514
      api_key: os.environ/ANTHROPIC_API_KEY

After editing, restart LiteLLM:

cd /opt/tronexus && docker compose restart litellm