Data Store
Citadel uses a JSON file-based data store — no database required. All data lives in the data/ directory.
Files
| File | Contents | Description |
|---|---|---|
servers.json | Server profiles | Server configurations, connection details, provider settings |
users.json | User accounts | Usernames, hashed passwords, roles, MFA settings |
audit.json | Audit trail | Action log with who, what, when, result |
webhooks.json | Webhook configs | Discord and HTTP webhook configurations |
leaderboard.json | Leaderboard cache | Player stats leaderboard data |
bans.json | Global ban database | Centralized ban list with UUID IDs, synced to all server ban.txt files |
setup_complete.json | Setup state | Tracks whether initial setup has been completed |
Backup & Restore
Manual Backup
Copy the entire data/ directory:
Copy-Item -Recurse data\ data-backup-$(Get-Date -Format yyyyMMdd)\
API Backup
Download individual config files via the REST API:
# Download server configs
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:3001/api/backup/servers > servers-backup.json
# Restore
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d @servers-backup.json \
http://localhost:3001/api/restore/servers
Available backup types: servers, users, roles, webhooks
Ban Database Export/Import
The global ban database can be exported and imported via dedicated API endpoints:
# Export bans
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:3001/api/bans/export > bans-backup.json
# Import bans (merges with existing, deduplicates by Steam ID)
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d @bans-backup.json \
http://localhost:3001/api/bans/import
Each ban has a UUID that can be shared with other server owners for cross-community ban sharing.
Data Safety
- The data store uses atomic writes to prevent corruption during crashes
- If a JSON file becomes corrupted, restore from a backup or delete it to reset to defaults
- The
data/directory is created automatically on first startup