Wiki›
Environment VariablesVariables d'environnement
Environment Variables
Full reference of every environment variable supported by CubeAdmin.
Authentication
| Variable | Required | Default | Description |
BETTER_AUTH_SECRET | Yes | — | Secret key for signing sessions. Minimum 32 characters. Generate with openssl rand -base64 32. |
BETTER_AUTH_URL | No | http://localhost:3000 | Public base URL of the CubeAdmin app. Used to construct auth callback URLs. |
BETTER_AUTH_TRUSTED_ORIGINS | No | http://localhost:3000 | Comma-separated list of trusted origins for CORS/CSRF protection. Add your domain in production. |
NEXT_PUBLIC_BETTER_AUTH_URL | No | inferred | Browser-side auth URL. Only needed if the public URL differs from what the browser infers. |
Email (SMTP)
| Variable | Required | Default | Description |
SMTP_HOST | No* | — | SMTP server hostname. Required for any email to be sent. |
SMTP_PORT | No | 587 | SMTP port. Use 465 for implicit TLS, 587 for STARTTLS. |
SMTP_SECURE | No | false | Set true for implicit TLS (port 465). |
SMTP_USER | No | — | SMTP username. Omit for unauthenticated relay. |
SMTP_PASS | No | — | SMTP password or app-specific password. |
EMAIL_FROM | No | CubeAdmin <noreply@example.com> | Sender address on outgoing emails. |
Minecraft Server
| Variable | Required | Default | Description |
MC_SERVER_PATH | No | /opt/minecraft/server | Absolute path to the Minecraft server directory. CubeAdmin reads/writes files and spawns the process from here. |
MC_RCON_HOST | No | 127.0.0.1 | RCON hostname. Use minecraft in the Docker Compose stack. |
MC_RCON_PORT | No | 25575 | RCON port. Must match rcon.port in server.properties. |
MC_RCON_PASSWORD | Yes* | — | RCON password. Required for player management, whitelist, and scheduler. |
Database
| Variable | Required | Default | Description |
DATABASE_PATH | No | ./data/cubeadmin.db | Path to the SQLite database file. The directory must exist and be writable. |
Server
| Variable | Required | Default | Description |
PORT | No | 3000 | HTTP server port. |
HOSTNAME | No | 0.0.0.0 | HTTP server bind address. |
NODE_ENV | No | development | Set to production for production deployments. |
BLUEMAP_URL | No | — | URL where BlueMap is accessible from the browser (e.g. http://localhost:8100). |
RATE_LIMIT_RPM | No | 100 | API rate limit — max requests per minute per IP. |
Variables d'environnement
Référence complète de toutes les variables d'environnement supportées par CubeAdmin.
Authentification
| Variable | Requis | Défaut | Description |
BETTER_AUTH_SECRET | Oui | — | Clé secrète pour signer les sessions. Minimum 32 caractères. Générez avec openssl rand -base64 32. |
BETTER_AUTH_URL | Non | http://localhost:3000 | URL publique de CubeAdmin. Utilisée pour construire les URLs de callback d'auth. |
BETTER_AUTH_TRUSTED_ORIGINS | Non | http://localhost:3000 | Liste d'origines approuvées séparées par virgule pour la protection CORS/CSRF. |
NEXT_PUBLIC_BETTER_AUTH_URL | Non | déduit | URL d'auth côté navigateur. Uniquement si l'URL publique diffère de ce que le navigateur déduit. |
Email (SMTP)
| Variable | Requis | Défaut | Description |
SMTP_HOST | Non* | — | Nom d'hôte du serveur SMTP. Requis pour tout envoi d'email. |
SMTP_PORT | Non | 587 | Port SMTP. 465 pour TLS implicite, 587 pour STARTTLS. |
SMTP_SECURE | Non | false | Mettre true pour TLS implicite (port 465). |
SMTP_USER | Non | — | Nom d'utilisateur SMTP. Omettez pour un relai non authentifié. |
SMTP_PASS | Non | — | Mot de passe SMTP ou mot de passe d'application. |
EMAIL_FROM | Non | CubeAdmin <noreply@example.com> | Adresse expéditeur des emails sortants. |
Serveur Minecraft
| Variable | Requis | Défaut | Description |
MC_SERVER_PATH | Non | /opt/minecraft/server | Chemin absolu vers le répertoire du serveur Minecraft. |
MC_RCON_HOST | Non | 127.0.0.1 | Hôte RCON. Utilisez minecraft dans la stack Docker Compose. |
MC_RCON_PORT | Non | 25575 | Port RCON. Doit correspondre à rcon.port dans server.properties. |
MC_RCON_PASSWORD | Oui* | — | Mot de passe RCON. Requis pour la gestion des joueurs et le planificateur. |
Base de données
| Variable | Requis | Défaut | Description |
DATABASE_PATH | Non | ./data/cubeadmin.db | Chemin du fichier SQLite. Le répertoire doit exister et être accessible en écriture. |
Serveur
| Variable | Requis | Défaut | Description |
PORT | Non | 3000 | Port du serveur HTTP. |
HOSTNAME | Non | 0.0.0.0 | Adresse d'écoute du serveur HTTP. |
NODE_ENV | Non | development | Mettre production pour les déploiements en production. |
BLUEMAP_URL | Non | — | URL où BlueMap est accessible depuis le navigateur. |
RATE_LIMIT_RPM | Non | 100 | Limite de débit API — requêtes max par minute par IP. |