Deploying an EasyWI App
Introduction
Easy-Wi (Easy Web Interface) is a powerful open-source web interface and game server management panel designed to simplify the administration of game servers, voice servers, and root/virtual servers. Built specifically for hosting providers, communities, and gaming networks, Easy-Wi provides an intuitive control panel that eliminates the complexity of managing multiple game server instances.
Easy-Wi excels at:
- Multi-Game Support: Manage Counter-Strike, Minecraft, Team Fortress, and dozens of other game servers from a single interface
- Voice Server Management: Integrated TeamSpeak 3 and Mumble server provisioning and administration
- User Management: Role-based access control with detailed permission systems for clients and resellers
- Automated Installation: One-click game server creation with automatic configuration
- File Manager: Web-based file browser with syntax highlighting for server configuration files
- Template System: Reusable server templates with predefined settings and mods
- Billing Integration: Track server usage, create invoices, and manage customer accounts
- Multi-Server Architecture: Distribute game servers across multiple dedicated servers
- Backup & Restore: Automated backup scheduling with one-click restoration
- Resource Monitoring: Real-time CPU, RAM, and bandwidth usage tracking per server
- RCON Integration: Execute console commands remotely through the web interface
- Update Management: Automated game server updates using SteamCMD integration
Commonly used by game server hosting companies, eSports organizations, gaming communities, and LAN party organizers, Easy-Wi dramatically reduces the time and technical expertise required to operate a professional gaming infrastructure.
This comprehensive guide walks you through deploying Easy-Wi on Klutch.sh using Docker, including detailed installation steps, MySQL database configuration, persistent storage setup, and production-ready best practices for managing game servers at scale.
Prerequisites
Before you begin, ensure you have the following:
- A Klutch.sh account
- A GitHub account with a repository for your Easy-Wi deployment
- A MySQL database instance (can be provisioned on Klutch.sh - see our MySQL deployment guide)
- Docker installed locally for testing (optional but recommended)
- Basic understanding of Docker, PHP applications, and game server hosting concepts
- SSH access to game server machines if managing external dedicated servers
What is Easy-Wi?
Easy-Wi is a comprehensive web-based management panel written in PHP that provides a centralized interface for game server hosting operations. It acts as a middleware between your web interface and the actual game servers running on dedicated machines, communicating via SSH and RCON protocols.
Key Features
Game Server Management:
- Automated Provisioning: Create new game server instances with predefined templates
- Configuration Management: Edit server.cfg, mapcycle.txt, and other config files through the web interface
- Start/Stop/Restart: Control server lifecycle without SSH access
- Console Access: Execute RCON commands directly from the browser
- Mod Installation: One-click installation of popular game mods and plugins
- Workshop Integration: Automatic Steam Workshop content downloading for supported games
Voice Server Integration:
- TeamSpeak 3: Full TS3 server provisioning with virtual server management
- Mumble: Automated Mumble server creation and configuration
- Channel Management: Create, edit, and delete voice channels through the panel
- Permission System: Grant voice server admin rights to specific users
User & Billing System:
- Client Accounts: Self-service portal where customers manage their own servers
- Reseller System: Multi-tier reseller accounts with custom pricing and branding
- Invoice Generation: Automatic billing based on server usage and rental periods
- Support Tickets: Built-in ticket system for customer support
- Payment Integration: Connect with PayPal, Stripe, and other payment gateways
Server Distribution:
- Master/Slave Architecture: Deploy game servers across multiple dedicated machines
- Load Balancing: Automatically distribute new servers across available hardware
- Resource Quotas: Set CPU, RAM, and disk space limits per server
- IP Management: Assign specific IP addresses and ports to game servers
Monitoring & Maintenance:
- Status Dashboard: Real-time overview of all servers and their resource usage
- Automated Backups: Schedule regular backups of game server data
- Update Notifications: Alert when game updates are available
- Crash Detection: Automatic restart of crashed game servers
- Log Viewer: Browse server logs without SSH access
Architecture Overview
Easy-Wi follows a three-tier architecture:
Web Layer (Your Klutch.sh deployment):
- Apache/Nginx web server hosting the PHP application
- Web interface accessible via browser
- MySQL database storing configuration, users, and server metadata
Control Layer (SSH communication):
- Easy-Wi connects to game server machines via SSH
- Executes shell commands for server creation, updates, and file management
- Uses public key authentication for secure connections
Game Server Layer (Your dedicated servers):
- Actual game server binaries running on Linux machines
- SteamCMD for downloading and updating game files
- Game servers listening on various UDP/TCP ports
Typical Deployment Topology
┌─────────────────────────────────────────┐│ Klutch.sh - Easy-Wi Web Interface ││ (PHP + Apache + MySQL) ││ https://example-app.klutch.sh │└───────────────┬─────────────────────────┘ │ SSH (Port 22) ├────────────────────┬──────────────────┐ │ │ │ ┌───────────▼────────┐ ┌────────▼────────┐ ┌──────▼─────────┐ │ Game Server #1 │ │ Game Server #2 │ │ Game Server #3 │ │ (Dedicated Server)│ │ (VPS) │ │ (Bare Metal) │ │ CS:GO, TF2 │ │ Minecraft │ │ Rust, ARK │ └────────────────────┘ └──────────────────┘ └────────────────┘The Easy-Wi web interface deployed on Klutch.sh communicates with your game server machines over SSH, allowing you to manage servers anywhere in the world from a single control panel.
Installation and Setup
Follow these steps to prepare your Easy-Wi deployment for Klutch.sh.
Step 1: Clone the Repository
Start by forking or cloning the Easy-Wi repository:
# Clone the official Easy-Wi repositorygit clone https://github.com/easy-wi/easy-wi.git easy-wi-deploycd easy-wi-deployStep 2: Create Directory Structure
Organize your project with the necessary directories for Easy-Wi:
# Create required directoriesmkdir -p web temp logs keyschmod 755 web temp logs keys
# Easy-Wi will store generated files in temp# SSH keys for server connections go in keys/# Apache/PHP logs will be stored in logs/Step 3: Download Easy-Wi Source
Download the latest Easy-Wi release:
# Download the latest stable releasecurl -L https://github.com/easy-wi/easy-wi/archive/refs/heads/master.zip -o easywi.zipunzip easywi.zip -d web/mv web/easy-wi-master/* web/rm -rf web/easy-wi-master easywi.zip
# Set proper permissionschmod -R 755 web/chmod -R 777 web/tmpStep 4: Create Database Configuration
Easy-Wi requires a MySQL database. Create a configuration template:
config.php (place in web/stuff/):
<?php/** * Easy-Wi Database Configuration * This file is automatically loaded by Easy-Wi */
// Database connection settingsdefine('DB_HOST', getenv('DB_HOST') ?: 'localhost');define('DB_PORT', getenv('DB_PORT') ?: '3306');define('DB_NAME', getenv('DB_NAME') ?: 'easywi');define('DB_USER', getenv('DB_USER') ?: 'easywi');define('DB_PASSWORD', getenv('DB_PASSWORD') ?: 'changeme');
// Application settingsdefine('EASYWIDIR', '/var/www/html/');define('EASYWIURL', getenv('APP_URL') ?: 'https://example-app.klutch.sh');
// Security settingsdefine('AESKEY', getenv('AES_KEY') ?: bin2hex(random_bytes(32)));define('SALTKEY', getenv('SALT_KEY') ?: bin2hex(random_bytes(32)));
// Session settingsini_set('session.cookie_httponly', 1);ini_set('session.use_only_cookies', 1);ini_set('session.cookie_secure', 1);
// Error reporting (disable in production)error_reporting(getenv('DEBUG_MODE') === 'true' ? E_ALL : 0);ini_set('display_errors', getenv('DEBUG_MODE') === 'true' ? 1 : 0);
// Timezonedate_default_timezone_set(getenv('TZ') ?: 'UTC');
// Database connection$link = mysqli_connect(DB_HOST . ':' . DB_PORT, DB_USER, DB_PASSWORD, DB_NAME);
if (!$link) { die('Database connection failed: ' . mysqli_connect_error());}
mysqli_set_charset($link, 'utf8mb4');?>Step 5: Create Environment Configuration Template
Create a .env.example file with required environment variables:
# Database ConfigurationDB_HOST=your-mysql-host.klutch.shDB_PORT=8000DB_NAME=easywiDB_USER=easywiDB_PASSWORD=your-secure-database-password
# Application ConfigurationAPP_URL=https://example-app.klutch.shAES_KEY=generate-a-64-character-random-hex-stringSALT_KEY=generate-another-64-character-random-hex-string
# TimezoneTZ=America/New_York
# Debug Mode (set to false in production)DEBUG_MODE=false
# SMTP Configuration (for email notifications)SMTP_HOST=smtp.gmail.comSMTP_PORT=587SMTP_USER=your-email@gmail.comSMTP_PASSWORD=your-email-passwordSMTP_FROM=noreply@yourdomain.com
# SteamCMD Configuration (for game server updates)STEAMCMD_PATH=/usr/games/steamcmd
# Server ManagementDEFAULT_SSH_PORT=22DEFAULT_SERVER_IP=0.0.0.0
# Session ConfigurationSESSION_LIFETIME=3600Step 6: Create the Production Dockerfile
Create a Dockerfile in the root of your repository with the complete Easy-Wi setup:
FROM php:8.1-apache
# Install system dependenciesRUN apt-get update && apt-get install -y \ wget \ curl \ unzip \ git \ libzip-dev \ libpng-dev \ libjpeg-dev \ libfreetype6-dev \ libonig-dev \ libxml2-dev \ openssh-client \ mariadb-client \ cron \ supervisor \ && rm -rf /var/lib/apt/lists/*
# Install PHP extensions required by Easy-WiRUN docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-install -j$(nproc) \ pdo_mysql \ mysqli \ mbstring \ zip \ gd \ xml \ xmlrpc \ soap \ intl \ opcache
# Enable Apache modulesRUN a2enmod rewrite headers ssl
# Configure PHPRUN { \ echo 'memory_limit = 512M'; \ echo 'upload_max_filesize = 100M'; \ echo 'post_max_size = 100M'; \ echo 'max_execution_time = 300'; \ echo 'max_input_time = 300'; \ echo 'date.timezone = UTC'; \ echo 'opcache.enable = 1'; \ echo 'opcache.memory_consumption = 128'; \ echo 'opcache.interned_strings_buffer = 8'; \ echo 'opcache.max_accelerated_files = 4000'; \ echo 'opcache.revalidate_freq = 60'; \ echo 'opcache.fast_shutdown = 1'; \} > /usr/local/etc/php/conf.d/custom.ini
# Set working directoryWORKDIR /var/www/html
# Copy application filesCOPY web/ /var/www/html/
# Create required directoriesRUN mkdir -p /var/www/html/tmp \ /var/www/html/keys \ /var/www/html/logs \ && chown -R www-data:www-data /var/www/html \ && chmod -R 755 /var/www/html \ && chmod -R 777 /var/www/html/tmp
# Configure Apache for Easy-WiRUN { \ echo '<VirtualHost *:80>'; \ echo ' ServerAdmin admin@example.com'; \ echo ' DocumentRoot /var/www/html'; \ echo ' <Directory /var/www/html>'; \ echo ' Options -Indexes +FollowSymLinks'; \ echo ' AllowOverride All'; \ echo ' Require all granted'; \ echo ' </Directory>'; \ echo ' ErrorLog /var/www/html/logs/error.log'; \ echo ' CustomLog /var/www/html/logs/access.log combined'; \ echo '</VirtualHost>'; \} > /etc/apache2/sites-available/000-default.conf
# Create .htaccess for clean URLsRUN { \ echo 'RewriteEngine On'; \ echo 'RewriteCond %{REQUEST_FILENAME} !-f'; \ echo 'RewriteCond %{REQUEST_FILENAME} !-d'; \ echo 'RewriteRule ^(.*)$ index.php [QSA,L]'; \ echo ''; \ echo '<FilesMatch "\.php$">'; \ echo ' SetHandler application/x-httpd-php'; \ echo '</FilesMatch>'; \ echo ''; \ echo 'Options -Indexes'; \} > /var/www/html/.htaccess
# Create entrypoint scriptRUN { \ echo '#!/bin/bash'; \ echo 'set -e'; \ echo ''; \ echo '# Wait for database to be ready'; \ echo 'echo "Waiting for database connection..."'; \ echo 'until mysql -h"${DB_HOST}" -P"${DB_PORT}" -u"${DB_USER}" -p"${DB_PASSWORD}" -e "SELECT 1" &> /dev/null; do'; \ echo ' echo "Database not ready, waiting..."'; \ echo ' sleep 2'; \ echo 'done'; \ echo 'echo "Database connection successful!"'; \ echo ''; \ echo '# Create database if not exists'; \ echo 'mysql -h"${DB_HOST}" -P"${DB_PORT}" -u"${DB_USER}" -p"${DB_PASSWORD}" -e "CREATE DATABASE IF NOT EXISTS ${DB_NAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"'; \ echo ''; \ echo '# Check if Easy-Wi is already installed'; \ echo 'TABLE_COUNT=$(mysql -h"${DB_HOST}" -P"${DB_PORT}" -u"${DB_USER}" -p"${DB_PASSWORD}" -D"${DB_NAME}" -se "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = \"${DB_NAME}\" AND table_name = \"easywi_main\";" 2>/dev/null || echo "0")'; \ echo ''; \ echo 'if [ "$TABLE_COUNT" -eq "0" ]; then'; \ echo ' echo "Installing Easy-Wi database schema..."'; \ echo ' # On first run, user must complete web-based installation at /install/install.php'; \ echo ' echo "Please visit https://your-app.klutch.sh/install/install.php to complete installation"'; \ echo 'else'; \ echo ' echo "Easy-Wi database detected, skipping installation"'; \ echo 'fi'; \ echo ''; \ echo '# Set proper permissions'; \ echo 'chown -R www-data:www-data /var/www/html'; \ echo 'chmod -R 755 /var/www/html'; \ echo 'chmod -R 777 /var/www/html/tmp'; \ echo ''; \ echo '# Start Apache in foreground'; \ echo 'exec apache2-foreground'; \} > /usr/local/bin/docker-entrypoint.sh \ && chmod +x /usr/local/bin/docker-entrypoint.sh
# Expose HTTP portEXPOSE 80
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -f http://localhost/ || exit 1
# Use custom entrypointENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]Key Dockerfile Features:
- PHP 8.1 with Apache - Modern PHP version with built-in web server
- Required PHP Extensions - All extensions needed for Easy-Wi (MySQLi, XML, SOAP, etc.)
- SSH Client - For connecting to game server machines
- Optimized PHP Settings - Increased memory limits, upload sizes, and execution times
- Apache Configuration - Clean URLs with mod_rewrite enabled
- Automated Database Check - Waits for MySQL and creates database if needed
- Security Headers - HTTP security headers configured
- Health Check - Ensures the web server is responding
- Proper Permissions - Correct file ownership for web server
Step 7: Create Docker Compose for Local Development
For local testing, create a docker-compose.yml:
version: '3.8'
services: easywi: build: . ports: - "8080:80" environment: - DB_HOST=mysql - DB_PORT=3306 - DB_NAME=easywi - DB_USER=easywi - DB_PASSWORD=easywi_password - APP_URL=http://localhost:8080 - AES_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef - SALT_KEY=fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 - TZ=UTC - DEBUG_MODE=true volumes: - easywi-tmp:/var/www/html/tmp - easywi-keys:/var/www/html/keys - easywi-logs:/var/www/html/logs depends_on: - mysql networks: - easywi-network
mysql: image: mysql:8.0 environment: - MYSQL_ROOT_PASSWORD=root_password - MYSQL_DATABASE=easywi - MYSQL_USER=easywi - MYSQL_PASSWORD=easywi_password volumes: - mysql-data:/var/lib/mysql ports: - "3306:3306" networks: - easywi-network
volumes: easywi-tmp: easywi-keys: easywi-logs: mysql-data:
networks: easywi-network: driver: bridgeTest locally:
# Start the stackdocker-compose up -d
# View logsdocker-compose logs -f easywi
# Access Easy-Wi at http://localhost:8080# Complete installation at http://localhost:8080/install/install.php
# Stop the stackdocker-compose downStep 8: Commit and Push to GitHub
Once your Dockerfile and configuration are ready:
# Initialize git if not already donegit init
# Create .gitignore to exclude sensitive filescat > .gitignore << EOF.envweb/stuff/config.phpkeys/*.pemkeys/*.keylogs/*.logtmp/*!tmp/.gitkeep*.zipdocker-compose.override.ymlEOF
# Create placeholder filestouch web/tmp/.gitkeeptouch web/logs/.gitkeeptouch web/keys/.gitkeep
# Add filesgit add .git commit -m "Initial Easy-Wi deployment configuration for Klutch.sh"
# Push to GitHubgit remote add origin https://github.com/yourusername/easywi-deploy.gitgit branch -M mastergit push -u origin masterDeploying on Klutch.sh
Now that your repository is ready, deploy Easy-Wi to Klutch.sh.
Step 1: Create a New App
- Log in to your Klutch.sh dashboard
- Navigate to your project or create a new one
- Click Create App
- Connect your GitHub account if not already connected
- Select the repository containing your Easy-Wi Dockerfile
- Choose the branch to deploy (e.g.,
masterormain)
Step 2: Configure Environment Variables
In the Klutch.sh app settings, add the following environment variables:
Required Variables:
DB_HOST=your-mysql-app.klutch.shDB_PORT=8000DB_NAME=easywiDB_USER=easywi_userDB_PASSWORD=your-secure-password-here
APP_URL=https://your-easywi-app.klutch.sh
# Generate these with: openssl rand -hex 32AES_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdefSALT_KEY=fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
TZ=America/New_YorkDEBUG_MODE=falseOptional SMTP Variables (for email notifications):
SMTP_HOST=smtp.gmail.comSMTP_PORT=587SMTP_USER=your-email@gmail.comSMTP_PASSWORD=your-app-passwordSMTP_FROM=noreply@yourdomain.comStep 3: Set Up MySQL Database
If you haven’t already, deploy a MySQL instance on Klutch.sh:
- Follow our MySQL deployment guide
- Create the Easy-Wi database:
CREATE DATABASE easywi CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;CREATE USER 'easywi_user'@'%' IDENTIFIED BY 'your-secure-password';GRANT ALL PRIVILEGES ON easywi.* TO 'easywi_user'@'%';FLUSH PRIVILEGES;
- Note your MySQL app URL (e.g.,
mysql-app.klutch.sh) - Update the
DB_HOSTenvironment variable in your Easy-Wi app
Step 4: Configure Networking
- In your Easy-Wi app settings, set Traffic Type to HTTP
- Set the Internal Port to
80 - Klutch.sh will automatically route traffic from
https://your-app.klutch.shto port80inside your container
Step 5: Attach Persistent Volumes
Easy-Wi requires persistent storage for temporary files, SSH keys, and logs:
- Navigate to the Volumes tab in your app settings
- Click Attach Volume and configure:
- Mount Path:
/var/www/html/tmp - Size:
5GB(temporary files and caches)
- Mount Path:
- Add another volume for SSH keys:
- Mount Path:
/var/www/html/keys - Size:
1GB(SSH key storage)
- Mount Path:
- Add a third volume for logs:
- Mount Path:
/var/www/html/logs - Size:
2GB(Apache and application logs)
- Mount Path:
Step 6: Deploy the Application
- Click Deploy to start the deployment process
- Klutch.sh will:
- Detect the Dockerfile in your repository
- Build the Docker image with PHP, Apache, and Easy-Wi
- Start the container with your environment variables
- Mount the persistent volumes
- Expose the application on your custom domain
- Monitor the build logs for any errors
- Once deployed, you'll receive a URL like
https://easywi-app.klutch.sh
Step 7: Complete Easy-Wi Installation
After the first deployment, complete the web-based installation:
- Visit
https://your-app.klutch.sh/install/install.php - The installer will check PHP requirements (should all be green)
- Database connection will be pre-configured via environment variables
- Create an admin account with a strong password
- Complete the installation wizard
- Important: After installation completes, delete the install directory for security:
Terminal window # SSH into your container or use Klutch.sh consolerm -rf /var/www/html/install - Log in with your admin credentials at
https://your-app.klutch.sh
Configuration
SSH Key Configuration
To manage game servers on external machines, Easy-Wi needs SSH access. Generate SSH keys:
- Access your Easy-Wi container console via Klutch.sh dashboard
- Generate an SSH key pair:
Terminal window ssh-keygen -t rsa -b 4096 -f /var/www/html/keys/easywi_rsa -N ""chown www-data:www-data /var/www/html/keys/easywi_rsa*chmod 600 /var/www/html/keys/easywi_rsachmod 644 /var/www/html/keys/easywi_rsa.pub - Copy the public key:
Terminal window cat /var/www/html/keys/easywi_rsa.pub - Add this public key to the
~/.ssh/authorized_keysfile on your game server machines
Adding Game Server Machines
In the Easy-Wi admin panel:
- Navigate to Settings → Master Server
- Click Add Server
- Configure:
- IP Address: Your game server machine's public IP
- SSH Port:
22(or custom port) - SSH User:
easywi(create a dedicated user) - Private Key Path:
/var/www/html/keys/easywi_rsa - Server Type: Game Server
- Test the connection - Easy-Wi will verify SSH access
- If successful, your server machine is ready for game server deployment
SteamCMD Installation
For Steam-based games (CS:GO, TF2, Garry’s Mod, etc.), install SteamCMD on your game server machines:
# On your game server machine (not Easy-Wi container)# Install as the dedicated easywi user
# Add 32-bit architecture support (if on 64-bit system)sudo dpkg --add-architecture i386sudo apt-get update
# Install dependenciessudo apt-get install -y lib32gcc-s1 lib32stdc++6 curl
# Create SteamCMD directorymkdir -p ~/steamcmdcd ~/steamcmd
# Download SteamCMDcurl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
# Run SteamCMD once to update./steamcmd.sh +quit
# Verify installation./steamcmd.sh +login anonymous +quitConfigure SteamCMD path in Easy-Wi:
- Navigate to Settings → Game Server → SteamCMD
- Set SteamCMD Path:
/home/easywi/steamcmd/steamcmd.sh
Game Server Templates
Create templates for common game types:
Counter-Strike: Global Offensive Template:
- Navigate to Settings → Game Server → Templates
- Click Add Template
- Configure:
- Game: Counter-Strike: Global Offensive
- SteamCMD ID:
740 - Default Port:
27015 - Max Players:
32 - Tickrate:
128 - Start Command:
./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 -tickrate 128 -maxplayers 32
- Add custom server.cfg and other config files
- Save the template
Minecraft Server Template:
- Add another template for Minecraft:
- Configure:
- Game: Minecraft Java Edition
- Server Type: Java Application
- Default Port:
25565 - Start Command:
java -Xmx2G -Xms1G -jar server.jar nogui - Stop Command:
stop(sent via RCON)
User Roles and Permissions
Easy-Wi has a granular permission system:
Admin Role (Full access):
- Manage all servers, users, and settings
- Access billing and financial reports
- Configure master server settings
- View all logs and monitoring data
Reseller Role (Limited management):
- Create customer accounts
- Allocate server resources from their quota
- View their customers’ servers
- Generate invoices and support tickets
- Cannot access master server settings
User/Client Role (Self-service):
- Manage their own game servers
- Start, stop, restart servers
- Upload files and edit configs
- View their server’s logs and console
- Submit support tickets
- Cannot access other users’ servers
Create roles via Settings → User Management → Groups.
RCON Configuration
For real-time console access to game servers:
- Enable RCON on your game servers
- For CS:GO, add to
server.cfg:rcon_password "secure_rcon_password" - In Easy-Wi, configure RCON:
- Navigate to the server's settings
- RCON Port: (usually game port + 10)
- RCON Password: Match the server's rcon_password
- Test by executing a command from the Easy-Wi console interface
Backup Configuration
Automated backups protect against data loss:
- Navigate to Settings → Backup
- Configure backup schedule:
- Frequency: Daily, Weekly, or Manual
- Retention: Keep last 7 backups
- Compression: Enable gzip compression
- Backup Path:
/backupson game server machines
- Test backup/restore functionality before going live
Connecting Game Clients
Once your game servers are deployed via Easy-Wi, clients connect using standard game-specific methods.
Counter-Strike: Global Offensive
Via Steam Server Browser:
- Launch CS:GO
- Click Play → Find a Game → Community Server Browser
- Click Favorites
- Click Add a Server
- Enter:
your-server-ip:27015 - Connect to your server
Via Console:
connect your-server-ip:27015Minecraft
Players connect by adding your server to their server list:
- Launch Minecraft Java Edition
- Click Multiplayer
- Click Add Server
- Server Address:
your-server-ip:25565 - Click Done, then Join Server
TeamSpeak 3
Connect to your TS3 server:
- Launch TeamSpeak 3 client
- Click Connections → Connect
- Server Address:
your-server-ip:9987 - Nickname: Your display name
- Click Connect
- Use the server password if configured
Server Monitoring
Monitor server status from Easy-Wi:
- Login to
https://your-easywi-app.klutch.sh - View the dashboard for real-time server metrics:
- Server Status: Online/Offline/Starting
- Players: Current player count
- CPU Usage: Per-server CPU utilization
- Memory: RAM usage
- Uptime: Time since last restart
- Click on a server to view detailed stats and console output
Production Best Practices
Security Hardening
1. Change Default Credentials
Immediately after installation:
- Change the admin password to a strong password (20+ characters)
- Disable or delete any default test accounts
- Enable two-factor authentication if available
2. Restrict Admin Access
Configure IP whitelisting for admin panel:
# Add to /var/www/html/.htaccess<Files "admin.php"> Order Deny,Allow Deny from all Allow from YOUR.IP.ADDRESS</Files>3. Secure SSH Keys
Protect SSH private keys:
chmod 600 /var/www/html/keys/*chown www-data:www-data /var/www/html/keys/*Never commit private keys to Git.
4. Database Security
- Use strong, unique passwords for database access
- Enable MySQL SSL connections if possible
- Regularly backup the database
- Limit database user permissions to only what Easy-Wi needs
5. HTTPS/TLS
Klutch.sh automatically provides HTTPS, but ensure:
- Force HTTPS redirects are enabled
- Update
APP_URLto usehttps:// - Set secure cookie flags in Easy-Wi settings
6. Regular Updates
Keep Easy-Wi and dependencies updated:
# Check for Easy-Wi updatesgit pull origin master
# Rebuild Docker imagedocker build -t easywi:latest .
# Redeploy on Klutch.shgit push origin masterPerformance Optimization
1. PHP OpCache
Already enabled in the Dockerfile. Monitor cache hit rate:
# View OpCache statusphp -i | grep opcache2. MySQL Query Optimization
Add indexes for frequently queried tables:
-- Connect to your MySQL databaseUSE easywi;
-- Add index on user lookupsCREATE INDEX idx_username ON easywi_users(username);
-- Add index on server status queriesCREATE INDEX idx_server_status ON easywi_servers(status, server_type);
-- Add index on log queriesCREATE INDEX idx_logs_date ON easywi_logs(created_at);3. Apache Tuning
For high-traffic deployments, adjust Apache worker settings:
# Add to /etc/apache2/mods-available/mpm_prefork.conf<IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxRequestWorkers 150 MaxConnectionsPerChild 0</IfModule>4. Caching Static Assets
Enable browser caching for static files:
# Add to /var/www/html/.htaccess<IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month"</IfModule>Backup and Disaster Recovery
1. Database Backups
Automate MySQL backups:
#!/bin/bash# backup-db.sh - Scheduled via cron
DATE=$(date +%Y%m%d_%H%M%S)BACKUP_DIR="/backups/easywi-db"mkdir -p $BACKUP_DIR
mysqldump -h "${DB_HOST}" -P "${DB_PORT}" \ -u "${DB_USER}" -p"${DB_PASSWORD}" \ "${DB_NAME}" | gzip > "$BACKUP_DIR/easywi_$DATE.sql.gz"
# Keep only last 30 daysfind $BACKUP_DIR -name "easywi_*.sql.gz" -mtime +30 -deleteSchedule with cron:
# Run daily at 2 AM0 2 * * * /usr/local/bin/backup-db.sh2. File Backups
Backup critical files:
#!/bin/bashDATE=$(date +%Y%m%d_%H%M%S)BACKUP_DIR="/backups/easywi-files"mkdir -p $BACKUP_DIR
# Backup SSH keystar -czf "$BACKUP_DIR/keys_$DATE.tar.gz" /var/www/html/keys
# Backup custom configurationstar -czf "$BACKUP_DIR/config_$DATE.tar.gz" /var/www/html/stuff
# Keep only last 30 daysfind $BACKUP_DIR -name "*.tar.gz" -mtime +30 -delete3. Disaster Recovery Plan
Document your recovery process:
- Deploy a fresh Easy-Wi instance on Klutch.sh
- Restore MySQL database:
Terminal window gunzip < easywi_backup.sql.gz | mysql -h"${DB_HOST}" -P"${DB_PORT}" \-u"${DB_USER}" -p"${DB_PASSWORD}" "${DB_NAME}" - Restore SSH keys and configurations:
Terminal window tar -xzf keys_backup.tar.gz -C /tar -xzf config_backup.tar.gz -C /chown -R www-data:www-data /var/www/html - Verify all game servers reconnect successfully
- Test RCON connectivity and file management
Monitoring and Logging
1. Application Logs
Monitor Easy-Wi logs:
# View Apache error logtail -f /var/www/html/logs/error.log
# View Apache access logtail -f /var/www/html/logs/access.log
# View PHP errors (if DEBUG_MODE=true)tail -f /var/log/php-errors.log2. Server Health Checks
Create a health check endpoint:
<?php// health.php - Place in /var/www/html/
header('Content-Type: application/json');
// Check database connectiontry { $mysqli = new mysqli( getenv('DB_HOST'), getenv('DB_USER'), getenv('DB_PASSWORD'), getenv('DB_NAME'), getenv('DB_PORT') );
if ($mysqli->connect_error) { throw new Exception('Database connection failed'); }
$db_status = 'ok'; $mysqli->close();} catch (Exception $e) { $db_status = 'error: ' . $e->getMessage();}
// Check disk space$disk_free = disk_free_space('/var/www/html');$disk_total = disk_total_space('/var/www/html');$disk_percent = round(($disk_free / $disk_total) * 100, 2);
$health = [ 'status' => ($db_status === 'ok') ? 'healthy' : 'unhealthy', 'timestamp' => date('c'), 'database' => $db_status, 'disk_free_percent' => $disk_percent];
http_response_code(($health['status'] === 'healthy') ? 200 : 500);echo json_encode($health, JSON_PRETTY_PRINT);?>Configure Klutch.sh to monitor this endpoint at /health.php.
3. Resource Monitoring
Monitor resource usage:
# CPU usagetop -bn1 | grep "Cpu(s)"
# Memory usagefree -h
# Disk usagedf -h /var/www/html
# Apache connectionsnetstat -an | grep :80 | wc -lScaling Considerations
When to Scale:
- More than 50 simultaneous game servers
- Dashboard response time exceeds 2 seconds
- Database queries taking more than 1 second
- CPU usage consistently above 80%
Horizontal Scaling:
- Deploy multiple Easy-Wi instances behind a load balancer
- Share MySQL database across instances
- Use shared persistent storage (NFS/S3) for SSH keys and config files
- Distribute game server machines across multiple Easy-Wi instances
Vertical Scaling:
- Upgrade your Klutch.sh app plan for more CPU/RAM
- Increase MySQL database resources
- Optimize database queries with indexes
- Enable query caching in MySQL
Troubleshooting
Application Won’t Start
Symptoms:
- Container crashes on startup
- Application shows 500 Internal Server Error
- Database connection errors in logs
Solutions:
- Verify environment variables are set correctly:
Terminal window # In Klutch.sh console or SSHenv | grep DB_env | grep APP_URL - Check database connectivity:
Terminal window mysql -h"${DB_HOST}" -P"${DB_PORT}" -u"${DB_USER}" -p"${DB_PASSWORD}" -e "SELECT 1" - Ensure database exists:
Terminal window mysql -h"${DB_HOST}" -P"${DB_PORT}" -u"${DB_USER}" -p"${DB_PASSWORD}" \-e "CREATE DATABASE IF NOT EXISTS ${DB_NAME}" - Check Apache error logs:
Terminal window tail -n 100 /var/www/html/logs/error.log - Verify file permissions:
Terminal window chown -R www-data:www-data /var/www/htmlchmod -R 755 /var/www/htmlchmod -R 777 /var/www/html/tmp
Cannot Connect to Game Servers via SSH
Symptoms:
- Easy-Wi shows “SSH connection failed”
- Cannot add master server machines
- Key authentication errors in logs
Solutions:
- Verify SSH key exists:
Terminal window ls -la /var/www/html/keys/ - Check key permissions:
Terminal window chmod 600 /var/www/html/keys/easywi_rsachown www-data:www-data /var/www/html/keys/easywi_rsa - Test SSH connection manually:
Terminal window # From Easy-Wi containerssh -i /var/www/html/keys/easywi_rsa easywi@your-game-server-ip - Ensure public key is on game server:
Terminal window # On game server machinecat ~/.ssh/authorized_keys# Should contain the Easy-Wi public key - Check firewall rules on game server:
Terminal window # Allow SSH from Easy-Wi IPsudo ufw allow from EASYWI_IP to any port 22
Game Servers Won’t Start
Symptoms:
- Server shows “Starting…” indefinitely
- Server starts but immediately crashes
- SteamCMD errors in logs
Solutions:
- Verify SteamCMD is installed on game server:
Terminal window # On game server machine~/steamcmd/steamcmd.sh +quit - Check disk space on game server:
Terminal window df -h /home/easywi - Verify game files are downloaded:
Terminal window ls -la /home/easywi/servers/csgo/ - Check server logs:
Terminal window # View from Easy-Wi console interface# Or SSH to game server:tail -f /home/easywi/servers/csgo/logs/console.log - Test start command manually:
Terminal window # SSH to game servercd /home/easywi/servers/csgo/./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +map de_dust2
Slow Dashboard Performance
Symptoms:
- Pages take 5+ seconds to load
- Timeout errors when viewing server list
- High CPU usage on Easy-Wi container
Solutions:
- Check database query performance:
-- Enable slow query logSET GLOBAL slow_query_log = 'ON';SET GLOBAL long_query_time = 1;-- View slow queriesSELECT * FROM mysql.slow_log ORDER BY start_time DESC LIMIT 10;
- Add database indexes:
CREATE INDEX idx_servers ON easywi_servers(status, type);CREATE INDEX idx_users ON easywi_users(active, username);
- Increase PHP memory limit:
# In /usr/local/etc/php/conf.d/custom.inimemory_limit = 1024M
- Clear application cache:
Terminal window rm -rf /var/www/html/tmp/* - Restart Apache:
Terminal window apachectl graceful
File Upload Failures
Symptoms:
- Cannot upload server configs via web interface
- “Permission denied” errors
- File size limit exceeded
Solutions:
- Check upload directory permissions:
Terminal window chmod -R 777 /var/www/html/tmpchown -R www-data:www-data /var/www/html/tmp - Increase PHP upload limits:
# In /usr/local/etc/php/conf.d/custom.iniupload_max_filesize = 100Mpost_max_size = 100M
- Verify disk space:
Terminal window df -h /var/www/html - Restart Apache:
Terminal window apachectl restart
Additional Resources
Official Documentation
Game Server Resources
- SteamCMD Documentation
- Valve Dedicated Server List
- Minecraft Server Setup Guide
- TeamSpeak 3 Server Downloads
Klutch.sh Resources
- Klutch.sh Quick Start Guide
- Understanding Deployments
- Persistent Volumes Guide
- MySQL Database Deployment
- Custom Domain Configuration
- Networking and Traffic Routing
Community and Support
Conclusion
You’ve successfully deployed Easy-Wi on Klutch.sh! Your game server management panel is now running with:
✅ Production-ready Docker setup with PHP 8.1, Apache, and all required extensions
✅ MySQL database integration for storing server configurations and user data
✅ Persistent storage for temporary files, SSH keys, and logs
✅ Automated installation with health checks and proper error handling
✅ Security hardening with environment variables and proper file permissions
✅ SSH connectivity for managing remote game server machines
✅ Scalable architecture ready to manage dozens of game servers
Easy-Wi simplifies the complexity of operating a game server hosting business. From here, you can add master servers, create game server templates, provision user accounts, and start offering game server hosting to your community or customers.
Consider implementing automated backups, monitoring tools, and regular security updates to maintain a reliable platform. As your hosting operation grows, leverage Easy-Wi’s reseller system to create sub-accounts and distribute server resources to partners.
For advanced configurations, explore Easy-Wi’s API for custom integrations, configure automatic mod installers for popular games, and set up automated server updates via SteamCMD. The platform’s flexibility allows you to tailor the experience to your specific hosting needs.
Happy game server hosting on Klutch.sh! 🎮🚀