Environment Variables
Every setting Auvyra reads from its environment.
pnpm env:generate writes a .env with secure values. Invalid values stop Auvyra with a message naming the variable, never its value.
| Variable | Required | Default | Purpose |
|---|---|---|---|
DATABASE_PROVIDER | No | mongodb | mongodb, postgresql, mysql, mariadb or sqlite |
DATABASE_URL | Yes | Connection string. Docker Compose sets this for you | |
ENCRYPTION_KEY | Yes | 64 hex characters. Encrypts stored API keys and your email password, and signs links in emails | |
SETUP_TOKEN | Yes | At least 24 characters. Unlocks /setup | |
APP_URL | No | http://localhost:3000 | Public address. https:// enables secure cookies |
UPLOADS_DIR | No | data/uploads | Where Media Library files are stored. Docker Compose sets this |
TRUST_PROXY | No | false | Trust X-Forwarded-For for rate limiting |
AZURACAST_ALLOW_PRIVATE_NETWORKS | No | false | Allow AzuraCast, and webhooks, on private addresses |
Docker Compose also reads:
| Variable | Default | Purpose |
|---|---|---|
MONGO_ROOT_PASSWORD | Password for the bundled MongoDB | |
POSTGRES_PASSWORD | Password for the bundled PostgreSQL | |
MYSQL_PASSWORD and MYSQL_ROOT_PASSWORD | Passwords for the bundled MySQL | |
MARIADB_PASSWORD and MARIADB_ROOT_PASSWORD | Passwords for the bundled MariaDB | |
AUVYRA_PORT | 3000 | Port published on the host |
NEXT_PUBLIC_AUVYRA_URL is read at build time and sets where the Powered by Auvyra credit links to. It defaults to https://auvyra.org.
Generating secrets by hand
If you do not have Node.js on your server, copy .env.example to .env and create each secret with OpenSSL:
openssl rand -hex 32 # ENCRYPTION_KEY
openssl rand -hex 24 # SETUP_TOKEN and each database password