Environment Variables
Complete reference for all Citadel configuration variables. Set these in the .env file in the project root, or use citadel.config.json for non-sensitive settings.
[!TIP]
The setup wizard generates a .env file with a secure JWT_SECRET on first run. You only need to create one manually if you skip the wizard.
Core
Variable Required Default Description PORTNo 3001Backend API server port JWT_SECRETAuto — Secret key for signing JWT tokens. Auto-generated and persisted to data/.jwt-secret on first run
Admin Account
Variable Required Default Description ADMIN_USERNAMEYes — Initial admin username (set during setup wizard) ADMIN_PASSWORDYes — Initial admin password (must be changed on first login)
DayZ Server Defaults
These set the default values for the first server profile. Per-server config is managed via the web UI after setup.
Variable Required Default Description DAYZ_SERVER_IPNo 127.0.0.1DayZ server IP address DAYZ_RCON_PORTNo 2305BattlEye RCON port RCON_PASSWORDNo — BattlEye RCON password DAYZ_INSTALL_DIRNo C:\DayZServerPath to DayZ server installation DAYZ_PROFILE_DIRNo — Server profile directory (e.g. profiles) DAYZ_EXECUTABLENo DayZServer_x64.exeServer executable name DAYZ_LAUNCH_PARAMSNo -config=serverDZ.cfg -port=2302 -profiles=profiles -dologs -adminlog -netlog -freezecheckServer launch parameters
Discord Bot
Variable Required Default Description DISCORD_BOT_TOKENFor bot — Discord bot token DISCORD_CLIENT_IDFor bot — Discord application client ID DISCORD_GUILD_IDFor bot — Your Discord server (guild) ID DISCORD_ADMIN_ROLE_IDFor bot — Role ID allowed to use admin bot commands DISCORD_BOT_API_KEYFor bot — Random key for bot-to-API authentication DISCORD_WEBHOOK_URLNo — Default Discord webhook URL for notifications PANEL_API_URLNo http://localhost:3001URL for the Discord bot to call back to the panel API
SteamCMD
Variable Required Default Description STEAMCMD_PATHNo — Path to SteamCMD executable (e.g. C:\SteamCMD\steamcmd.exe) STEAM_USERNAMENo — Steam account for Workshop downloads STEAM_PASSWORDNo — Steam account password
InHouse Sidecar
The sidecar runs alongside your DayZ server and bridges commands to the @CitadelAdmin mod. Configured per-server in the web panel.
Variable Required Default Description INHOUSE_SIDECAR_PORTNo 9100Sidecar API port INHOUSE_API_KEYNo — API key for sidecar authentication
Bans
Variable Required Default Description BAN_KICK_MESSAGENo You have been banned. Reason: {reason}. To appeal, visit our Discord.Message shown to players when kicked for a ban. Supports {reason} and {banId} placeholders BAN_APPEAL_URLNo — Discord invite or appeal URL. If set, replaces "our Discord" in the default kick message
Sidecar TLS
Variable Required Default Description SIDECAR_TLS_CERTNo — Path to TLS certificate for sidecar HTTPS SIDECAR_TLS_KEYNo — Path to TLS private key for sidecar HTTPS
Security
Variable Required Default Description CORS_ORIGINSNo http://localhost:3001,http://127.0.0.1:3001Comma-separated list of allowed CORS origins USE_HTTPSNo 0Force HTTPS (1 to enable)
Auto-Update
Variable Required Default Description AUTO_UPDATE_ENABLEDNo falseEnable automatic server updates UPDATE_COUNTDOWN_SECONDSNo 300Countdown before update restart
Example .env
# ── Citadel Configuration ─────────────────────────
PORT=3001
JWT_SECRET=change-me-to-a-random-64-char-string
# Admin
ADMIN_USERNAME=admin
ADMIN_PASSWORD=secure-password-here
# DayZ Server
DAYZ_SERVER_IP=127.0.0.1
DAYZ_RCON_PORT=2305
RCON_PASSWORD=your-rcon-password
DAYZ_INSTALL_DIR=C:\DayZ\Server
# Discord (optional)
DISCORD_BOT_TOKEN=your-bot-token
DISCORD_CLIENT_ID=your-client-id
DISCORD_GUILD_ID=your-guild-id
DISCORD_ADMIN_ROLE_ID=your-admin-role-id
DISCORD_BOT_API_KEY=generate-a-random-32-byte-hex-string
# SteamCMD
STEAMCMD_PATH=C:\SteamCMD\steamcmd.exe
STEAM_USERNAME=your-steam-username
# Ban messages (optional)
BAN_APPEAL_URL=https://discord.gg/your-server
PreviousTwo-Factor Authentication Next Server Profiles