Skip to content

Environment Variables

Copy .env.example to .env in the kiosk-admin/ directory and fill in the values below.

Required

VariableDescription
AUTH_SECRETRandom string (32+ chars) used to sign session tokens. Generate with openssl rand -base64 32.
AUTH_URLFull URL of the server, e.g. http://localhost:3000. Used for OAuth redirects.
ENCRYPTION_SECRET64 hexadecimal characters (32 bytes). Device passwords are encrypted at rest using AES-256-GCM.

Generate ENCRYPTION_SECRET:

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

Database

VariableDefaultDescription
DATABASE_PROVIDERsqlitesqlite, postgresql, or mongodb
DATABASE_URLfile:./dev.dbConnection string for the chosen provider

Optional

VariableDescription
MQTT_BROKER_URLMQTT broker URL, e.g. mqtt://localhost:1883. Can also be set from the Settings page.
SMTP_HOSTSMTP server hostname for alert emails
SMTP_PORTSMTP port (default 587)
SMTP_USERSMTP username
SMTP_PASSSMTP password
SMTP_FROMSender 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.