Skip to content

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:

Terminal window
mkdir crafty-controller-klutch
cd crafty-controller-klutch
git init

This 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 variables
ENV DEBIAN_FRONTEND=noninteractive \
CRAFTY_ROOT=/crafty \
PYTHONUNBUFFERED=1
# Install system dependencies
RUN 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 directories
RUN 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 user
USER crafty
WORKDIR /crafty
# Clone Crafty Controller
RUN 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 script
COPY --chown=crafty:crafty start-crafty.sh /crafty/start-crafty.sh
RUN chmod +x /crafty/start-crafty.sh
# Expose Crafty web interface port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8000/api/v2/ping || exit 1
# Start Crafty Controller
CMD ["/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/bash
set -e
echo "Starting Crafty Controller..."
cd /crafty/app
# Set configuration from environment variables
if [ ! -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"
fi
fi
# Create necessary directories
mkdir -p /crafty/servers /crafty/backups /crafty/logs /crafty/db
# Start Crafty Controller
exec 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/logs

Step 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 ready
until curl -s http://localhost:8000/api/v2/ping > /dev/null; do
echo "Waiting for Crafty Controller to start..."
sleep 2
done
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 login
fi
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:

Terminal window
# Build the Docker image
docker build -t my-crafty-controller .
# Create volumes for persistent data
docker volume create crafty-servers
docker volume create crafty-backups
docker volume create crafty-db
# Run the container
docker 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 logs
docker logs -f crafty-controller
# Access Crafty Controller at http://localhost:8000

When you’re done testing:

Terminal window
# Stop and remove containers
docker stop crafty-controller
docker rm crafty-controller
docker volume rm crafty-servers crafty-backups crafty-db

Step 7: Prepare Your Repository for Deployment

Commit your configuration files to your GitHub repository:

Terminal window
git add Dockerfile start-crafty.sh config.json init-crafty.sh
git commit -m "Add Crafty Controller Docker configuration and setup scripts"
git remote add origin https://github.com/yourusername/crafty-controller-klutch.git
git branch -M main
git push -u origin main

Environment 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=admin
CRAFTY_ADMIN_PASSWORD=your_secure_password_here

Server Configuration:

CRAFTY_HOST=0.0.0.0
CRAFTY_PORT=8000
CRAFTY_DATA_DIR=/crafty/db
CRAFTY_SERVERS_DIR=/crafty/servers
CRAFTY_BACKUPS_DIR=/crafty/backups
CRAFTY_LOGS_DIR=/crafty/logs

Java Settings:

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
DEFAULT_JAVA_MEMORY=2048
DEFAULT_JAVA_PATH=/usr/bin/java

Optional Environment Variables

Backup Configuration:

CRAFTY_BACKUP_ENABLED=true
CRAFTY_BACKUP_MAX=7
CRAFTY_BACKUP_COMPRESS=true
CRAFTY_BACKUP_SCHEDULE=0 2 * * *

Performance Settings:

CRAFTY_MAX_SERVERS=10
CRAFTY_MONITORING_ENABLED=true
CRAFTY_MONITORING_INTERVAL=30

Notification Settings:

CRAFTY_EMAIL_ENABLED=false
CRAFTY_EMAIL_HOST=smtp.gmail.com
CRAFTY_EMAIL_PORT=587
CRAFTY_EMAIL_USER=notifications@example.com
CRAFTY_EMAIL_PASSWORD=app_password_here

Security Settings:

CRAFTY_SESSION_TIMEOUT=3600
CRAFTY_ENABLE_2FA=false
CRAFTY_ALLOWED_IPS=0.0.0.0/0

Important 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

  1. Servers Directory (/crafty/servers) - Minecraft server installations, worlds, plugins, and configurations
  2. Backups Directory (/crafty/backups) - Compressed backup archives of server worlds and data
  3. Database Directory (/crafty/db) - Crafty Controller configuration and user database
  4. Logs Directory (/crafty/logs) - Server logs and Crafty Controller operational logs

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

    1. Log in to Klutch.sh

      Navigate to klutch.sh/app and sign in to your account.

    2. Create a New Project

      From your dashboard, create a new project. Give it a meaningful name like “Minecraft Server Network” to organize your deployments.

    3. Create a New App

      Within your project, create a new app for your Crafty Controller instance.

    4. 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 main or master)
    5. 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.

    6. 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 username
      • CRAFTY_ADMIN_PASSWORD - A strong admin password (mark as secret)
      • CRAFTY_HOST - Set to 0.0.0.0
      • CRAFTY_PORT - Set to 8000
    7. 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
    8. 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.

    9. 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
    10. 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.

    11. 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

  1. 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.

  2. 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
  3. 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
  4. Configure Server Properties

    Customize your server through the properties editor:

    # Server Properties
    server-port=25565
    max-players=20
    view-distance=10
    simulation-distance=10
    spawn-protection=16
    enable-command-block=false
    pvp=true
    difficulty=normal
    gamemode=survival
    hardcore=false
    white-list=false
    online-mode=true
  5. 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:

Terminal window
# From Crafty web console
/start server_name
/stop server_name
/restart server_name
# Or use the control buttons in the dashboard

Executing Server Commands:

Use the real-time console to execute Minecraft commands:

Terminal window
# 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 report

Creating 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-all

Backup and Restore

Creating Manual Backups:

  1. Navigate to server dashboard
  2. Click “Backups” tab
  3. Click “Create Backup Now”
  4. Add optional description
  5. 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:

  1. Stop the server
  2. Navigate to Backups tab
  3. Select backup to restore
  4. Click “Restore Backup”
  5. Confirm restoration
  6. Start server after restoration completes

User Management and Permissions

Creating Additional Users:

  1. Navigate to Users section
  2. Click “Add User”
  3. 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 access

Plugin and Mod Management

Installing Plugins (Spigot/Paper servers):

  1. Navigate to server Files tab
  2. Open /plugins directory
  3. Upload plugin JAR files
  4. 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):

  1. Download compatible mods
  2. Upload to /mods directory
  3. Configure mod settings in /config
  4. 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/20
Uptime: 4d 3h 15m
Network:
- Download: 2.5 MB/s
- Upload: 1.8 MB/s
Storage:
- World Size: 2.4 GB
- Total Used: 15.3 GB

Setting 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:25565

Bedrock Edition Connection:

For Bedrock servers, use:

Server Address: example-app.klutch.sh
Port: 19132

Production 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 optimizations
view-distance=8
simulation-distance=6
network-compression-threshold=256
max-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=1

Resource 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:

Terminal window
# Automated daily backups
Frequency: Daily at 2 AM
Retention: 7 days
Compression: Enabled
Verify: Automatic integrity check
# Weekly full backups
Frequency: Sunday at 1 AM
Retention: 4 weeks
Include: Worlds, configs, databases
Location: Separate backup volume
# Pre-update backups
Trigger: Before any server updates
Retention: Until update verified
Include: Complete server directory

Scaling 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+ GB

Troubleshooting

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:


Advanced Configuration

Custom Domain Configuration

Use your own domain for better branding:

  1. Configure custom domain in Klutch.sh (see custom domains guide)
  2. Update DNS records to point to your Klutch.sh app
  3. Configure SRV records for automatic Minecraft connection:
Service: _minecraft._tcp.yourdomain.com
Priority: 0
Weight: 5
Port: 25565
Target: example-app.klutch.sh

Players 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.yml
listeners:
- 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:
- lobby

Server Configuration for Proxy:

# Each Minecraft server server.properties
online-mode=false
bungeecord=true
server-port=25565

Advanced 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 requests
import 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()
# Usage
api = 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 notification
send_discord_notification(
webhook_url="https://discord.com/api/webhooks/...",
title="Server Started",
description="Survival server has started successfully",
color=0x00ff00
)

Additional Resources


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.