All settings are environment variables, read from .env (see .env.example):
| Variable | Default | Meaning |
|---|---|---|
DISCORD_TOKEN |
– | Bot token. Required. |
DISCORD_CLIENT_ID |
– | Application ID, used to register the slash commands. Required. |
DISCORD_GUILD_ID |
– | Register commands only in this server (instant). Empty = global (up to an hour). |
FOUNDRY_URL |
http://localhost:30000 |
Where the bot reaches Foundry. |
FOUNDRY_DATA_PATH |
– | Foundry's user data folder (contains Config/, Data/, Logs/). Needed for system/module update tracking and world titles. |
FOUNDRY_APP_PATH |
– | Foundry's install folder; lets the bot read the Foundry version while Foundry is down. |
FOUNDRY_WEBSITE_URL |
https://foundryvtt.com |
Where /updates available and /updates compatibility look up packages and releases. Only change it for a mirror. |
BOT_DATA_DIR |
./data |
Where state.json is kept. |
POLL_INTERVAL_SECONDS |
30 |
How often Foundry is checked (minimum 5). |
DOWN_AFTER_FAILURES |
2 |
Failed checks in a row before Foundry counts as down. |
TIMEZONE |
UTC |
Default timezone for restart windows (IANA name, e.g. Europe/Stockholm). |
LOG_LEVEL |
info |
debug, info, warn or error. |
SESSION_SUMMARY_DIR |
– | Where the dxcufgbs-session-summary module writes its summaries, if not session-summaries in Foundry's Data folder. Absolute, or relative to the Data folder. |
ADMIN_PORT |
– | Port of the administration page. Empty = off. Also needs a password (npm run admin-password). |
ADMIN_HOST, ADMIN_HOSTS, ADMIN_TLS, ADMIN_TLS_CERT, ADMIN_TLS_KEY, ADMIN_TRUST_PROXY |
Listening address, extra host names, HTTPS and reverse-proxy options of the page; see .env.example. |
|
UPDATE_NOTIFY |
admins |
Who gets a direct message with the changelog after the bot was updated: admins (owner and every Administrator of each server; needs the Server Members Intent, otherwise the bot warns and messages owners only), owner or off. |
Checking the configuration
npm run check-config validates .env, probes Foundry, counts the installed packages and worlds, tells how many modules no world uses, whether the session summary folder exists and whether the administration page is set up, without touching Discord.
Where .env is
The bot looks for .env next to package.json; --env <file> or FOUNDRY_DISCORD_ENV_FILE point it elsewhere (the Windows installer keeps it under %ProgramData%\FoundryVTT Discord integration).
Running from source
Running from source: npm ci, copy .env.example to .env and fill it in, npm start.
This page mirrors the Discord Integration wiki on GitHub.