Deploying a Crafty Controller App
Introduction
Crafty Controller is a powerful web-based control panel designed for managing Minecraft servers. It provides an intuitive interface for server administrators to create, configure, and monitor multiple Minecraft server instances from a single dashboard. Whether you’re running a small private server for friends or managing a network of public game servers, Crafty Controller simplifies the complexity of server management while giving you complete control over your gaming infrastructure.
What sets Crafty Controller apart is its comprehensive feature set combined with ease of use. You get automated backups, real-time performance monitoring, player management tools, scheduled tasks, plugin management, and multi-server orchestration all through a clean web interface. No more SSH sessions and manual configuration files—Crafty Controller brings professional-grade server management to Minecraft administrators of all skill levels.
Whether you’re hosting vanilla Minecraft, modded servers, or running multiple game versions simultaneously, Crafty Controller handles the complexity. Deploying Crafty Controller on Klutch.sh gives you reliable hosting infrastructure with persistent storage for your server data and backups, easy scaling as your community grows, and the convenience of managing everything through a web browser from anywhere.
This comprehensive guide walks you through deploying Crafty Controller on Klutch.sh, configuring persistent storage for server files and backups, setting up authentication and user management, creating and managing Minecraft servers, and implementing best practices for running production game servers.
Why Deploy Crafty Controller on Klutch.sh?
- Automated Docker Detection: Klutch.sh automatically detects your Dockerfile in the repository root and builds your container without manual configuration
- Multi-Server Management: Run multiple Minecraft servers from a single Crafty Controller instance
- Persistent Storage: Built-in support for persistent volumes ensures your server data, worlds, and backups survive deployments
- Secure Administration: Environment variables for admin credentials are encrypted and never exposed in logs
- Production-Ready: Deploy game servers with confidence using containerized infrastructure
- Easy Scaling: Allocate more resources as your player base grows without migration hassles
- Reliable Uptime: Access your server management panel 24/7 from anywhere
Prerequisites
Before you begin deploying Crafty Controller on Klutch.sh, ensure you have:
- A Klutch.sh account with dashboard access
- A GitHub account for repository hosting
- Docker installed locally for testing (optional but recommended)
- Basic understanding of Minecraft server administration
- Familiarity with web applications and user management
- Knowledge of Docker containers and deployment concepts
- Understanding of game server requirements and performance considerations
- Sufficient storage for Minecraft worlds and backups (minimum 20GB recommended)
Understanding Crafty Controller Architecture
Technology Stack
Crafty Controller is built on modern technologies optimized for server management and real-time monitoring:
Core Platform:
- Python 3.9+ for the backend server and API with excellent cross-platform compatibility
- Tornado web framework for high-performance asynchronous web serving
- SQLite for local database storage of configurations and user data
- JavaScript/HTML5 for the web interface with real-time updates
- WebSocket support for live server console streaming
Key Components:
- Web Dashboard: Responsive interface for managing servers, users, and system settings
- Server Manager: Creates and controls Minecraft server instances with configurable parameters
- Console Monitor: Real-time console output streaming with command execution capabilities
- Backup System: Automated and manual backup creation with compression and retention policies
- Scheduler: Cron-like task scheduling for backups, restarts, and maintenance operations
- User Management: Multi-user support with role-based permissions and authentication
- Performance Monitor: Real-time CPU, memory, and disk usage tracking per server
- Plugin Manager: Install and configure server plugins and mods through the interface
- File Manager: Web-based file browser for editing server configurations and files
- API System: RESTful API for automation and integration with external tools
Features:
- Support for multiple Minecraft versions (Vanilla, Spigot, Paper, Forge, Fabric, Bedrock)
- Real-time server console with command history
- Automated scheduled backups with configurable retention
- Server templates for quick deployment
- Multi-user access with role-based permissions
- Real-time performance metrics and alerts
- Player whitelist and ban list management
- Scheduled restarts and maintenance windows
- Server status monitoring and notifications
- World management and backup restoration
- Plugin and mod management interface
- Custom Java arguments and server properties
- Log file viewing and searching
- Dark mode interface
Installation and Setup
Step 1: Create Your Project Directory
Start by creating a new directory for your Crafty Controller deployment project and initialize a Git repository:
mkdir crafty-controller-klutchcd crafty-controller-klutchgit initThis directory will contain your Dockerfile, configuration files, and scripts for your Minecraft server management panel.
Step 2: Create the Dockerfile
Create a Dockerfile in your project root directory. Klutch.sh will automatically detect this file and use it to build your container. Here’s a production-ready Dockerfile for Crafty Controller:
FROM python:3.11-slim
# Set environment variablesENV DEBIAN_FRONTEND=noninteractive \ CRAFTY_ROOT=/crafty \ PYTHONUNBUFFERED=1
# Install system dependenciesRUN apt-get update && apt-get install -y \ default-jre-headless \ git \ wget \ curl \ screen \ ca-certificates \ && rm -rf /var/lib/apt/lists/*
# Create crafty user and directoriesRUN useradd -m -d /crafty -s /bin/bash crafty \ && mkdir -p /crafty/servers \ /crafty/backups \ /crafty/logs \ /crafty/db \ && chown -R crafty:crafty /crafty
# Switch to crafty userUSER craftyWORKDIR /crafty
# Clone Crafty ControllerRUN git clone https://gitlab.com/crafty-controller/crafty-4.git /crafty/app \ && cd /crafty/app \ && python -m pip install --user --no-cache-dir -r requirements.txt
# Copy startup scriptCOPY --chown=crafty:crafty start-crafty.sh /crafty/start-crafty.shRUN chmod +x /crafty/start-crafty.sh
# Expose Crafty web interface portEXPOSE 8000
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -f http://localhost:8000/api/v2/ping || exit 1
# Start Crafty ControllerCMD ["/crafty/start-crafty.sh"]Key Features of This Dockerfile:
- Based on Python 3.11 slim image for optimal size and performance
- Includes Java Runtime Environment for running Minecraft servers
- Creates dedicated crafty user for security
- Installs all necessary dependencies including screen for server management
- Clones Crafty Controller from official repository
- Exposes port 8000 for web interface access
- Includes health check for monitoring
- Configures proper file permissions
Step 3: Create Startup Script
Create a start-crafty.sh script to initialize and start Crafty Controller:
#!/bin/bashset -e
echo "Starting Crafty Controller..."
cd /crafty/app
# Set configuration from environment variablesif [ ! -f /crafty/db/crafty.db ]; then echo "First run detected, initializing Crafty Controller..."
# Create default admin user if credentials provided if [ -n "$CRAFTY_ADMIN_USER" ] && [ -n "$CRAFTY_ADMIN_PASSWORD" ]; then echo "Admin credentials will be configured on first start" fifi
# Create necessary directoriesmkdir -p /crafty/servers /crafty/backups /crafty/logs /crafty/db
# Start Crafty Controllerexec python main.py \ --host 0.0.0.0 \ --port 8000 \ --data-dir /crafty/db \ --servers-dir /crafty/servers \ --backups-dir /crafty/backups \ --logs-dir /crafty/logsStep 4: Create Configuration File
Create a config.json file for Crafty Controller settings:
{ "web": { "host": "0.0.0.0", "port": 8000, "ssl": false }, "servers": { "max_servers": 10, "default_java_path": "/usr/bin/java" }, "backups": { "enabled": true, "max_backups": 7, "compress": true }, "monitoring": { "enabled": true, "interval": 30 }, "locale": "en_EN"}Step 5: Create Initial Setup Script
Create an init-crafty.sh script for first-time setup:
#!/bin/bash
# init-crafty.sh - Initialize Crafty Controller
set -e
echo "Initializing Crafty Controller..."
# Wait for Crafty to be readyuntil curl -s http://localhost:8000/api/v2/ping > /dev/null; do echo "Waiting for Crafty Controller to start..." sleep 2done
echo "Crafty Controller is ready!"
if [ -n "$CRAFTY_ADMIN_USER" ] && [ -n "$CRAFTY_ADMIN_PASSWORD" ]; then echo "Creating admin user: $CRAFTY_ADMIN_USER" # Admin user creation happens through web interface on first loginfi
echo "Setup complete. Access Crafty Controller at http://localhost:8000"Step 6: Test Locally with Docker (Optional)
Before deploying to Klutch.sh, you can test your Crafty Controller setup locally:
# Build the Docker imagedocker build -t my-crafty-controller .
# Create volumes for persistent datadocker volume create crafty-serversdocker volume create crafty-backupsdocker volume create crafty-db
# Run the containerdocker run -d \ --name crafty-controller \ -p 8000:8000 \ -p 25565:25565 \ -e CRAFTY_ADMIN_USER=admin \ -e CRAFTY_ADMIN_PASSWORD=secure_password \ -v crafty-servers:/crafty/servers \ -v crafty-backups:/crafty/backups \ -v crafty-db:/crafty/db \ my-crafty-controller
# Check logsdocker logs -f crafty-controller
# Access Crafty Controller at http://localhost:8000When you’re done testing:
# Stop and remove containersdocker stop crafty-controllerdocker rm crafty-controllerdocker volume rm crafty-servers crafty-backups crafty-dbStep 7: Prepare Your Repository for Deployment
Commit your configuration files to your GitHub repository:
git add Dockerfile start-crafty.sh config.json init-crafty.shgit commit -m "Add Crafty Controller Docker configuration and setup scripts"git remote add origin https://github.com/yourusername/crafty-controller-klutch.gitgit branch -M maingit push -u origin mainEnvironment Variables Configuration
Crafty Controller requires several environment variables for proper configuration. These should be configured in the Klutch.sh dashboard under your app’s environment variables section.
Essential Environment Variables
Admin Credentials:
CRAFTY_ADMIN_USER=adminCRAFTY_ADMIN_PASSWORD=your_secure_password_hereServer Configuration:
CRAFTY_HOST=0.0.0.0CRAFTY_PORT=8000CRAFTY_DATA_DIR=/crafty/dbCRAFTY_SERVERS_DIR=/crafty/serversCRAFTY_BACKUPS_DIR=/crafty/backupsCRAFTY_LOGS_DIR=/crafty/logsJava Settings:
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64DEFAULT_JAVA_MEMORY=2048DEFAULT_JAVA_PATH=/usr/bin/javaOptional Environment Variables
Backup Configuration:
CRAFTY_BACKUP_ENABLED=trueCRAFTY_BACKUP_MAX=7CRAFTY_BACKUP_COMPRESS=trueCRAFTY_BACKUP_SCHEDULE=0 2 * * *Performance Settings:
CRAFTY_MAX_SERVERS=10CRAFTY_MONITORING_ENABLED=trueCRAFTY_MONITORING_INTERVAL=30Notification Settings:
CRAFTY_EMAIL_ENABLED=falseCRAFTY_EMAIL_HOST=smtp.gmail.comCRAFTY_EMAIL_PORT=587CRAFTY_EMAIL_USER=notifications@example.comCRAFTY_EMAIL_PASSWORD=app_password_hereSecurity Settings:
CRAFTY_SESSION_TIMEOUT=3600CRAFTY_ENABLE_2FA=falseCRAFTY_ALLOWED_IPS=0.0.0.0/0Important Security Notes:
- Always use strong, unique passwords for admin accounts
- Change default credentials immediately after first login
- Never commit sensitive credentials to your Git repository
- Use Klutch.sh’s environment variable management for all secrets
- Consider restricting access by IP if possible
- Enable two-factor authentication for production deployments
Persistent Storage Configuration
Crafty Controller manages Minecraft server files, world data, backups, and databases that must persist across container restarts and deployments. You need to configure persistent volumes for critical directories.
Critical Directories for Persistence
- Servers Directory (
/crafty/servers) - Minecraft server installations, worlds, plugins, and configurations - Backups Directory (
/crafty/backups) - Compressed backup archives of server worlds and data - Database Directory (
/crafty/db) - Crafty Controller configuration and user database - Logs Directory (
/crafty/logs) - Server logs and Crafty Controller operational logs
Recommended Volume Configuration
When creating your Crafty Controller app on Klutch.sh, attach persistent volumes with the following mount paths:
Servers Volume:
- Mount Path:
/crafty/servers - Size: 50GB minimum (adjust based on number and size of servers)
- Purpose: Store all Minecraft server files, worlds, plugins, and configurations
Backups Volume:
- Mount Path:
/crafty/backups - Size: 30GB minimum (depends on backup retention policy)
- Purpose: Store compressed backup archives
Database Volume:
- Mount Path:
/crafty/db - Size: 5GB (for application database and settings)
- Purpose: Store Crafty Controller configuration and user data
Logs Volume:
- Mount Path:
/crafty/logs - Size: 10GB (for server and application logs)
- Purpose: Store all log files for debugging and monitoring
Volume Size Recommendations
- Single Server (1-2 Minecraft instances): 50GB servers, 30GB backups, 5GB db, 10GB logs
- Small Network (3-5 servers): 100GB servers, 50GB backups, 5GB db, 20GB logs
- Medium Network (6-10 servers): 200GB servers, 100GB backups, 10GB db, 30GB logs
- Large Network (10+ servers): 500GB+ servers, 200GB+ backups, 20GB db, 50GB+ logs
Storage requirements vary significantly based on Minecraft world sizes, number of players, installed mods, and backup retention. Plan accordingly for your expected usage patterns.
Deploying to Klutch.sh
Now that your Crafty Controller project is ready and pushed to GitHub, follow these steps to deploy it on Klutch.sh with persistent storage and proper configuration.
Deployment Steps
-
Log in to Klutch.sh
Navigate to klutch.sh/app and sign in to your account.
-
Create a New Project
From your dashboard, create a new project. Give it a meaningful name like “Minecraft Server Network” to organize your deployments.
-
Create a New App
Within your project, create a new app for your Crafty Controller instance.
-
Select Your Repository
- Choose GitHub as your Git source
- Select the repository containing your Crafty Controller Dockerfile
- Choose the branch you want to deploy (typically
mainormaster)
-
Configure Traffic Type
- Traffic Type: Select HTTP (Crafty Controller serves a web interface)
- Internal Port: Set to
8000(Crafty Controller’s default web port)
Note: For Minecraft server connections, players will connect through the Crafty Controller instance. You may need to configure additional port mappings for individual Minecraft servers.
-
Set Environment Variables
In the environment variables section, add all the Crafty Controller configuration variables listed in the “Environment Variables Configuration” section above. Ensure sensitive values like passwords are marked as secrets.
Critical Variables (minimum required):
CRAFTY_ADMIN_USER- Your admin usernameCRAFTY_ADMIN_PASSWORD- A strong admin password (mark as secret)CRAFTY_HOST- Set to 0.0.0.0CRAFTY_PORT- Set to 8000
-
Attach Persistent Volumes
This is critical for preserving your Minecraft servers and data. Add volumes for:
Servers Volume:
- Mount Path:
/crafty/servers - Size: 50GB (or larger based on your needs)
Backups Volume:
- Mount Path:
/crafty/backups - Size: 30GB (or larger for extensive backups)
Database Volume:
- Mount Path:
/crafty/db - Size: 5GB
Logs Volume:
- Mount Path:
/crafty/logs - Size: 10GB
- Mount Path:
-
Configure Compute Resources
Select appropriate compute resources based on your server load:
- Development/Testing: 2 CPU, 4GB RAM (for 1-2 small servers)
- Small Network: 4 CPU, 8GB RAM (for 3-5 servers with moderate players)
- Medium Network: 8 CPU, 16GB RAM (for 6-10 servers or high player counts)
- Large Network: 16+ CPU, 32GB+ RAM (for 10+ servers or heavily modded instances)
Important: Minecraft servers are resource-intensive. Allocate generous CPU and RAM based on expected player counts and installed mods.
-
Deploy Your Application
Click “Create” to start the deployment. Klutch.sh will:
- Automatically detect your Dockerfile in the repository root
- Build the Docker image with your configuration
- Attach the persistent volumes you specified
- Deploy the container with your environment variables
- Assign a URL for accessing your Crafty Controller instance
-
Access Your Crafty Controller Dashboard
Once deployment is complete, you’ll receive a URL like
example-app.klutch.sh. Navigate to this URL in your browser to access the Crafty Controller web interface. -
Complete Initial Setup
On first access, you’ll be prompted to:
- Log in with your admin credentials
- Complete the setup wizard
- Configure default server settings
- Set up backup policies
- Create your first Minecraft server
Getting Started with Crafty Controller
After deployment, follow these steps to create and manage your first Minecraft server.
Initial Setup and Configuration
-
Access Crafty Controller Dashboard
Navigate to your Klutch.sh app URL (e.g.,
https://example-app.klutch.sh) and log in with your admin credentials. -
Complete the Setup Wizard
- Review and confirm system settings
- Set timezone and locale preferences
- Configure default Java paths and memory allocation
- Set up backup retention policies
- Configure notification preferences
-
Create Your First Server
From the dashboard, click “Create New Server”:
Basic Configuration:
- Server Name: My Survival Server
- Server Type: Paper (recommended for performance)
- Minecraft Version: Latest stable version
- Server Port: 25565 (default Minecraft port)
Resource Allocation:
- Minimum RAM: 1024 MB
- Maximum RAM: 4096 MB
- CPU Priority: Normal
World Settings:
- Level Name: world
- Seed: (optional)
- Game Mode: Survival
- Difficulty: Normal
- Max Players: 20
-
Configure Server Properties
Customize your server through the properties editor:
# Server Propertiesserver-port=25565max-players=20view-distance=10simulation-distance=10spawn-protection=16enable-command-block=falsepvp=truedifficulty=normalgamemode=survivalhardcore=falsewhite-list=falseonline-mode=true -
Start Your Server
Click the “Start” button and monitor the console output as the server initializes. First-time startup will download necessary files and generate the world.
Managing Minecraft Servers
Starting and Stopping Servers:
# From Crafty web console/start server_name/stop server_name/restart server_name
# Or use the control buttons in the dashboardExecuting Server Commands:
Use the real-time console to execute Minecraft commands:
# Player management/whitelist add PlayerName/whitelist remove PlayerName/ban PlayerName/kick PlayerName
# Server management/save-all/save-off/save-on/say Server restart in 5 minutes/time set day/weather clear/difficulty peaceful
# Performance/tps/timings on/timings reportCreating Scheduled Tasks:
Set up automated tasks in the Schedules section:
Daily Restart:- Schedule: 0 4 * * * (4 AM daily)- Command: /stop- Action: Restart Server
Backup Schedule:- Schedule: 0 2 * * * (2 AM daily)- Action: Create Backup- Retention: 7 days
World Save:- Schedule: */30 * * * * (Every 30 minutes)- Command: /save-allBackup and Restore
Creating Manual Backups:
- Navigate to server dashboard
- Click “Backups” tab
- Click “Create Backup Now”
- Add optional description
- Wait for backup completion
Automated Backup Configuration:
{ "enabled": true, "schedule": "0 2 * * *", "retention": { "max_backups": 7, "compress": true, "exclude_dirs": ["logs", "crash-reports"] }}Restoring from Backup:
- Stop the server
- Navigate to Backups tab
- Select backup to restore
- Click “Restore Backup”
- Confirm restoration
- Start server after restoration completes
User Management and Permissions
Creating Additional Users:
- Navigate to Users section
- Click “Add User”
- Configure user details:
- Username: moderator
- Email: mod@example.com
- Password: Strong password
- Role: Moderator
Available Roles:
- Super Admin: Full system access
- Admin: Server management and user creation
- Moderator: Server console and player management
- User: View-only access
Permission Levels:
Super Admin:- Create/delete servers- Manage all users- System settings access- Full file system access
Admin:- Manage assigned servers- Create users (below admin)- View system stats- Limited file access
Moderator:- Start/stop servers- Console access- Player management- View logs
User:- View server status- View player lists- Read-only accessPlugin and Mod Management
Installing Plugins (Spigot/Paper servers):
- Navigate to server Files tab
- Open
/pluginsdirectory - Upload plugin JAR files
- Restart server to load plugins
Popular Plugin Recommendations:
Essential Plugins:- EssentialsX (commands and utilities)- LuckPerms (permission management)- Vault (economy and permissions API)- WorldEdit (world editing)- CoreProtect (rollback and logging)
Performance Plugins:- ClearLag (entity management)- FastAsyncWorldEdit (optimized world editing)- Spark (performance profiler)
Protection Plugins:- WorldGuard (region protection)- GriefPrevention (claim system)Installing Mods (Forge/Fabric servers):
- Download compatible mods
- Upload to
/modsdirectory - Configure mod settings in
/config - Restart server
Performance Monitoring
Real-Time Metrics:
Monitor server performance through the dashboard:
CPU Usage: 45%Memory: 3.2GB / 4GB (80%)TPS: 19.8 (target: 20)Players: 12/20Uptime: 4d 3h 15m
Network:- Download: 2.5 MB/s- Upload: 1.8 MB/s
Storage:- World Size: 2.4 GB- Total Used: 15.3 GBSetting Up Alerts:
Configure notifications for critical events:
{ "alerts": { "cpu_threshold": 90, "memory_threshold": 95, "tps_threshold": 15, "player_count": 18, "disk_usage": 85 }, "notification_methods": ["email", "webhook"]}Connecting to Your Server
Java Edition Connection:
Players connect using your server’s address. Since Crafty Controller runs behind Klutch.sh, you’ll need to configure port forwarding or use a proxy:
Server Address: example-app.klutch.sh:25565Bedrock Edition Connection:
For Bedrock servers, use:
Server Address: example-app.klutch.shPort: 19132Production Best Practices
Security Recommendations
Server Access Control:
- Enable server whitelist for private servers
- Use online mode to verify player authenticity
- Configure IP whitelisting in Crafty Controller
- Enable two-factor authentication for admin accounts
- Regularly review user permissions and access logs
Admin Panel Security:
- Use strong, unique passwords for all accounts
- Change default admin credentials immediately
- Limit user access to only necessary servers
- Enable session timeouts for inactive users
- Keep Crafty Controller updated with latest security patches
Network Security:
- Use HTTPS for all web access (Klutch.sh provides this)
- Configure firewall rules to limit exposed ports
- Monitor for suspicious connection attempts
- Implement rate limiting for login attempts
- Use reverse proxy for additional security layer
Data Protection:
- Enable automated backups with tested restoration procedures
- Store backups in separate volumes from server data
- Encrypt sensitive configuration files
- Regular security audits of plugin permissions
- Monitor server logs for security incidents
Performance Optimization
Server Configuration:
Optimize Minecraft server performance:
# server.properties optimizationsview-distance=8simulation-distance=6network-compression-threshold=256max-tick-time=60000
# JVM Arguments for better performance-Xms4G -Xmx4G-XX:+UseG1GC-XX:+ParallelRefProcEnabled-XX:MaxGCPauseMillis=200-XX:+UnlockExperimentalVMOptions-XX:+DisableExplicitGC-XX:+AlwaysPreTouch-XX:G1NewSizePercent=30-XX:G1MaxNewSizePercent=40-XX:G1HeapRegionSize=8M-XX:G1ReservePercent=20-XX:G1HeapWastePercent=5-XX:G1MixedGCCountTarget=4-XX:InitiatingHeapOccupancyPercent=15-XX:G1MixedGCLiveThresholdPercent=90-XX:G1RSetUpdatingPauseTimePercent=5-XX:SurvivorRatio=32-XX:+PerfDisableSharedMem-XX:MaxTenuringThreshold=1Resource Allocation:
- Allocate at least 2GB RAM per server minimum
- Reserve system resources for Crafty Controller overhead
- Monitor memory usage and adjust as needed
- Use G1GC garbage collector for better performance
- Limit chunk loading distance for better performance
World Optimization:
- Pre-generate chunks to reduce lag during exploration
- Remove unused chunks with world trimming tools
- Limit entity counts with plugins like ClearLag
- Optimize redstone contraptions
- Use server-side chunk rendering optimizations
Plugin Management:
- Only install necessary plugins
- Keep plugins updated to latest stable versions
- Remove unused or outdated plugins
- Test plugin compatibility before production deployment
- Monitor plugin performance impact
Monitoring and Maintenance
Health Monitoring:
- Check server TPS (target: 20.0) regularly
- Monitor memory usage and garbage collection
- Track player connection quality and latency
- Review crash reports and error logs
- Monitor disk space usage on all volumes
Regular Maintenance Tasks:
- Daily: Review server logs for errors
- Daily: Verify automated backups completed successfully
- Weekly: Check for Minecraft and plugin updates
- Weekly: Review player reports and moderation logs
- Monthly: Clean up old backups and logs
- Monthly: Optimize world files and databases
- Quarterly: Review and update server configurations
- Quarterly: Audit user permissions and access
Backup Strategy:
Implement comprehensive backup procedures:
# Automated daily backupsFrequency: Daily at 2 AMRetention: 7 daysCompression: EnabledVerify: Automatic integrity check
# Weekly full backupsFrequency: Sunday at 1 AMRetention: 4 weeksInclude: Worlds, configs, databasesLocation: Separate backup volume
# Pre-update backupsTrigger: Before any server updatesRetention: Until update verifiedInclude: Complete server directoryScaling Considerations
Single Server Scaling:
- Vertical scaling (more CPU/RAM) for single server performance
- Optimize world settings before adding resources
- Monitor resource usage patterns
- Plan capacity for peak player times
Multi-Server Scaling:
- Distribute players across multiple server instances
- Use BungeeCord or Velocity for server network
- Implement load balancing for player connections
- Share storage for synchronized configurations
Resource Planning:
Per Server Resource Guide:
Vanilla Server (10-20 players):- CPU: 2 cores- RAM: 2-4 GB- Disk: 5-10 GB
Modded Server (10-20 players):- CPU: 4 cores- RAM: 6-8 GB- Disk: 15-30 GB
Large Network (50+ players):- CPU: 8-16 cores- RAM: 16-32 GB- Disk: 100+ GBTroubleshooting
Common Issues and Solutions
Issue: Cannot Access Crafty Controller Web Interface
- Check: Verify container is running in Klutch.sh dashboard
- Check: Confirm internal port 8000 is correctly configured
- Check: Ensure HTTP traffic type is selected (not TCP)
- Check: Review container logs for startup errors
- Solution: Restart deployment if configuration changed
- Solution: Verify environment variables are set correctly
Issue: Unable to Log In with Admin Credentials
- Check: Verify CRAFTY_ADMIN_USER and CRAFTY_ADMIN_PASSWORD are set
- Check: Ensure password doesn’t contain special characters needing escaping
- Check: Check if database was initialized correctly
- Solution: Reset admin password through database
- Solution: Recreate deployment with correct credentials
Issue: Minecraft Server Won’t Start
- Check: Verify sufficient RAM allocated to server
- Check: Confirm Java is installed and accessible
- Check: Review server logs for error messages
- Check: Ensure required files (server JAR) are present
- Solution: Check EULA acceptance in eula.txt
- Solution: Verify Minecraft version compatibility
- Solution: Increase memory allocation for server
Issue: Server Lag or Low TPS
- Cause: Insufficient resources or poorly optimized configuration
- Check: Monitor CPU and memory usage during gameplay
- Check: Review TPS reports and timing data
- Solution: Increase allocated RAM and CPU
- Solution: Reduce view distance and simulation distance
- Solution: Remove problematic plugins or entities
- Solution: Pre-generate chunks around spawn
Issue: Backups Failing
- Check: Verify backup volume has sufficient space
- Check: Confirm backup directory permissions
- Check: Review Crafty Controller logs for backup errors
- Solution: Increase backup volume size
- Solution: Reduce backup retention count
- Solution: Check disk space on all volumes
Issue: Players Cannot Connect to Server
- Check: Verify server is running and showing as online
- Check: Confirm port 25565 is accessible
- Check: Ensure online-mode setting matches player accounts
- Check: Review firewall rules and port forwarding
- Solution: Check server.properties for correct port configuration
- Solution: Verify whitelist settings if enabled
- Solution: Test connection from different network
Issue: Persistent Data Lost After Redeployment
- Cause: Persistent volumes not properly attached
- Check: Verify volume mount paths match exactly:
/crafty/servers,/crafty/backups,/crafty/db,/crafty/logs - Check: Confirm volumes have sufficient available space
- Solution: Re-attach volumes with correct mount paths before deploying
- Solution: Restore from backups if data was lost
Issue: High Memory Usage
- Cause: Java memory leaks or insufficient garbage collection
- Solution: Restart servers periodically (scheduled task)
- Solution: Adjust JVM arguments for better memory management
- Solution: Reduce loaded chunks and entities
- Solution: Increase container RAM allocation
Getting Help
If you encounter issues not covered here:
- Review Crafty Controller documentation
- Check the Crafty Controller Discord
- Visit Crafty Controller GitLab issues
- Review Minecraft server documentation
- Contact Klutch.sh support through the dashboard
Advanced Configuration
Custom Domain Configuration
Use your own domain for better branding:
- Configure custom domain in Klutch.sh (see custom domains guide)
- Update DNS records to point to your Klutch.sh app
- Configure SRV records for automatic Minecraft connection:
Service: _minecraft._tcp.yourdomain.comPriority: 0Weight: 5Port: 25565Target: example-app.klutch.shPlayers can then connect using just yourdomain.com without specifying the port.
Multi-Server Network Setup
Create a server network using BungeeCord or Velocity:
BungeeCord Configuration:
# BungeeCord config.ymllisteners:- host: 0.0.0.0:25577 motd: 'My Server Network' max_players: 100
servers: lobby: address: localhost:25565 motd: 'Lobby Server' survival: address: localhost:25566 motd: 'Survival Server' creative: address: localhost:25567 motd: 'Creative Server'
priorities:- lobbyServer Configuration for Proxy:
# Each Minecraft server server.propertiesonline-mode=falsebungeecord=trueserver-port=25565Advanced Backup Strategies
Implement sophisticated backup solutions:
#!/bin/bash# advanced-backup.sh - Tiered backup strategy
BACKUP_DIR="/crafty/backups"SERVER_DIR="/crafty/servers"
# Daily incremental backups (kept 7 days)create_daily_backup() { rsync -av --link-dest="${BACKUP_DIR}/daily.6" \ "${SERVER_DIR}/" "${BACKUP_DIR}/daily.0/"
# Rotate daily backups rm -rf "${BACKUP_DIR}/daily.7" for i in {6..0}; do [ -d "${BACKUP_DIR}/daily.$i" ] && \ mv "${BACKUP_DIR}/daily.$i" "${BACKUP_DIR}/daily.$((i+1))" done}
# Weekly full backups (kept 4 weeks)create_weekly_backup() { tar -czf "${BACKUP_DIR}/weekly_$(date +%Y%m%d).tar.gz" \ -C "${SERVER_DIR}" .
# Keep only last 4 weekly backups ls -t "${BACKUP_DIR}"/weekly_*.tar.gz | tail -n +5 | xargs rm -f}
# Monthly archives (kept 12 months)create_monthly_backup() { tar -czf "${BACKUP_DIR}/monthly_$(date +%Y%m).tar.gz" \ -C "${SERVER_DIR}" .
# Keep only last 12 monthly backups ls -t "${BACKUP_DIR}"/monthly_*.tar.gz | tail -n +13 | xargs rm -f}API Integration
Use Crafty Controller’s API for automation:
import requestsimport json
class CraftyAPI: def __init__(self, base_url, api_key): self.base_url = base_url self.headers = { 'Authorization': f'Bearer {api_key}', 'Content-Type': 'application/json' }
def get_servers(self): """List all servers""" response = requests.get( f'{self.base_url}/api/v2/servers', headers=self.headers ) return response.json()
def start_server(self, server_id): """Start a specific server""" response = requests.post( f'{self.base_url}/api/v2/servers/{server_id}/start', headers=self.headers ) return response.json()
def execute_command(self, server_id, command): """Execute command on server""" data = {'command': command} response = requests.post( f'{self.base_url}/api/v2/servers/{server_id}/console', headers=self.headers, json=data ) return response.json()
def create_backup(self, server_id): """Create server backup""" response = requests.post( f'{self.base_url}/api/v2/servers/{server_id}/backup', headers=self.headers ) return response.json()
# Usageapi = CraftyAPI('https://example-app.klutch.sh', 'your-api-key')servers = api.get_servers()for server in servers['data']: print(f"Server: {server['name']} - Status: {server['status']}")Webhook Integration
Set up webhooks for Discord notifications:
import requests
def send_discord_notification(webhook_url, title, description, color): """Send notification to Discord webhook""" data = { "embeds": [{ "title": title, "description": description, "color": color, "timestamp": datetime.utcnow().isoformat() }] } requests.post(webhook_url, json=data)
# Example: Server start notificationsend_discord_notification( webhook_url="https://discord.com/api/webhooks/...", title="Server Started", description="Survival server has started successfully", color=0x00ff00)Additional Resources
- Crafty Controller Official Website
- Crafty Controller Documentation
- Crafty Controller GitLab Repository
- Crafty Controller Discord Community
- Minecraft Server Wiki
- SpigotMC Resources
- Klutch.sh Volumes Guide
- Klutch.sh Deployments Guide
- Klutch.sh Custom Domains Guide
- Klutch.sh Quick Start Guide
Conclusion
Deploying Crafty Controller on Klutch.sh provides a powerful, user-friendly platform for managing your Minecraft server infrastructure. With automated Docker detection, persistent storage for server data and backups, secure environment variable management, and the flexibility to run multiple servers, Klutch.sh simplifies game server hosting while maintaining professional-grade reliability.
By following this comprehensive guide, you’ve learned how to:
- Create a production-ready Dockerfile for Crafty Controller with Java and dependencies
- Configure persistent volumes for server files, backups, databases, and logs
- Set up environment variables securely for authentication and server configuration
- Create and manage multiple Minecraft server instances through a web interface
- Implement automated backups with configurable retention policies
- Monitor server performance with real-time metrics and alerts
- Manage users, permissions, and multi-user access
- Install and configure plugins and mods for enhanced gameplay
- Execute server commands and schedule automated tasks
- Optimize server performance for better player experience
- Troubleshoot common server and deployment issues
- Integrate with external tools using the Crafty Controller API
Your Crafty Controller instance is now ready to host Minecraft servers for your community. As your player base grows, you can easily scale your Klutch.sh deployment by allocating additional compute resources, expanding persistent storage, and adding more server instances to handle increased demand.