Documentation menu

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

VariableRequiredDefaultDescription
PORTNo3001Backend API server port
JWT_SECRETAutoSecret key for signing JWT tokens. Auto-generated and persisted to data/.jwt-secret on first run

Admin Account

VariableRequiredDefaultDescription
ADMIN_USERNAMEYesInitial admin username (set during setup wizard)
ADMIN_PASSWORDYesInitial 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.

VariableRequiredDefaultDescription
DAYZ_SERVER_IPNo127.0.0.1DayZ server IP address
DAYZ_RCON_PORTNo2305BattlEye RCON port
RCON_PASSWORDNoBattlEye RCON password
DAYZ_INSTALL_DIRNoC:\DayZServerPath to DayZ server installation
DAYZ_PROFILE_DIRNoServer profile directory (e.g. profiles)
DAYZ_EXECUTABLENoDayZServer_x64.exeServer executable name
DAYZ_LAUNCH_PARAMSNo-config=serverDZ.cfg -port=2302 -profiles=profiles -dologs -adminlog -netlog -freezecheckServer launch parameters

Discord Bot

VariableRequiredDefaultDescription
DISCORD_BOT_TOKENFor botDiscord bot token
DISCORD_CLIENT_IDFor botDiscord application client ID
DISCORD_GUILD_IDFor botYour Discord server (guild) ID
DISCORD_ADMIN_ROLE_IDFor botRole ID allowed to use admin bot commands
DISCORD_BOT_API_KEYFor botRandom key for bot-to-API authentication
DISCORD_WEBHOOK_URLNoDefault Discord webhook URL for notifications
PANEL_API_URLNohttp://localhost:3001URL for the Discord bot to call back to the panel API

SteamCMD

VariableRequiredDefaultDescription
STEAMCMD_PATHNoPath to SteamCMD executable (e.g. C:\SteamCMD\steamcmd.exe)
STEAM_USERNAMENoSteam account for Workshop downloads
STEAM_PASSWORDNoSteam 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.

VariableRequiredDefaultDescription
INHOUSE_SIDECAR_PORTNo9100Sidecar API port
INHOUSE_API_KEYNoAPI key for sidecar authentication

Bans

VariableRequiredDefaultDescription
BAN_KICK_MESSAGENoYou 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_URLNoDiscord invite or appeal URL. If set, replaces "our Discord" in the default kick message

Sidecar TLS

VariableRequiredDefaultDescription
SIDECAR_TLS_CERTNoPath to TLS certificate for sidecar HTTPS
SIDECAR_TLS_KEYNoPath to TLS private key for sidecar HTTPS

Security

VariableRequiredDefaultDescription
CORS_ORIGINSNohttp://localhost:3001,http://127.0.0.1:3001Comma-separated list of allowed CORS origins
USE_HTTPSNo0Force HTTPS (1 to enable)

Auto-Update

VariableRequiredDefaultDescription
AUTO_UPDATE_ENABLEDNofalseEnable automatic server updates
UPDATE_COUNTDOWN_SECONDSNo300Countdown 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