Configuration
Environment Variables
Environment variables for self-hosting the dashboard and local bot API.
Normal end users do not need to touch environment variables just to run the app. These are mainly for developers or self-hosted deployments.
Dashboard (.env)
env
# Database DATABASE_URL="postgres://user:password@host:5432/db?sslmode=require" # Better Auth BETTER_AUTH_SECRET="generate-with-openssl" BETTER_AUTH_URL="http://localhost:3000" # Optional integrations GOOGLE_CLIENT_ID="" GOOGLE_CLIENT_SECRET="" RESEND_API_KEY="re_..." # Local bot bridge BOT_API_URL="http://localhost:8000" BOT_API_SECRET="shared-secret-between-dashboard-and-bot-api" # Optional download link for the Windows package BOT_DOWNLOAD_URL=""
Bot API / Windows Runner (.env in trading-bot/)
env
BOT_API_SECRET="same-secret-as-dashboard" DASHBOARD_URL="http://localhost:3000"
What Does Not Belong Here
MT5 login number, MT5 password, and MT5 server do not belong in the dashboard or bot.envfiles for normal user setup. Those are entered through the dashboard Setup Wizard or Accounts page and saved locally by the bot.
Note: Never commit real.envvalues to git. Use your host’s secret manager or local environment configuration instead.
Generating a Secret
bash
openssl rand -base64 32