Skip to content

Environment variables ​

Every variable the platform, the bridges and the chart service read from .env. "Default" is the value used when the variable is missing. For explanations and safe production values, see Environment (.env).

ReferenceReferenceDevOpsVerified against the platform code

Variables marked ★ aren't in .env.example. Add them yourself when you need them.

Application ​

VariableDefaultDescription
APP_NAMELaravelPlatform name in emails, the browser title and the chart. Also set from Admin → Settings → General.
APP_ENVproductionproduction or local. Controls Horizon workers and error display.
APP_KEYnoneEncryption key. Generate once with php artisan key:generate.
APP_DEBUGfalseDetailed error pages. Keep false in production.
APP_URLhttps://yourdomainFull site address, with https://
SANCTUM_STATEFUL_DOMAINSlocalhost,…Your domain(s), without https://. Lets the site call its own API.
APP_PLANliteProduct package. Use 5 for futures, P2P and options processors.
APP_RELEASE_VERSION ★1.0.0Version label
API_VERSION ★1.2Version shown in the API reference
ASSET_URL ★noneServe built files from another address (a CDN)
LOG_CHANNELstackWhere logs go. stack writes one file per day: storage/logs/laravel-YYYY-MM-DD.log.
LOG_STACKdailyChannels of the stack (comma separated). single writes one ever-growing laravel.log
LOG_DAILY_DAYS14How many daily log files are kept
LOG_FILE_PERMISSION0664Permissions of new log files. Every process that logs (web, cron, PM2) must be able to write them: keep them all running as www-data, or use 0666
SETTING_CACHE_ENABLEDtrueCache the settings in Redis (encrypted settings stay encrypted in the cache; a save clears it at once)
LOG_LEVEL ★debugLowest level written to the log
GOOGLE_SITE_TAG ★noneGoogle Analytics measurement ID (G-…). Adds the tracking script to every page.

Front-end build ​

VariableDefaultDescription
USER_ASSETSfalse"false" when running (loads admin routes too). "true" only while generating the visitor route file.
USER_ASSETS_HASHnoneAdded to every script and stylesheet address. Change after every build.
MIX_PUSHER_APP_KEY, MIX_PUSHER_HOST, MIX_PUSHER_PORT, MIX_PUSHER_SCHEME, MIX_PUSHER_APP_CLUSTERcopies of PUSHER_*WebSocket settings built into the browser code. Rebuild after changing.
MIX_SOCKET_PORT6001Not used by the current front-end

Database ​

VariableDefaultDescription
DB_CONNECTIONmysqlUse pgsql
DB_HOST127.0.0.1Database server
DB_PORT5432Database port
DB_DATABASEforgeDatabase name
DB_USERNAMEforgeDatabase user
DB_PASSWORDemptyDatabase password
PGHOST, PGUSER, PGDATABASE, PGPASSWORD, PGPORTcopies of DB_*For PostgreSQL command-line tools only

Cache, sessions, queues, Redis ​

VariableDefaultDescription
CACHE_DRIVERfileUse redis
SESSION_DRIVERdatabaseUse redis
SESSION_LIFETIME ★120Minutes of inactivity before sign-out
SESSION_SECURE_COOKIE ★nonetrue to send the session cookie over HTTPS only
SESSION_DOMAIN ★noneCookie domain, if you share sessions across subdomains
QUEUE_CONNECTIONsyncUse redis
REDIS_HOST127.0.0.1Redis server
REDIS_PORT6379Redis port
REDIS_PASSWORDnoneRedis password
REDIS_CLIENTphpredisphpredis (needs the PHP extension) or predis
REDIS_DB ★, REDIS_CACHE_DB ★0, 1Redis database numbers for queues/sessions and for cache
REDIS_PREFIX ★emptyKey prefix, if several sites share one Redis
CACHE_PREFIX ★from APP_NAMECache key prefix
MEMCACHED_HOST127.0.0.1Only with CACHE_DRIVER=memcached

Email ​

VariableDefaultDescription
MAIL_MAILERsmtpTransport
MAIL_HOSTsmtp.mailgun.orgSMTP server
MAIL_PORT587SMTP port
MAIL_USERNAME, MAIL_PASSWORDnoneSMTP login
MAIL_ENCRYPTIONtlstls or ssl
MAIL_FROM_ADDRESS[email protected]Sender address
MAIL_FROM_NAMEExampleSender name
MAILGUN_DOMAIN, MAILGUN_SECRETnoneMailgun API sending (Admin → Settings → Email → Use Mailgun API)
MAILGUN_ENDPOINTapi.mailgun.netapi.eu.mailgun.net for EU domains
POSTMARK_TOKEN ★noneOnly with MAIL_MAILER=postmark

Real-time ​

VariableDefaultDescription
BROADCAST_DRIVERnullUse pusher (Soketi)
PUSHER_APP_ID, PUSHER_APP_KEY, PUSHER_APP_SECRETnoneMust match socket-config.json
PUSHER_HOSTnonesocket.yourdomain.com
PUSHER_PORTnone443
PUSHER_SCHEMEhttphttps
PUSHER_APP_CLUSTERnoneAny value, for example mt1 (required by the client library)

Chart service ​

VariableDefaultDescription
TRADINGVIEW_CHART_PORT8081Port of chart-udf
TRADINGVIEW_CHART_SSLrequired"false" normally. The service crashes if the line is missing.
TRADINGVIEW_CHART_PRIVATE_KEY, TRADINGVIEW_CHART_CERT_FILEnoneCertificate files when TRADINGVIEW_CHART_SSL="true"

Background processes ​

VariableDefaultDescription
PM_PATH/var/wwwPM2 home ($PM_PATH/.pm2)
PM_PHP_PATH/usr/bin/phpPHP binary used for PM2 processes
PM_USR_PATH/usr/local/bin:/usr/bin:/binWhere pm2 is found
PM_SERVICE_WATCHER_ENABLEDtruepm:watcher keeps core processes running
PM_MARKET_WATCHER_ENABLEDtruepm:market-watcher keeps per-market liquidity processes running (per-market mode only)
PM_LIQUIDITY_MODEsharedshared: two liquidity runners for all markets (liquidity-binance, liquidity-custom). per-market: one LIQ-<market> process per market
PM_LIQUIDITY_SHARDS1Split the provider liquidity runner over this many processes (liquidity-binance-1, -2, ...), for many markets
PM_KILL_TIMEOUT15Seconds PM2 gives a worker to finish its current pass when stopping or restarting it
PM_STALE_RESTART_COOLDOWN300pm:watcher restarts a stuck worker (no heartbeat) at most once per this many seconds
PM_ECOSYSTEM_PATHstorage/app/pm2/ecosystem.jsonWhere pm:ecosystem / pm:watcher write the PM2 file
PM_REDIS_CONNECTIONdefaultRedis connection used to wake workers at once (after trades and price ticks)
BINANCE_STREAM_URLwss://stream.binance.com:9443/streamBinance combined-stream address used by the provider liquidity runner (the testnet one when BINANCE_API_TESTNET=true)

Matching engine ​

VariableDefaultDescription
MATCHING_ENGINE_ENABLEDfalseUse the Rust engine for markets without a liquidity provider
MATCHING_ENGINE_FORCE_LARAVEL ★falseTemporarily use the platform's matching everywhere
MATCHING_ENGINE_HOST127.0.0.1Engine address
MATCHING_ENGINE_PORT9000Engine port
MATCHING_ENGINE_TIMEOUT5Seconds
MATCHING_ENGINE_RECONNECT_ATTEMPTS ★3Reconnection tries
MATCHING_ENGINE_RECONNECT_DELAY ★100Milliseconds between tries
MATCHING_ENGINE_PRICE_PRECISION100000000Integer multiplier for prices
MATCHING_ENGINE_QUANTITY_PRECISION100000000Integer multiplier for quantities
MATCHING_ENGINE_SYMBOL_SEPARATOR ★/Symbol format
MATCHING_ENGINE_DEBUGfalseExtra logging

Blockchains ​

VariableDefaultDescription
APP_ETHEREUM_NODEnone, required for EthereumEthereum node URL used by the bridge
APP_BNB_NODEhttps://bsc-dataseed.binance.orgBNB Smart Chain node
APP_POLYGON_NODEhttps://polygon-rpc.comPolygon node
APP_TRON_NODEhttps://api.trongrid.ioTron node for the Tron bridge (https://api.shasta.trongrid.io for testing)
APP_TRONGRID_APInoneTronGrid API key for the Tron bridge (sent only when set)
SOLANA_RPC_ENDPOINThttps://api.mainnet-beta.solana.comSolana RPC
TON_RPC_ENDPOINT (or TON_API_ENDPOINT)https://toncenter.com/api/v2/jsonRPCTON RPC
TON_API_KEYnonetoncenter API key
APP_TON_PORT ★8007TON bridge port
XRP_RPC_ENDPOINThttps://s1.ripple.com:51234XRP Ledger RPC
APP_ETHERSCAN_KEYnoneEtherscan V2 key(s) for Ethereum deposit detection: one, or several comma-separated (they share the hour). Also the fallback key of every EVM chain without its own
APP_BSCSCAN_KEYnoneThe same for BNB Smart Chain
APP_POLYGONSCAN_KEYnoneThe same for Polygon
APP_ETHERSCAN_API ★, APP_POLYGONSCAN_API ★https://api.etherscan.io/v2/apiExplorer API address
APP_TRONSCAN_API ★https://apilist.tronscanapi.com (deposits), https://apilist.tronscan.org (merchant module)Tronscan API
APP_TRONSCAN_KEY ★emptyTronscan API key (sent as TRON-PRO-API-KEY), optional
CUSTOMTOKEN_EXPLORER_TX ★https://explorer.customtokenveo.xyz/tx/%sTransaction link of the custom chain
CUSTOMTOKEN_EXPLORER_API ★https://explorer.customtokenveo.xyz/api/v2Blockscout-compatible explorer API of the custom chain, used to detect coin and token deposits
APP_ETHEREUM_URL ★, APP_BSC_URL ★, APP_TRON_URL ★, APP_POLYGON_URL ★, APP_SOLANA_URL ★, APP_TON_URL ★http://localhost:8000 … :8007Where the platform finds each bridge
BITCOIND_HOSTlocalhostBitcoin Core RPC host
BITCOIND_PORT8332Bitcoin Core RPC port
BITCOIND_USER, BITCOIND_PASSWORDemptyBitcoin Core RPC login
BITCOIND_SCHEME ★httpRPC scheme

Liquidity, prices and swaps ​

VariableDefaultDescription
BINANCE_API_KEY, BINANCE_API_SECRETnoneLiquidity provider account
BINANCE_API_TESTNET ★falseUse Binance's test network
CURRENCYAPI_KEYnonecurrencyapi.com key for daily fiat rates
FIXED_SWAPfalseSwaps at the last price, even with an empty book
P2P_DEFAULT_BASE_PAIR ★USDTCoin pre-selected on the P2P page
P2P_DEFAULT_QUOTE_PAIR ★USDFiat currency pre-selected on the P2P page

Sign-in providers ​

Setup guides: Google, Apple, Telegram, Passkeys, SMS with Twilio.

VariableDefaultDescription
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETnoneGoogle OAuth app
GOOGLE_REDIRECT_URInonehttps://yourdomain.com/login/google/callback
SMS_DRIVERtwiliotwilio sends SMS codes; log writes them to the daily log (storage/logs/laravel-YYYY-MM-DD.log) (local testing only)
TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKENnoneTwilio account credentials (phone sign-up and SMS codes)
TWILIO_VERIFY_SIDnoneTwilio Verify service SID (VA…). Recommended: Twilio makes and checks the codes
TWILIO_FROMnoneTwilio number or sender ID. Needed for SMS security notices; sends the codes when there is no Verify service
TELEGRAM_BOT_TOKENnoneToken of the Telegram bot used for sign-in (from @BotFather). The Telegram button shows once it is set
TELEGRAM_BOT_USERNAMEnoneThe bot's username, without @
TELEGRAM_AUTH_ENABLEDtrueSet to false to hide the Telegram button even with a token
APPLE_AUTH_ENABLEDfalseShow the Apple button
APPLE_CLIENT_ID, APPLE_CLIENT_SECRET, APPLE_KEY_ID, APPLE_TEAM_ID, APPLE_PRIVATE_KEY, APPLE_PASSPHRASEnoneSign in with Apple credentials
APPLE_REDIRECT_URInonehttps://yourdomain.com/auth/apple/callback
TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEYnoneCloudflare Turnstile keys (Admin → Settings → Captcha)
PASSKEYS_ENABLEDtruePasskeys. false hides them everywhere
PASSKEYS_RP_IDhost of APP_URLDomain the passkeys belong to, e.g. yourdomain.com. It must be a domain, never an IP address: with an IP, passkeys are switched off
PASSKEYS_ORIGINSnoneExtra addresses the site is opened at, comma separated (e.g. https://www.yourdomain.com). APP_URL is always allowed

Identity verification ​

VariableDefaultDescription
SUMSUB_ENABLEDnonetrue to use Sumsub
SUMSUB_APP_TOKEN, SUMSUB_APP_SECRETnoneSumsub API credentials
SUMSUB_WEBHOOK_SECRETnoneSecret for Sumsub's webhook to https://yourdomain.com/api/v1/sumsub/ipn
SUMSUB_KYC_LEVELnoneName of the verification level in your Sumsub dashboard

Mobile app ​

VariableDefaultMeaning
MOBILE_APP_SCHEMEcryptotechLink scheme the mobile app opens after Google / X / Apple sign-in. Must match the app's APP_SCHEME.
FIREBASE_CREDENTIALSnonePath to the Firebase service-account JSON for push notifications (absolute, or relative to the project folder). Empty = no pushes.
PASSKEYS_ANDROID_PACKAGEnoneAndroid application ID of your app (e.g. exchange.cryptotech.exchange_app). Needed for passkeys in the Android app
PASSKEYS_ANDROID_FINGERPRINTSnoneSHA-256 fingerprint(s) of the app's signing certificate, AA:BB:…, comma separated (Play App Signing key + upload key). Published at /.well-known/assetlinks.json and allowed as passkey origins
PASSKEYS_IOS_APP_IDSnoneTEAMID.bundle.id of the iOS app, comma separated. Published at /.well-known/apple-app-site-association

Payments and custody ​

VariableDefaultDescription
UNLIMIT_ENABLEDfalseShow the Buy crypto pop-up
UNLIMIT_ACCESS_KEY, UNLIMIT_SECRET_KEY, UNLIMIT_PARTNER_ACCOUNT_IDnoneUnlimit (GateFi) credentials (Admin → Settings → Unlimit)
UNLIMIT_BASE_URLhttps://api-sandbox.gatefi.comSandbox by default. Use the live address in production.
UNLIMIT_DEFAULT_BASE_PAIR ★USDDefault fiat currency in the pop-up
UNLIMIT_DEFAULT_QUOTE_PAIR ★USDTDefault coin in the pop-up
UNLIMIT_REDIRECT_URL ★APP_URLWhere users return after paying
PAYEER_MERCHANT_ID, PAYEER_MERCHANT_KEY, PAYEER_ACCOUNT_ID, PAYEER_API_KEY, PAYEER_API_IDnonePayeer
PERFECT_MONEY_LOGIN, PERFECT_MONEY_PASSWORD, PERFECT_MONEY_ACCOUNT_IDnonePerfect Money
PERFECT_MONEY_AUTO_WITHDRAWALS ★noneAutomatic Perfect Money payouts
FIREBLOCKS_ENABLEDfalseUse Fireblocks
FIREBLOCKS_WEBHOOK_PUBLIC_KEY ★emptyFireblocks webhook public key (PEM, \n allowed, or a file path). Required with Fireblocks: webhooks without a valid Fireblocks-Signature are refused
FIREBLOCKS_API_KEY ★emptyFireblocks API key
FIREBLOCKS_BASE_URL ★https://sandbox-api.fireblocks.ioSandbox by default
FIREBLOCKS_PUBLIC_KEY_PATH ★fireblocks_secret.keyPath to the API secret key file
FIREBLOCKS_EVM_HOT_WALLET ★emptyEVM hot wallet address in Fireblocks

Merchant payments ​

VariableDefaultDescription
MERCHANT_ACQUIRING_ENABLEDfalseTurn on the merchant module
MERCHANT_ACQUIRING_ENV ★livelive or sandbox
MERCHANT_CHECKOUT_URL ★https://pay.example.comBase address of the hosted checkout
INVOICE_PAYMENT_EXPIRY ★1800Seconds a customer has to pay an invoice
RATE_SOURCE ★binanceExchange-rate source for invoices: binance, coingecko, internal or fixed

Feature switches ​

VariableDefaultDescription
READ_ONLY_MODEfalseDemo mode: blocks all changes. Never on a live site.
DEMO_LOGIN_EMAIL, DEMO_LOGIN_PASSWORD[email protected], 123123123Prefilled on the login form in read-only (demo) mode only. The account isn't created automatically
UI_PALETTEgoldBrand colour palette for the website: gold, ember, ocean, violet, mint (themes)
UI_PALETTE_PICKERfalsetrue shows the Color theme choice to visitors
SENSITIVE_MODE ★falseMask secrets in admin settings
LENDING_ENABLEDfalseLending module
ENABLE_AUTO_WITHDRAWALSfalseApprove covered withdrawals automatically
DEPOSIT_BONUS_ENABLEDfalseDeposit bonuses
ENABLE_FEES_IN_USD ★falseShow fixed withdrawal fees in USD
HIDE_CMC_GECKOnot settrue hides internal endpoints from the API reference
DEBUGBAR_ENABLEDnot setDeveloper debug bar. Keep false.

Not used ​

TRADE_FREQUENCY and MIX_SOCKET_PORT are in .env.example but aren't read by the current code.

Owner documentation for the CryptoTech exchange platform.