Skip to content
GitHub1.1k

Configuration

Razzia is configured with a few environment variables. Your content (quizzes, results, media and branding) lives in the config folder.

Variable Required Default What it does
MANAGER_PASSWORD Yes The password that unlocks the manager interface.
JWT_SECRET No Random at each start Signs session tokens. At least 32 characters. See Session secret.
PUID No 1000 Docker only. The user the app runs as. See Permissions.
PGID No 1000 Docker only. The group the app runs as. See Permissions.
WEB_PORT No 3000 Without Docker only. The port the app is served on.
SOCKET_PORT No 3001 Without Docker only. The internal port of the game server, proxied behind WEB_PORT.

Until MANAGER_PASSWORD is set, nobody can log in to the manager interface.

With Docker, the app always listens on port 3000 inside the container. To use another port, change the published port, for example "8080:3000".

Put them in the .env file read by env_file:

.env
MANAGER_PASSWORD=your-password
JWT_SECRET=

Or set them directly in compose.yml:

compose.yml
services:
razzia:
image: ralex91/razzia:latest
environment:
MANAGER_PASSWORD: your-password

Restart Razzia after changing a variable.

Razzia identifies hosts and players with signed session tokens. JWT_SECRET is the key that signs them.

If you leave it empty, Razzia generates a new secret at each start. A restart then logs every host out and gives every player a new identity. This is usually fine: games live in memory, so a restart already ends them all.

Set JWT_SECRET if you want sessions to survive a restart. Generate a random value:

Terminal window
openssl rand -hex 32

Without openssl, use Node.js:

Terminal window
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"