Skip to content

Environment variables

Robin edited this page Feb 20, 2021 · 24 revisions

Basic settings

Variable Description
BOT_URL URL which the website can use to reach this bot, for example http://localhost:27362 (so the URL of the bot webserver, not the website URL)
WEBSERVER_PORT Port to run bot webserver on, for example 27362
WEBSERVER_INTERFACE Default 127.0.0.1*, interface to bind the webserver to. *Defaults to 0.0.0.0 in docker for obvious reasons.
DISCORD_TOKEN Discord bot API token, create one in Discord developer console
API_URL API URL, stateless mode only. See StaffCP > Configuration > API
GUILD_ID Guild id, stateless mode only
DEFAULT_LANGUAGE Default language when the user has not set their own language or it could not be retrieved. See this directory for a list of languages, enter the language code without .json (default en_UK)
DEFAULT_COMMAND_PREFIX (1.2+) Command prefix to use when not configured per server. In stateless mode, this default will always be used. "!" is used if not configured.

Advanced

Variable Description
STORAGE_TYPE stateless or postgres
SKIP_SETTINGS_UPDATE Set to anything to stop the bot from sending settings to connected websites. Useful for large bot instances.
POSTGRES_HOSTNAME default localhost
POSTGRES_PORT default 5432
POSTGRES_NAME database name
POSTGRES_USERNAME
POSTGRES_PASSWORD
Clone this wiki locally