Skip to content

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:

Terminal window
# Clone the official Easy-Wi repository
git clone https://github.com/easy-wi/easy-wi.git easy-wi-deploy
cd easy-wi-deploy

Step 2: Create Directory Structure

Organize your project with the necessary directories for Easy-Wi:

Terminal window
# Create required directories
mkdir -p web temp logs keys
chmod 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:

Terminal window
# Download the latest stable release
curl -L https://github.com/easy-wi/easy-wi/archive/refs/heads/master.zip -o easywi.zip
unzip easywi.zip -d web/
mv web/easy-wi-master/* web/
rm -rf web/easy-wi-master easywi.zip
# Set proper permissions
chmod -R 755 web/
chmod -R 777 web/tmp

Step 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 settings
define('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 settings
define('EASYWIDIR', '/var/www/html/');
define('EASYWIURL', getenv('APP_URL') ?: 'https://example-app.klutch.sh');
// Security settings
define('AESKEY', getenv('AES_KEY') ?: bin2hex(random_bytes(32)));
define('SALTKEY', getenv('SALT_KEY') ?: bin2hex(random_bytes(32)));
// Session settings
ini_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);
// Timezone
date_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 Configuration
DB_HOST=your-mysql-host.klutch.sh
DB_PORT=8000
DB_NAME=easywi
DB_USER=easywi
DB_PASSWORD=your-secure-database-password
# Application Configuration
APP_URL=https://example-app.klutch.sh
AES_KEY=generate-a-64-character-random-hex-string
SALT_KEY=generate-another-64-character-random-hex-string
# Timezone
TZ=America/New_York
# Debug Mode (set to false in production)
DEBUG_MODE=false
# SMTP Configuration (for email notifications)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-email-password
SMTP_FROM=noreply@yourdomain.com
# SteamCMD Configuration (for game server updates)
STEAMCMD_PATH=/usr/games/steamcmd
# Server Management
DEFAULT_SSH_PORT=22
DEFAULT_SERVER_IP=0.0.0.0
# Session Configuration
SESSION_LIFETIME=3600

Step 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 dependencies
RUN 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-Wi
RUN 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 modules
RUN a2enmod rewrite headers ssl
# Configure PHP
RUN { \
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 directory
WORKDIR /var/www/html
# Copy application files
COPY web/ /var/www/html/
# Create required directories
RUN 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-Wi
RUN { \
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 URLs
RUN { \
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 script
RUN { \
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 port
EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost/ || exit 1
# Use custom entrypoint
ENTRYPOINT ["/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: bridge

Test locally:

Terminal window
# Start the stack
docker-compose up -d
# View logs
docker-compose logs -f easywi
# Access Easy-Wi at http://localhost:8080
# Complete installation at http://localhost:8080/install/install.php
# Stop the stack
docker-compose down

Step 8: Commit and Push to GitHub

Once your Dockerfile and configuration are ready:

Terminal window
# Initialize git if not already done
git init
# Create .gitignore to exclude sensitive files
cat > .gitignore << EOF
.env
web/stuff/config.php
keys/*.pem
keys/*.key
logs/*.log
tmp/*
!tmp/.gitkeep
*.zip
docker-compose.override.yml
EOF
# Create placeholder files
touch web/tmp/.gitkeep
touch web/logs/.gitkeep
touch web/keys/.gitkeep
# Add files
git add .
git commit -m "Initial Easy-Wi deployment configuration for Klutch.sh"
# Push to GitHub
git remote add origin https://github.com/yourusername/easywi-deploy.git
git branch -M master
git push -u origin master

Deploying on Klutch.sh

Now that your repository is ready, deploy Easy-Wi to Klutch.sh.

Step 1: Create a New App

  1. Log in to your Klutch.sh dashboard
  2. Navigate to your project or create a new one
  3. Click Create App
  4. Connect your GitHub account if not already connected
  5. Select the repository containing your Easy-Wi Dockerfile
  6. Choose the branch to deploy (e.g., master or main)

Step 2: Configure Environment Variables

In the Klutch.sh app settings, add the following environment variables:

Required Variables:

DB_HOST=your-mysql-app.klutch.sh
DB_PORT=8000
DB_NAME=easywi
DB_USER=easywi_user
DB_PASSWORD=your-secure-password-here
APP_URL=https://your-easywi-app.klutch.sh
# Generate these with: openssl rand -hex 32
AES_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
SALT_KEY=fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210
TZ=America/New_York
DEBUG_MODE=false

Optional SMTP Variables (for email notifications):

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_FROM=noreply@yourdomain.com

Step 3: Set Up MySQL Database

If you haven’t already, deploy a MySQL instance on Klutch.sh:

  1. Follow our MySQL deployment guide
  2. 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;
  3. Note your MySQL app URL (e.g., mysql-app.klutch.sh)
  4. Update the DB_HOST environment variable in your Easy-Wi app

Step 4: Configure Networking

  1. In your Easy-Wi app settings, set Traffic Type to HTTP
  2. Set the Internal Port to 80
  3. Klutch.sh will automatically route traffic from https://your-app.klutch.sh to port 80 inside your container

Step 5: Attach Persistent Volumes

Easy-Wi requires persistent storage for temporary files, SSH keys, and logs:

  1. Navigate to the Volumes tab in your app settings
  2. Click Attach Volume and configure:
    • Mount Path: /var/www/html/tmp
    • Size: 5GB (temporary files and caches)
  3. Add another volume for SSH keys:
    • Mount Path: /var/www/html/keys
    • Size: 1GB (SSH key storage)
  4. Add a third volume for logs:
    • Mount Path: /var/www/html/logs
    • Size: 2GB (Apache and application logs)

Step 6: Deploy the Application

  1. Click Deploy to start the deployment process
  2. 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
  3. Monitor the build logs for any errors
  4. 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:

  1. Visit https://your-app.klutch.sh/install/install.php
  2. The installer will check PHP requirements (should all be green)
  3. Database connection will be pre-configured via environment variables
  4. Create an admin account with a strong password
  5. Complete the installation wizard
  6. Important: After installation completes, delete the install directory for security:
    Terminal window
    # SSH into your container or use Klutch.sh console
    rm -rf /var/www/html/install
  7. 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:

  1. Access your Easy-Wi container console via Klutch.sh dashboard
  2. 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_rsa
    chmod 644 /var/www/html/keys/easywi_rsa.pub
  3. Copy the public key:
    Terminal window
    cat /var/www/html/keys/easywi_rsa.pub
  4. Add this public key to the ~/.ssh/authorized_keys file on your game server machines

Adding Game Server Machines

In the Easy-Wi admin panel:

  1. Navigate to Settings → Master Server
  2. Click Add Server
  3. 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
  4. Test the connection - Easy-Wi will verify SSH access
  5. 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:

Terminal window
# 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 i386
sudo apt-get update
# Install dependencies
sudo apt-get install -y lib32gcc-s1 lib32stdc++6 curl
# Create SteamCMD directory
mkdir -p ~/steamcmd
cd ~/steamcmd
# Download SteamCMD
curl -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 +quit

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

  1. Navigate to Settings → Game Server → Templates
  2. Click Add Template
  3. 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
  4. Add custom server.cfg and other config files
  5. Save the template

Minecraft Server Template:

  1. Add another template for Minecraft:
  2. 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:

  1. Enable RCON on your game servers
  2. For CS:GO, add to server.cfg:
    rcon_password "secure_rcon_password"
  3. 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
  4. Test by executing a command from the Easy-Wi console interface

Backup Configuration

Automated backups protect against data loss:

  1. Navigate to Settings → Backup
  2. Configure backup schedule:
    • Frequency: Daily, Weekly, or Manual
    • Retention: Keep last 7 backups
    • Compression: Enable gzip compression
    • Backup Path: /backups on game server machines
  3. 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:

  1. Launch CS:GO
  2. Click Play → Find a Game → Community Server Browser
  3. Click Favorites
  4. Click Add a Server
  5. Enter: your-server-ip:27015
  6. Connect to your server

Via Console:

connect your-server-ip:27015

Minecraft

Players connect by adding your server to their server list:

  1. Launch Minecraft Java Edition
  2. Click Multiplayer
  3. Click Add Server
  4. Server Address: your-server-ip:25565
  5. Click Done, then Join Server

TeamSpeak 3

Connect to your TS3 server:

  1. Launch TeamSpeak 3 client
  2. Click Connections → Connect
  3. Server Address: your-server-ip:9987
  4. Nickname: Your display name
  5. Click Connect
  6. Use the server password if configured

Server Monitoring

Monitor server status from Easy-Wi:

  1. Login to https://your-easywi-app.klutch.sh
  2. 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
  3. 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:

Terminal window
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_URL to use https://
  • Set secure cookie flags in Easy-Wi settings

6. Regular Updates

Keep Easy-Wi and dependencies updated:

Terminal window
# Check for Easy-Wi updates
git pull origin master
# Rebuild Docker image
docker build -t easywi:latest .
# Redeploy on Klutch.sh
git push origin master

Performance Optimization

1. PHP OpCache

Already enabled in the Dockerfile. Monitor cache hit rate:

Terminal window
# View OpCache status
php -i | grep opcache

2. MySQL Query Optimization

Add indexes for frequently queried tables:

-- Connect to your MySQL database
USE easywi;
-- Add index on user lookups
CREATE INDEX idx_username ON easywi_users(username);
-- Add index on server status queries
CREATE INDEX idx_server_status ON easywi_servers(status, server_type);
-- Add index on log queries
CREATE 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 days
find $BACKUP_DIR -name "easywi_*.sql.gz" -mtime +30 -delete

Schedule with cron:

Terminal window
# Run daily at 2 AM
0 2 * * * /usr/local/bin/backup-db.sh

2. File Backups

Backup critical files:

backup-files.sh
#!/bin/bash
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="/backups/easywi-files"
mkdir -p $BACKUP_DIR
# Backup SSH keys
tar -czf "$BACKUP_DIR/keys_$DATE.tar.gz" /var/www/html/keys
# Backup custom configurations
tar -czf "$BACKUP_DIR/config_$DATE.tar.gz" /var/www/html/stuff
# Keep only last 30 days
find $BACKUP_DIR -name "*.tar.gz" -mtime +30 -delete

3. Disaster Recovery Plan

Document your recovery process:

  1. Deploy a fresh Easy-Wi instance on Klutch.sh
  2. 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}"
  3. 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
  4. Verify all game servers reconnect successfully
  5. Test RCON connectivity and file management

Monitoring and Logging

1. Application Logs

Monitor Easy-Wi logs:

Terminal window
# View Apache error log
tail -f /var/www/html/logs/error.log
# View Apache access log
tail -f /var/www/html/logs/access.log
# View PHP errors (if DEBUG_MODE=true)
tail -f /var/log/php-errors.log

2. Server Health Checks

Create a health check endpoint:

<?php
// health.php - Place in /var/www/html/
header('Content-Type: application/json');
// Check database connection
try {
$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:

Terminal window
# CPU usage
top -bn1 | grep "Cpu(s)"
# Memory usage
free -h
# Disk usage
df -h /var/www/html
# Apache connections
netstat -an | grep :80 | wc -l

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

  1. Deploy multiple Easy-Wi instances behind a load balancer
  2. Share MySQL database across instances
  3. Use shared persistent storage (NFS/S3) for SSH keys and config files
  4. Distribute game server machines across multiple Easy-Wi instances

Vertical Scaling:

  1. Upgrade your Klutch.sh app plan for more CPU/RAM
  2. Increase MySQL database resources
  3. Optimize database queries with indexes
  4. 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:

  1. Verify environment variables are set correctly:
    Terminal window
    # In Klutch.sh console or SSH
    env | grep DB_
    env | grep APP_URL
  2. Check database connectivity:
    Terminal window
    mysql -h"${DB_HOST}" -P"${DB_PORT}" -u"${DB_USER}" -p"${DB_PASSWORD}" -e "SELECT 1"
  3. 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}"
  4. Check Apache error logs:
    Terminal window
    tail -n 100 /var/www/html/logs/error.log
  5. Verify file permissions:
    Terminal window
    chown -R www-data:www-data /var/www/html
    chmod -R 755 /var/www/html
    chmod -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:

  1. Verify SSH key exists:
    Terminal window
    ls -la /var/www/html/keys/
  2. Check key permissions:
    Terminal window
    chmod 600 /var/www/html/keys/easywi_rsa
    chown www-data:www-data /var/www/html/keys/easywi_rsa
  3. Test SSH connection manually:
    Terminal window
    # From Easy-Wi container
    ssh -i /var/www/html/keys/easywi_rsa easywi@your-game-server-ip
  4. Ensure public key is on game server:
    Terminal window
    # On game server machine
    cat ~/.ssh/authorized_keys
    # Should contain the Easy-Wi public key
  5. Check firewall rules on game server:
    Terminal window
    # Allow SSH from Easy-Wi IP
    sudo 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:

  1. Verify SteamCMD is installed on game server:
    Terminal window
    # On game server machine
    ~/steamcmd/steamcmd.sh +quit
  2. Check disk space on game server:
    Terminal window
    df -h /home/easywi
  3. Verify game files are downloaded:
    Terminal window
    ls -la /home/easywi/servers/csgo/
  4. 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
  5. Test start command manually:
    Terminal window
    # SSH to game server
    cd /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:

  1. Check database query performance:
    -- Enable slow query log
    SET GLOBAL slow_query_log = 'ON';
    SET GLOBAL long_query_time = 1;
    -- View slow queries
    SELECT * FROM mysql.slow_log ORDER BY start_time DESC LIMIT 10;
  2. Add database indexes:
    CREATE INDEX idx_servers ON easywi_servers(status, type);
    CREATE INDEX idx_users ON easywi_users(active, username);
  3. Increase PHP memory limit:
    # In /usr/local/etc/php/conf.d/custom.ini
    memory_limit = 1024M
  4. Clear application cache:
    Terminal window
    rm -rf /var/www/html/tmp/*
  5. 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:

  1. Check upload directory permissions:
    Terminal window
    chmod -R 777 /var/www/html/tmp
    chown -R www-data:www-data /var/www/html/tmp
  2. Increase PHP upload limits:
    # In /usr/local/etc/php/conf.d/custom.ini
    upload_max_filesize = 100M
    post_max_size = 100M
  3. Verify disk space:
    Terminal window
    df -h /var/www/html
  4. Restart Apache:
    Terminal window
    apachectl restart

Additional Resources

Official Documentation

Game Server Resources

Klutch.sh Resources

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! 🎮🚀