Environment Variables
Essential Configuration
Section titled “Essential Configuration”| Variable | Description | Example |
|---|---|---|
TELEGRAM_TOKEN | Telegram Bot API token | 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 |
DATABASE_URL | PostgreSQL connection string | postgresql://user:pass@postgres:5432/remnawave |
REMNAWAVE_URL | Remnawave panel API URL | https://panel.example.com |
REMNAWAVE_TOKEN | Remnawave API token | your_token |
ADMIN_TELEGRAM_ID | Admin’s Telegram ID | 123456789 |
Pricing Configuration
Section titled “Pricing Configuration”PRICE_1=5PRICE_3=12PRICE_6=20PRICE_12=35DAYS_IN_MONTH=30For Telegram Stars:
STARS_PRICE_1=50STARS_PRICE_3=120STARS_PRICE_6=200STARS_PRICE_12=350Subscription & Trial Settings
Section titled “Subscription & Trial Settings”REMNAWAVE_TAG=paying_userTRIAL_REMNAWAVE_TAG=trial_userTRIAL_DAYS=7TRIAL_TRAFFIC_LIMIT=10TRAFFIC_LIMIT=100TRAFFIC_LIMIT_RESET_STRATEGY=MONTHTRIAL_TRAFFIC_LIMIT_RESET_STRATEGY=MONTHREFERRAL_DAYS=0Traffic Limit Reset Strategy:
DAY- Traffic limit resets every dayWEEK- Traffic limit resets every weekMONTH- Traffic limit resets every month (default)NO_RESET- Traffic limit never resets
Payment Systems
Section titled “Payment Systems”YooKassa
Section titled “YooKassa”YOOKASA_ENABLED=trueYOOKASA_SHOP_ID=your_idYOOKASA_SECRET_KEY=your_keyYOOKASA_EMAIL=your_email@example.comYOOKASA_URL=https://payment.yandex.netCryptoPay
Section titled “CryptoPay”CRYPTO_PAY_ENABLED=trueCRYPTO_PAY_TOKEN=your_tokenCRYPTO_PAY_URL=https://pay.crypt.botTelegram Stars
Section titled “Telegram Stars”TELEGRAM_STARS_ENABLED=trueREQUIRE_PAID_PURCHASE_FOR_STARS=falseTribute
Section titled “Tribute”TRIBUTE_WEBHOOK_URL=/tribute/webhookTRIBUTE_API_KEY=your_keyTRIBUTE_PAYMENT_URL=https://t.me/tribute/app?startapp=...HEALTH_CHECK_PORT=8080UI & Links
Section titled “UI & Links”DEFAULT_LANGUAGE=ruIS_WEB_APP_LINK=falseMINI_APP_URL=https://example.com/appSERVER_STATUS_URL=https://status.example.comSUPPORT_URL=https://t.me/supportFEEDBACK_URL=https://example.com/feedbackCHANNEL_URL=https://t.me/channelTOS_URL=https://example.com/tosUser Management
Section titled “User Management”BLOCKED_TELEGRAM_IDS=123456789,987654321WHITELISTED_TELEGRAM_IDS=111111111,222222222Database Configuration
Section titled “Database Configuration”POSTGRES_USER=remnawavePOSTGRES_PASSWORD=secure_passwordPOSTGRES_DB=remnawaveServer Configuration
Section titled “Server Configuration”HEALTH_CHECK_PORT=8080REMNAWAVE_MODE=remoteRemnawave API Headers
Section titled “Remnawave API Headers”Configure custom headers for all requests to the Remnawave API:
REMNAWAVE_HEADERS=X-Api-Key:your_api_key;X-Custom-Header:valueFormat: key1:value1;key2:value2;key3:value3
Examples:
# With API KeyREMNAWAVE_HEADERS=X-Api-Key:your_secret_key
# Multiple headersREMNAWAVE_HEADERS=X-Api-Key:secret123;X-Custom-Header:custom_value
# With authorizationREMNAWAVE_HEADERS=Authorization:Bearer token123;X-Request-ID:12345Features:
- Supports unlimited custom headers
- Headers are applied to all Remnawave API requests
- Whitespace around keys and values is automatically trimmed
- Invalid headers are silently skipped
- Loaded headers count is logged at startup
Migration from X_API_KEY:
If you were previously using the X_API_KEY variable, migrate to REMNAWAVE_HEADERS:
# Old configurationX_API_KEY=your_key
# New configurationREMNAWAVE_HEADERS=X-Api-Key:your_key