Skip to content

Configuration

Configuration

Environment Variables

The Compose files only declare the core variables. Optional features (SMTP password recovery, OIDC/SSO, ...) are read from your .env file via env_file, so you don't need to edit docker-compose.yml to enable them — just add the variables to .env. See .env.example for the full list.

Required

VariableDescription
JWT_SECRETAuth secret. Generate: openssl rand -base64 32

Ports & Directories

VariableDefaultDescription
FRONTEND_PORT3000Web UI port
BACKEND_PORT8091API port
BASE_DIRauto-detectedHost path that maps to /app. Auto-detected from the /app/servers mount; the env var is only a fallback for local dev / non-Docker runs
BACKUP_BASE_DIR(empty)Optional host path for backups (e.g. /network-disk/minepanel). Empty keeps the default ${BASE_DIR}/servers/<id>/backups. Can be overridden per server in the UI
COMPOSE_PROJECT(empty)Optional prefix for per-server Docker Compose project names (<prefix>_<serverId>)

Authentication

VariableDefaultDescription
JWT_EXPIRES_IN2dAccess token expiration (20s, 15m, 1h, 2d)
ALLOW_INSECURE_AUTH_COOKIESfalseSet true only for HTTP/LAN access when browsers block auth cookies

Minepanel no longer uses default credentials from environment variables. The first visit to the panel opens a setup screen where you create the initial admin account.

Password Recovery

Configurable from the panel

SMTP and OIDC can now be managed from Settings → Integrations (admin only), stored encrypted in the database. The variables below are still supported as a fallback; a value set in the panel overrides the matching variable. Secrets are write-only (never returned to the browser).

VariableDefaultDescription
SMTP_HOST(empty)SMTP server hostname
SMTP_PORT587SMTP port
SMTP_SECUREfalseUse true for SMTPS/465, false for STARTTLS/587
SMTP_USER(empty)SMTP username
SMTP_PASS(empty)SMTP password
SMTP_FROM(empty)Sender shown in password reset emails
PASSWORD_RESET_TOKEN_EXPIRES_IN_MINUTES60Password reset link lifetime in minutes

Single Sign-On (OIDC)

Optional. Enabled only when OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET and OIDC_REDIRECT_URI are all set. Works with any OpenID Connect provider (Authentik, Authelia, Keycloak, Google, ...). See the Single Sign-On guide for setup.

VariableDefaultDescription
OIDC_ISSUER(empty)Provider issuer URL (endpoints are auto-discovered)
OIDC_CLIENT_ID(empty)OAuth2 client ID
OIDC_CLIENT_SECRET(empty)OAuth2 client secret (kept server-side only)
OIDC_REDIRECT_URI(empty)Backend callback, e.g. https://api.example.com/auth/oidc/callback
OIDC_SCOPESopenid email profileSpace-separated scopes
OIDC_PROVIDER_NAMESSOLabel shown on the login button
OIDC_DISABLE_PASSWORD_LOGINfalsetrue hides and blocks password login (SSO only)

URLs

VariableDefaultDescription
FRONTEND_URLhttp://localhost:3000Controls CORS
NEXT_PUBLIC_BACKEND_URLhttp://localhost:8091API URL for frontend
BASE_PATH(empty)Backend API prefix such as /api
NEXT_PUBLIC_BASE_PATH(empty)Frontend route prefix such as /minepanel
NEXT_PUBLIC_DEFAULT_LANGUAGEenen, es, nl, de, pl

CORS

FRONTEND_URL must match how you access the panel. Mismatch = blocked requests.

Authentication over HTTP

In production, authentication cookies are secure by default. If you access Minepanel over plain HTTP (for example via local IP), browsers may reject secure cookies and login can get stuck on "Verifying authentication...".

You can explicitly opt in to HTTP auth cookies with:

bash
ALLOW_INSECURE_AUTH_COOKIES=true

Use this only for trusted LAN/development environments. Prefer HTTPS whenever possible.

Quick Reference

Pick a preset and copy it to your .env file:

Development on the same machine.

JWT_SECRET=your_secret
JWT_EXPIRES_IN=2d

Network Settings

Public IP, LAN IP, and Proxy settings are configured through the web UI:

Settings → Network Settings / Settings → Proxy Settings

Advanced

Base Directory (host path)

BASE_DIR is the absolute host path that maps to /app inside the container — the directory that holds servers/ and data/. Because each Minecraft server runs through the host Docker daemon (via the mounted socket), the generated compose files use host paths built from this value, not container paths.

You normally don't need to set it: at startup Minepanel asks Docker for the real host source of the /app/servers mount and uses it, so the path always matches wherever you mounted the data. The BASE_DIR env var is only a fallback for local dev or non-Docker runs:

bash
BASE_DIR=/mnt/external/minepanel

If you set BASE_DIR and it doesn't match the detected mount, Minepanel logs a warning and uses the detected path. This is why custom composes that mounted data into a subdirectory (e.g. ./minepanel/servers:/app/servers) no longer end up writing servers to the wrong host folder.

Multiple Instances

Run on different ports:

bash
# Instance 1
FRONTEND_PORT=3000
BACKEND_PORT=8091

# Instance 2
FRONTEND_PORT=3001
BACKEND_PORT=8092

Subdirectory Routing

Use these variables when Minepanel is served behind a reverse proxy under subpaths instead of the domain root.

VariableWhat it affectsExample
NEXT_PUBLIC_BASE_PATHFrontend URLs generated by Next.js/minepanel
BASE_PATHBackend route prefix in NestJS/api
NEXT_PUBLIC_BACKEND_URLFull backend URL used by the frontendhttps://mydomain.com/api

Example for https://mydomain.com/minepanel talking to https://mydomain.com/api:

yaml
# docker-compose.development.yml
frontend:
  build:
    args:
      - NEXT_PUBLIC_BASE_PATH=/minepanel
  environment:
    - NEXT_PUBLIC_BASE_PATH=/minepanel
    - NEXT_PUBLIC_BACKEND_URL=https://mydomain.com/api

backend:
  environment:
    - BASE_PATH=/api

WARNING

NEXT_PUBLIC_BASE_PATH changes the Next.js basePath, so it must be present at build time. For custom Docker builds, keep the runtime value aligned with the build arg so healthchecks and diagnostics use the same path.

INFO

Prebuilt frontend images cannot switch to a different NEXT_PUBLIC_BASE_PATH at runtime only. If you need /minepanel, build the frontend image with that value.

Released under the MIT License. · Anonymous, cookieless analytics (self-hosted Umami).