Skip to content

Docker Compose

DiscoPanel manages Minecraft servers as Docker containers, so Docker is required.

The recommended way to run DiscoPanel. Create a docker-compose.yml or use the one from the repo:

docker-compose.yml
services:
discopanel:
image: nickheyer/discopanel:latest
container_name: discopanel
restart: unless-stopped
# Option 1 (RECOMENDED FOR SIMPLICITY): Use host network mode
network_mode: host
# Option 2 (MORE COMPLICATED, ONLY USE IF YOU NEEDED): Use bridge mode with port mapping (default)
#
# NOTE: Only specify minecraft server ports (25565 ... etc) for proxied minecraft servers using a hostname.
# Discopanel will automatically expose ports needed on the managed minecraft server instances. In other
# words, only the discopanel web port is needed + proxy port(s).
# ports:
# - "8080:8080" # DiscoPanel web interface
# - "25565:25565" # Minecraft port/proxy-port
# - "25565-25665:25565-25665/tcp" # Additional ports/proxy-ports if needed
# - "25565-25665:25565-25665/udp" # Also map UDP for some Minecraft features
volumes:
# Docker socket for managing containers
# NOTE FOR FEDORA/RHEL/CENTOS/ETC.: SE Linux requires :z to be added as a suffix to volume mounts. EX: - /var/run/docker.sock:/var/run/docker.sock:z
- /var/run/docker.sock:/var/run/docker.sock
# IMPORTANT: This is where your server(s) data will be stored on the host.
# You can set this to any path you'd like, but the path must exist AND you must use the same
# absolute paths below for the below env vars (in the environment section at the bottom). Example:
# DISCOPANEL_DATA_DIR=/app/data
# DISCOPANEL_HOST_DATA_PATH=/opt/discopanel/data
# (See environment)
- /opt/discopanel/data:/app/data
- /opt/discopanel/backups:/app/backups
- /tmp/discopanel:/app/tmp
# Configuration file, uncomment if you are using a config file (optional, see config.example.yaml for all available options).
#- ./config.yaml:/app/config.yaml:ro
environment:
- DISCOPANEL_DATA_DIR=/app/data
# IMPORTANT: THIS MUST BE SET TO THE SAME PATH AS THE SERVER DATA PATH IN "volumes" above
- DISCOPANEL_HOST_DATA_PATH=/opt/discopanel/data
- TZ=UTC
# ── Authentication ──────────────────────────
# Local auth (username/password) is on by default.
# You create your first admin account on first login.
#
# Want to let new users sign up on their own?
# - DISCOPANEL_AUTH_LOCAL_ALLOW_REGISTRATION=true
#
# Want single sign-on (OIDC) with Keycloak, Authelia, etc?
# See the oidc/ folder for examples.
# DONT FORGET THIS
extra_hosts:
- "host.docker.internal:host-gateway"

Spin up your service:

Terminal window
docker compose up -d

DiscoPanel creates Docker bind mounts for each managed Minecraft server. When DiscoPanel runs inside a container, it needs to know both the container-internal path and the corresponding host path to set up those mounts correctly.

VariablePurposeExample
DISCOPANEL_HOST_DATA_PATHThe host path that DISCOPANEL_DATA_DIR is mounted from/opt/discopanel/data
DISCOPANEL_DATA_DIRWhere DiscoPanel reads/writes data inside the container — you can usually leave this as the default/app/data

These must correspond to the same volume entry. If your compose file maps /srv/minecraft/data:/app/data, then set DISCOPANEL_HOST_DATA_PATH=/srv/minecraft/data.

Once running, open http://<your-host>:8080 and create your admin account.

For all available configuration options, see Configuration.