Environment Variables
Copy .env.example to .env in the kiosk-admin/ directory and fill in the values below.
Required
| Variable | Description |
|---|---|
AUTH_SECRET | Random string (32+ chars) used to sign session tokens. Generate with openssl rand -base64 32. |
AUTH_URL | Full URL of the server, e.g. http://localhost:3000. Used for OAuth redirects. |
ENCRYPTION_SECRET | 64 hexadecimal characters (32 bytes). Device passwords are encrypted at rest using AES-256-GCM. |
Generate ENCRYPTION_SECRET:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Database
| Variable | Default | Description |
|---|---|---|
DATABASE_PROVIDER | sqlite | sqlite, postgresql, or mongodb |
DATABASE_URL | file:./dev.db | Connection string for the chosen provider |
Optional
| Variable | Description |
|---|---|
MQTT_BROKER_URL | MQTT broker URL, e.g. mqtt://localhost:1883. Can also be set from the Settings page. |
SMTP_HOST | SMTP server hostname for alert emails |
SMTP_PORT | SMTP port (default 587) |
SMTP_USER | SMTP username |
SMTP_PASS | SMTP password |
SMTP_FROM | Sender address for alert emails |
MQTT and SMTP settings can also be configured through the Settings page in the UI — values saved there are stored in the database and take precedence over environment variables.