Appearance
Environment (.env)
The .env file in the project root holds the platform's server-level configuration: addresses, passwords, service keys and on/off switches. Most business settings live in the admin panel instead. This page explains each group and the values a live exchange needs.
Every variable, with its default
This page explains the groups. The full list, with defaults and the file that reads each one, is in the Environment variables reference.
How changes take effect
| After changing | Do this |
|---|---|
| Most values | php artisan config:clear. Then php artisan horizon:terminate, because background workers keep the values they started with. |
MIX_* values | Rebuild both front-end bundles (Building assets). These are copied into the JavaScript at build time. |
| Values used by bridges or the chart service | Restart that process: pm2w restart bridge-ethereum, pm2w restart chart |
PUSHER_* values | All three: clear config, restart Horizon, and rebuild (the MIX_PUSHER_* lines copy them) |
Some admin settings write to .env
The site name, email, captcha (Turnstile) and Unlimit settings in the admin panel are saved into this file. So .env must be writable by the web server user, and anything you edit by hand in those lines can be overwritten from the admin panel. See Settings stored in the .env file.
Production values that matter most
ini
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
SANCTUM_STATEFUL_DOMAINS=yourdomain.com
CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=redis
BROADCAST_DRIVER=pusher
REDIS_CLIENT=phpredis
READ_ONLY_MODE=false
USER_ASSETS="false"Common mistakes
| Mistake | What happens |
|---|---|
SESSION_DRIVER=array or CACHE_DRIVER=array (the example values) | Nobody stays signed in. Live statistics aren't kept. |
QUEUE_CONNECTION=sync | Every job runs inside the web request. Pages become slow and order processing blocks. |
BROADCAST_DRIVER=log | Live updates are written to the log instead of being sent. Prices look frozen. |
APP_DEBUG=true | Error pages show configuration values, including passwords, to anyone |
APP_ENV other than production / local | Horizon starts no workers (Queues) |
SANCTUM_STATEFUL_DOMAINS not set to your domain | The site's own requests to its API are rejected. Signed-in pages fail to load data. |
USER_ASSETS="true" left after a build | The admin panel returns 404 |
Changing APP_KEY on a running site | Everyone is signed out and two-factor authentication stops working |
The groups
Application
APP_NAME (shown in emails, the chart and the browser title), APP_ENV, APP_KEY (generated once with php artisan key:generate), APP_DEBUG, APP_URL (with https://), SANCTUM_STATEFUL_DOMAINS (your domain without https://), LOG_CHANNEL, and APP_PLAN (keep 5 for the full package with futures, P2P and options processors).
Database
DB_CONNECTION=pgsql with DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD. The bridges read the same values to connect to the database. The PG* lines below them only copy these values for PostgreSQL command-line tools such as psql and pg_dump.
Cache, sessions, queues and Redis
CACHE_DRIVER, SESSION_DRIVER and QUEUE_CONNECTION (all redis in production), and REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_CLIENT (phpredis if the PHP redis extension is installed, otherwise predis).
Email
MAIL_MAILER, MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, MAIL_ENCRYPTION, MAIL_FROM_ADDRESS, MAIL_FROM_NAME, and MAILGUN_DOMAIN, MAILGUN_SECRET, MAILGUN_ENDPOINT for the Mailgun API. Usually set from Admin → Settings → Email.
Real-time (WebSockets)
BROADCAST_DRIVER=pusher, PUSHER_APP_ID, PUSHER_APP_KEY, PUSHER_APP_SECRET, PUSHER_HOST, PUSHER_PORT, PUSHER_SCHEME, PUSHER_APP_CLUSTER, and their MIX_PUSHER_* copies for the browser. Must match socket-config.json. See Real-time.
Front-end build
USER_ASSETS (which route set the server loads, "false" when running) and USER_ASSETS_HASH (cache-busting value, changed after every build). See Building assets.
Charts
TRADINGVIEW_CHART_PORT (8081), TRADINGVIEW_CHART_SSL (keep the line, normally "false"), and TRADINGVIEW_CHART_PRIVATE_KEY / TRADINGVIEW_CHART_CERT_FILE for built-in HTTPS. See Chart service.
Background processes
PM_PATH (PM2 home, /var/www), PM_PHP_PATH, PM_USR_PATH, PM_SERVICE_WATCHER_ENABLED and PM_MARKET_WATCHER_ENABLED. See Installation → Prepare PM2.
Blockchains
| Network | Variables |
|---|---|
| Ethereum | APP_ETHEREUM_NODE (required), APP_ETHERSCAN_KEY |
| BNB Smart Chain | APP_BNB_NODE, APP_BSCSCAN_KEY |
| Polygon | APP_POLYGON_NODE, APP_POLYGONSCAN_KEY |
| Tron | APP_TRONGRID_API |
| Solana | SOLANA_RPC_ENDPOINT |
| TON | TON_RPC_ENDPOINT, TON_API_KEY, APP_TON_PORT |
| XRP Ledger | XRP_RPC_ENDPOINT |
| Bitcoin | BITCOIND_HOST, BITCOIND_PORT, BITCOIND_USER, BITCOIND_PASSWORD |
See Blockchain bridges.
Liquidity and prices
BINANCE_API_KEY / BINANCE_API_SECRET for the liquidity provider connection, and CURRENCYAPI_KEY for daily fiat exchange rates.
Sign-in with other accounts
| Provider | Variables | Button shown when |
|---|---|---|
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI (https://yourdomain.com/login/google/callback) | Always. Fill in the keys, or users get an error when they click it. | |
| Phone (SMS codes, Twilio) | SMS_DRIVER=twilio, TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_VERIFY_SID (recommended) and/or TWILIO_FROM | Always offered; shows "SMS is not available" until Twilio is set. See Phone registration |
| Telegram | TELEGRAM_BOT_TOKEN, TELEGRAM_BOT_USERNAME (bot from @BotFather; set its domain with /setdomain) | TELEGRAM_BOT_TOKEN is set and TELEGRAM_AUTH_ENABLED isn't false |
| Apple | APPLE_CLIENT_ID, APPLE_CLIENT_SECRET, APPLE_KEY_ID, APPLE_TEAM_ID, APPLE_PRIVATE_KEY, APPLE_PASSPHRASE, APPLE_REDIRECT_URI (https://yourdomain.com/auth/apple/callback) | APPLE_AUTH_ENABLED=true |
Step-by-step setup for each: Google, Apple, Telegram, Passkeys, SMS with Twilio.
Register the callback addresses exactly as shown with each provider. See Sign-up & social login.
KYC, payments and custody
| Service | Variables |
|---|---|
| Sumsub | SUMSUB_ENABLED, SUMSUB_APP_TOKEN, SUMSUB_APP_SECRET, SUMSUB_WEBHOOK_SECRET, SUMSUB_KYC_LEVEL |
| Unlimit (GateFi) card on-ramp | UNLIMIT_ENABLED, UNLIMIT_ACCESS_KEY, UNLIMIT_SECRET_KEY, UNLIMIT_PARTNER_ACCOUNT_ID, UNLIMIT_BASE_URL |
| Payeer | PAYEER_MERCHANT_ID, PAYEER_MERCHANT_KEY, PAYEER_ACCOUNT_ID, PAYEER_API_KEY, PAYEER_API_ID |
| Perfect Money | PERFECT_MONEY_LOGIN, PERFECT_MONEY_PASSWORD, PERFECT_MONEY_ACCOUNT_ID |
| Fireblocks | FIREBLOCKS_ENABLED, FIREBLOCKS_API_KEY, FIREBLOCKS_BASE_URL, FIREBLOCKS_PUBLIC_KEY_PATH |
| Captcha (Cloudflare Turnstile) | TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEY (usually set in Admin → Settings → Captcha) |
| File storage on S3 | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, AWS_BUCKET (not used unless you change the storage disk) |
Feature flags
| Flag | Default | When true |
|---|---|---|
READ_ONLY_MODE | false | Demo mode. Every change (anything other than viewing a page) is refused with "In Demo Version we enabled READ ONLY mode…". New users get demo balances, any signed-in user can give themselves the staff roles (not superadmin) at /demo-mode, the login form is filled in with the demo account (DEMO_LOGIN_EMAIL / DEMO_LOGIN_PASSWORD), and the scheduler runs only the process watchers and mini-charts. Never on a live exchange. |
DEMO_LOGIN_EMAIL, DEMO_LOGIN_PASSWORD | [email protected], 123123123 | Only with READ_ONLY_MODE=true: the login form opens with these filled in. The account is not created for you; create it yourself. Never sent to browsers when read-only mode is off. |
UI_PALETTE | gold | Brand colour palette for the website: gold, ember, ocean, violet, mint (themes) |
UI_PALETTE_PICKER | false | true shows the Color theme choice to visitors |
LENDING_ENABLED | false | Turns on Lending: its site pages and admin section |
MERCHANT_ACQUIRING_ENABLED | false | Turns on Merchant payments |
MATCHING_ENGINE_ENABLED | false | Uses the Rust matching engine for markets without a liquidity provider |
UNLIMIT_ENABLED | false | Shows the Buy crypto pop-up |
SUMSUB_ENABLED | false | Uses Sumsub for identity verification instead of the built-in review |
FIREBLOCKS_ENABLED | false | Uses Fireblocks for supported deposit wallets |
ENABLE_AUTO_WITHDRAWALS | false | Every 2 minutes, approves up to 5 waiting withdrawals whose amount the hot wallet can cover, without an admin |
DEPOSIT_BONUS_ENABLED | false | Awards deposit bonuses |
FIXED_SWAP | false | Swaps run at the market's last price, even when the order book is empty (needs a last price) |
ENABLE_FEES_IN_USD | false | Shows fixed withdrawal fees to users as USD amounts, converted at the coin's current price |
HIDE_CMC_GECKO | true | Hides internal and gateway endpoints from the public API reference |
SENSITIVE_MODE | false | Masks secret keys and passwords in the admin settings with **** (useful for demos and screen sharing) |
APPLE_AUTH_ENABLED | false | Shows sign-in with Apple |
TELEGRAM_AUTH_ENABLED | true | Shows sign-in with Telegram (needs TELEGRAM_BOT_TOKEN) |
DEBUGBAR_ENABLED | false | Developer debug bar. Never on a live site. |
Values in .env.example you can ignore
TRADE_FREQUENCY and MIX_SOCKET_PORT aren't read by the current code. MEMCACHED_HOST only matters if you switch the cache to Memcached.
