Skip to content

Environment variables ​

Few of them are required — everything else has sensible defaults. Most settings are changed in the panel interface without a restart; .env only provides the starting value. Everything configurable from the interface is broken down in Panel settings.

The order of precedence is database → .env → defaults. Once a setting has been changed in the interface, it stops depending on .env.

Core ​

VariableRequiredDefaultWhat it sets
BOT_TOKENyes—bot token from @BotFather
API_BASE_URLyes—Remnawave panel API address
API_TOKENyes—panel API token
ADMINSyes—administrator Telegram IDs, comma-separated
DEFAULT_LOCALE—ruinterface language: ru or en
LOG_LEVEL—INFOlogging level
BOT_API_ROOT—https://api.telegram.orgcustom Bot API server
BOT_PROXY_URL——proxy to Telegram: socks5://, socks4://, http://, credentials allowed. socks5h:// and https:// are not supported. Notifications and backups sent by the web panel use it too
PANEL_API_KEY——extra key if the panel requires one

Database ​

VariableRequiredDefaultWhat it sets
POSTGRES_USERyes—PostgreSQL user
POSTGRES_PASSWORDyes—its password
POSTGRES_DByes—database name
DATABASE_URLyes—full connection string
DB_POOL_MIN_SIZE—2lower bound of the connection pool
DB_POOL_MAX_SIZE—10upper bound
SYNC_INTERVAL_SECONDS—300how often to sync with the panel

Three places that drift apart

The password inside DATABASE_URL must match POSTGRES_PASSWORD. This is the most common cause of a database connection error right after installation.

Web panel ​

VariableRequiredDefaultWhat it sets
WEB_SECRET_KEYyes—session signing key, at least 32 characters
TELEGRAM_BOT_USERNAMEyes—bot username without @, needed for Telegram login
WEB_CORS_ORIGINS——domains allowed to call the API
WEB_JWT_EXPIRE_MINUTES—30access token lifetime
WEB_JWT_REFRESH_HOURS—6refresh token lifetime
WEB_BACKEND_PORT—8081backend port
WEB_FRONTEND_PORT—3000frontend port
WEB_ALLOWED_IPS——allowlist of addresses and CIDR ranges
WEB_TRUSTED_PROXIES——which proxies to trust in X-Forwarded-For
WEB_SECRET_PATH——secret URL prefix for the panel
WEB_ADMIN_LOGIN——fallback administrator login
WEB_ADMIN_PASSWORD——fallback password
APP_MODE—fullapi moves the collector into its own container
REDIS_URL——shared cache and limits across instances
INTERNAL_API_SECRET——key for internal calls between bot and backend
INTERNAL_API_BACKEND_URL—http://web-backend:8081backend address for those calls

Public API ​

VariableDefaultWhat it sets
EXTERNAL_API_ENABLEDfalseenables API v3
EXTERNAL_API_DOCSfalseserves Swagger UI for it

Panel webhook ​

VariableDefaultWhat it sets
WEBHOOK_PORT8080receiving port
WEBHOOK_SECRET—signature key, same as in the panel

Details: Panel webhook.

Notifications ​

VariableWhat it sets
NOTIFICATIONS_CHAT_IDchat or channel for notifications
NOTIFICATIONS_TOPIC_IDfallback topic
NOTIFICATIONS_TOPIC_USERSusers
NOTIFICATIONS_TOPIC_NODESnodes
NOTIFICATIONS_TOPIC_SERVICEservice events
NOTIFICATIONS_TOPIC_HWIDdevices
NOTIFICATIONS_TOPIC_CRMbilling
NOTIFICATIONS_TOPIC_FINANCEfinance
NOTIFICATIONS_TOPIC_ERRORSerrors
NOTIFICATIONS_TOPIC_VIOLATIONSviolations
NOTIFICATIONS_TOPIC_BACKUPSbackup files (unset — the service topic)

GeoIP (MaxMind GeoLite2) ​

VariableDefaultWhat it sets
MAXMIND_LICENSE_KEY—MaxMind key; when set, databases download and refresh themselves
MAXMIND_CITY_DB/app/geoip/GeoLite2-City.mmdbcity database path
MAXMIND_ASN_DB/app/geoip/GeoLite2-ASN.mmdbASN database path

Without MaxMind the panel queries ip-api.com — free, but around a thousand requests a day. With a local database lookups are instant and unlimited.

To get a key: sign up at maxmind.com → Account → Manage License Keys → Generate New License Key. The databases download at startup and refresh daily.

Mail server ​

VariableDefaultWhat it sets
MAIL_SERVER_ENABLEDfalseenables the mail server
MAIL_INBOUND_PORT2525inbound mail port
MAIL_SUBMISSION_PORT587submission port
MAIL_SERVER_HOSTNAME0.0.0.0address to listen on
MAIL_TLS_CERT_PATH—certificate for STARTTLS
MAIL_TLS_KEY_PATH—its key

Monitoring ​

VariableDefaultWhat it sets
METRICS_AUTH_TOKEN—protects /metrics with a bearer token
PROMETHEUS_PORT9090built-in Prometheus port
PROMETHEUS_RETENTION30dmetric retention

Bedolaga Bot ​

VariableWhat it sets
BEDOLAGA_API_URLBedolaga Bot API address
BEDOLAGA_API_TOKENits access token

Node Agent ​

Agent variables are set on the node itself: see Node Agent and Torrent detection.

AGPL-3.0 with a plugin exception