CLI tool for managing Docker Minecraft servers with mc-router
npm install @minecraft-docker/mcctlCLI tool for managing Docker Minecraft servers with mc-router.
- Multi-server management with hostname-based routing
- Auto-scaling: Servers start on connect, stop when idle
- Interactive mode: Guided prompts for all operations
- World management: Assign and release worlds between servers
- Backup system: GitHub-based world backup and restore
``bash`
npm install -g @minecraft-docker/mcctl
`bashInitialize platform in ~/minecraft-servers
mcctl init
Commands
| Command | Description |
|---------|-------------|
|
mcctl init | Initialize the platform |
| mcctl create [name] | Create a new server |
| mcctl delete [name] | Delete a server |
| mcctl status | Show all server status |
| mcctl start | Start a server |
| mcctl stop | Stop a server |
| mcctl logs | View server logs |
| mcctl world list | List all worlds |
| mcctl world assign | Assign world to server |
| mcctl world release | Release world from server |
| mcctl backup push | Backup worlds to GitHub |
| mcctl backup restore | Restore worlds from backup |
| mcctl update | Update mcctl CLI to latest version |
| mcctl update --all | Update CLI and all installed services |Server Types
| Type | Description |
|------|-------------|
|
PAPER | Paper server (default, recommended) |
| VANILLA | Official Minecraft server |
| FORGE | Forge mod server |
| NEOFORGE | NeoForge mod server (1.20.1+) |
| FABRIC | Fabric mod server |
| MODRINTH | Modrinth modpack server |Requirements
- Node.js >= 18.0.0
- Docker & Docker Compose
- Linux or macOS
Changelog
$3
- fix(cli): Fix Better Auth password hashing - use hex string salt for compatibility
- fix(cli): Add MCCTL_API_KEY env var to mcctl-console PM2 config (#261)$3
- fix(console): Explicitly pass baseURL and secret to Better Auth config
- fix(console): Fix HTTP session persistence - disable Secure cookies on HTTP environments
- fix(console): Remove duplicate trustedOrigins entry for localhost:5000$3
- fix(cli): Correct BETTER_AUTH_URL to BETTER_AUTH_BASE_URL in ecosystem.config.cjs
- fix(console): Fix trustedOrigins env var name to BETTER_AUTH_BASE_URL
- fix(console): Use MCCTL_ROOT env var for DB path resolution in db.ts
- fix(console): Add missing user_servers table to auto-creation DDL
- fix(cli,api): Move audit.db to MCCTL_ROOT/data/audit.db$3
- fix(cli): Replace NEXTAUTH_SECRET/NEXTAUTH_URL with BETTER_AUTH_SECRET/BETTER_AUTH_URL in ecosystem.config.cjs
- fix(console): Auto-create Better Auth SQLite tables (users, accounts, sessions, verifications) on startup$3
- fix(console): Change auth client baseURL from localhost:5000 to empty string for production deployment
- fix(console): Add NEXT_PUBLIC_APP_URL env var support to trustedOrigins$3
- feat(cli): Auto-install mcctl-console package in console init`Get help using mcctl with our AI-powered assistant:
- AI Assistant chatbot - Interactive Q&A about mcctl commands, configuration, and troubleshooting
You can also use the LLM Knowledge Base with ChatGPT, Claude, or other AI assistants:
1. Download the knowledge base document
2. Upload to your preferred AI assistant
3. Ask questions about mcctl usage
- Full Documentation
- REST API Reference
- GitHub Repository
Apache-2.0