Installation Guide¶
This guide walks you through installing mcctl and setting up the required dependencies.
System Requirements¶
| Component | Minimum Version | Recommended | Notes |
|---|---|---|---|
| Node.js | >= 18.0.0 | 20 LTS | Required for mcctl CLI |
| Docker Engine | >= 24.0.0 | Latest | Container runtime |
| Docker Compose | >= 2.20.0 | Latest | include feature required |
| OS | Linux, macOS | Ubuntu 22.04+ | Windows via WSL2 |
Docker Compose Version
Docker Compose v2.20.0 or higher is required. The include directive used by mcctl was introduced in this version. Check your version with docker compose version.
Prerequisites¶
Before installing mcctl, ensure you have the following installed:
Docker¶
Docker is required to run Minecraft servers. Install Docker Engine:
# Add Docker's official GPG key
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Add your user to docker group
sudo usermod -aG docker $USER
newgrp docker
Download and install Docker Desktop for Mac.
Verify Docker installation:
docker --version
# Docker version 24.0.0 or higher
docker compose version
# Docker Compose version v2.20.0 or higher
Node.js¶
Node.js 18 or higher is required:
Verify Node.js installation:
Installing mcctl¶
Global Installation (Recommended)¶
Install mcctl globally via npm:
Or using pnpm:
Verify installation:
Using npx (No Installation)¶
You can also run mcctl without installing:
Platform Initialization¶
After installing mcctl, initialize the platform:
This creates the platform directory structure at ~/minecraft-servers/:
~/minecraft-servers/
├── docker-compose.yml # Main orchestration
├── .env # Environment configuration
├── servers/ # Server configurations
│ ├── compose.yml # Server include list
│ └── _template/ # Server template
├── worlds/ # Shared world storage
├── shared/ # Shared plugins/mods
│ ├── plugins/
│ └── mods/
├── scripts/ # Management scripts
└── backups/ # Backup storage
Optional: mDNS Setup¶
For local network discovery using .local hostnames, install avahi-daemon:
nip.io Recommended
nip.io magic DNS is recommended over mDNS as it works without any client configuration. See Networking Guide for details.
Configuration¶
Edit the environment file to customize settings:
Key settings:
# Your server's IP address (required for nip.io)
HOST_IP=192.168.1.100
# For VPN mesh with multiple IPs (Tailscale/ZeroTier)
# HOST_IPS=192.168.1.100,100.64.0.5
# Default server settings
DEFAULT_MEMORY=4G
DEFAULT_VERSION=1.20.4
# Timezone
TZ=Asia/Seoul
# RCON password (change in production!)
RCON_PASSWORD=changeme
Verifying Installation¶
Run the status command to verify everything is working:
Expected output:
Platform Status
===============
Router: mc-router (running)
Servers: 0
No servers configured. Create one with:
mcctl create <name>
Troubleshooting¶
Docker Permission Denied¶
If you get a permission error:
# Add your user to the docker group
sudo usermod -aG docker $USER
# Apply the group change
newgrp docker
Port 25565 Already in Use¶
Check if another process is using port 25565:
Stop the conflicting service or change the port in docker-compose.yml.
mcctl Command Not Found¶
Ensure npm global bin is in your PATH:
# For npm
export PATH="$PATH:$(npm config get prefix)/bin"
# Add to ~/.bashrc for persistence
echo 'export PATH="$PATH:$(npm config get prefix)/bin"' >> ~/.bashrc
Next Steps¶
- Quick Start - Create your first Minecraft server
- CLI Commands - Learn all available commands
- Configuration - Customize server settings