Configuration
Razzia is configured with a few environment variables. Your content (quizzes, results, media and branding) lives in the config folder.
Environment variables
Section titled “Environment variables”| 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".
Set the variables
Section titled “Set the variables”Put them in the .env file read by env_file:
MANAGER_PASSWORD=your-passwordJWT_SECRET=Or set them directly in compose.yml:
services: razzia: image: ralex91/razzia:latest environment: MANAGER_PASSWORD: your-passwordPass each variable with -e:
docker run -d -e MANAGER_PASSWORD=your-password ...Copy .env.example to .env at the root of the repository and fill it in. pnpm start and pnpm dev load it automatically.
Restart Razzia after changing a variable.
Session secret
Section titled “Session secret”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:
openssl rand -hex 32Without openssl, use Node.js:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"