Documentation ComusThumbz
Connexion Admin

Common Server Setups

Common Server Setups

Document Version: 1.0.0
Last Updated: 2026-01-02
Applies To: ComusThumbz v1.11.14+


Overview

This guide covers step-by-step server configuration for the most common hosting environments used with ComusThumbz. Each section provides complete setup instructions including PHP configuration, web server setup, and ComusThumbz-specific requirements.

Configuration Required:
Before proceeding, ensure your server meets the minimum requirements outlined in the Requirements Guide.

Supported Environments

Environment Complexity Best For PHP Config Access
HestiaCP Easy VPS, dedicated servers Full access
cPanel/WHM Easy Shared, VPS hosting Limited to MultiPHP
Plesk Easy VPS, dedicated servers Full access
Ubuntu + Apache Medium VPS, cloud servers Full access
Ubuntu + Nginx Medium VPS, cloud servers Full access
CentOS/AlmaLinux Medium Enterprise, dedicated Full access
Docker Advanced Development, scalable Full control
Cloudways Easy Managed cloud Panel access

HestiaCP Setup

HestiaCP is a popular free control panel for VPS servers. This setup guide covers a complete ComusThumbz installation.

Prerequisites

  • Ubuntu 20.04/22.04 or Debian 10/11
  • HestiaCP installed
  • Domain pointed to server
  • SSH access

Step 1: Create Web Domain

  1. Log in to HestiaCP at https://your-server-ip:8083
  2. Go to WEB tab
  3. Click Add Web Domain
  4. Enter your domain name
  5. Enable SSL Support and check Let's Encrypt
  6. Click Save

[Screenshot: hestiacp-add-domain]

Step 2: Configure PHP

  1. Go to WEB tab
  2. Click the wrench icon next to your domain
  3. Select PHP 8.3 from the PHP version dropdown
  4. Click Save

Step 3: Enable Required PHP Functions

Warning:
HestiaCP disables many PHP functions by default. You MUST enable them for ComusThumbz to work.

Option A: Via HestiaCP Panel

  1. Go to SERVER > Configure > PHP-FPM
  2. Find your PHP version (e.g., PHP 8.3)
  3. Locate disablefunctions in the configuration
  4. Remove these functions from the disabled list:

exec

  • shellexec
  • passthru
  • procopen
  • popen
  1. Click Save
  2. Restart PHP: In SSH, run systemctl restart php8.3-fpm

Option B: Via SSH (Recommended)

# Edit PHP configuration
sudo nano /etc/php/8.3/fpm/php.ini

Find disablefunctions line (around line 314)

Change FROM:

disablefunctions = exec,passthru,shellexec,system,procopen,popen,...

Change TO (remove exec, passthru, shellexec, procopen, popen):

disablefunctions = system,...

Save and restart PHP-FPM

sudo systemctl restart php8.3-fpm

Step 4: Adjust PHP Settings

# Edit PHP configuration
sudo nano /etc/php/8.3/fpm/php.ini

Update these settings:

memorylimit = 512M
maxexecutiontime = 600
uploadmaxfilesize = 500M
postmaxsize = 500M
maxinputvars = 10000

Save and restart

sudo systemctl restart php8.3-fpm

Step 5: Install FFmpeg

sudo apt update
sudo apt install ffmpeg

Verify installation

ffmpeg -version
which ffmpeg  # Should return /usr/bin/ffmpeg

Step 6: Install ImageMagick (Optional)

sudo apt install imagemagick php8.3-imagick
sudo systemctl restart php8.3-fpm

Step 7: Upload ComusThumbz Files

Via File Manager:

In HestiaCP, go to FILES

  1. Navigate to /home/username/web/yourdomain.com/publichtml/
  2. Upload and extract ComusThumbz files

Via SFTP:

# Connect with SFTP client (FileZilla, WinSCP)

Host: your-server-ip

Username: your HestiaCP user

Password: your HestiaCP password

Upload to: /home/username/web/yourdomain.com/publichtml/

Step 8: Set Permissions

# SSH into your server
cd /home/username/web/yourdomain.com/publichtml

Set ownership

chown -R username:username ct/

Set base permissions

find ct/ -type d -exec chmod 755 {} \;
find ct/ -type f -exec chmod 644 {} \;

Make upload/log directories writable

chmod -R 775 ct/logs ct/uploads ct/cache
chmod 777 ct/uploads/temp ct/uploads/temp/useruploads

Step 9: Set Up Cron Job

  1. SSH into your server
  2. Run: crontab -e
  3. Add this line:
     /usr/bin/php /home/username/web/yourdomain.com/publichtml/ct/admin/cron/sitecron.php >> /home/username/web/yourdomain.com/publichtml/ct/logs/cron/sitecron.log 2>&1

Step 10: Run Installer

  1. Navigate to https://yourdomain.com/install/
  2. Follow the installation wizard
  3. Delete the /install/ folder after completion
Success:
Your HestiaCP server is now configured for ComusThumbz!

cPanel/WHM Setup

cPanel is the most common shared hosting control panel. This guide covers setup for both shared and VPS hosting with cPanel.

Prerequisites

  • cPanel hosting account
  • PHP 8.0+ available
  • SSH access (optional but recommended)

Step 1: Select PHP Version

  1. Log in to cPanel
  2. Go to Software > MultiPHP Manager
  3. Select your domain
  4. Choose PHP 8.3 (or highest available 8.x)
  5. Click Apply

[Screenshot: cpanel-php-version]

Step 2: Configure PHP Settings

  1. Go to Software > MultiPHP INI Editor
  2. Select Editor Mode
  3. Choose your domain
  4. Update these settings:
  • memorylimit = 512M
  • maxexecutiontime = 600
  • uploadmaxfilesize = 500M
  • postmaxsize = 500M
  • maxinputvars = 10000
  1. Click Save

Step 3: Enable PHP Functions

Warning:
On shared hosting, you may not have access to enable disabled functions. Contact your host if these functions are disabled.

If you have WHM access:

  1. Log in to WHM
  2. Go to Service Configuration > PHP Configuration Editor
  3. Find disablefunctions
  4. Remove: exec, shellexec, passthru, procopen, popen
  5. Save and rebuild PHP

On shared hosting:
Contact your hosting provider to enable these functions for your account.

Step 4: Upload Files

Go to Files > File Manager

  1. Navigate to publichtml/
  2. Click Upload
  3. Upload and extract ComusThumbz files

Or use FTP:

  • Host: yourdomain.com or ftp.yourdomain.com
  • Username: your cPanel username
  • Password: your cPanel password

Step 5: Set Up Database

  1. Go to Databases > MySQL Databases
  2. Create a new database (e.g., usernamecomus)
  3. Create a new user with a strong password
  4. Add user to database with ALL PRIVILEGES

Step 6: Set Up Cron Job

Go to Advanced > Cron Jobs

  1. Set schedule: (every minute)
  2. Command:
/usr/local/bin/php /home/username/publichtml/ct/admin/cron/sitecron.php >> /home/username/publichtml/ct/logs/cron/sitecron.log 2>&1
  1. Click Add New Cron Job

Step 7: Run Installer

Navigate to https://yourdomain.com/install/ and complete the installation.


Plesk Setup

Plesk is a popular control panel for VPS and dedicated servers.

Step 1: Add Domain

  1. Log in to Plesk
  2. Go to Websites & Domains
  3. Click Add Domain
  4. Enter your domain and configure settings
  5. Enable SSL/TLS support

Step 2: Configure PHP

  1. Go to Websites & Domains > Your domain > PHP Settings
  2. Set PHP version to 8.3
  3. Configure:
  • memorylimit = 512M
  • maxexecutiontime = 600
  • uploadmaxfilesize = 500M
  • postmaxsize = 500M
  1. Click OK

Step 3: Enable PHP Functions

  1. Go to PHP Settings for your domain
  2. Find Additional directives section
  3. Add:
disablefunctions =

(Empty value removes all disabled functions)

  1. Or selectively enable by removing specific functions from the disabled list

Step 4: Install FFmpeg

Via SSH:

# Ubuntu/Debian

sudo apt install ffmpeg

CentOS

sudo yum install ffmpeg

Step 5: Set Up Cron Job

  1. Go to Websites & Domains > Your domain > Scheduled Tasks
  2. Click Add Task
  3. Schedule: Every minute ( )
  4. Command:

/usr/bin/php /var/www/vhosts/yourdomain.com/httpdocs/ct/admin/cron/sitecron.php

Step 6: Upload and Install

  1. Upload files via FTP or File Manager
  2. Set permissions
  3. Run installer at https://yourdomain.com/install/

Ubuntu + Apache (Manual Setup)

For VPS or dedicated servers without a control panel.

Step 1: Update System

sudo apt update
sudo apt upgrade -y

Step 2: Install Apache

sudo apt install apache2 -y
sudo systemctl enable apache2
sudo systemctl start apache2

Step 3: Install PHP 8.3

# Add PHP repository
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update

Install PHP and extensions

sudo apt install php8.3 php8.3-fpm php8.3-mysql php8.3-gd php8.3-curl \
    php8.3-mbstring php8.3-xml php8.3-zip php8.3-imagick php8.3-intl -y

Enable PHP-FPM with Apache

sudo a2enmod proxyfcgi setenvif
sudo a2enconf php8.3-fpm
sudo systemctl restart apache2

Step 4: Install MySQL/MariaDB

sudo apt install mariadb-server -y
sudo mysqlsecureinstallation

Create database and user

sudo mysql -u root -p

CREATE DATABASE comusthumbz CHARACTER SET utf8mb4 COLLATE utf8mb4unicodeci;
CREATE USER 'comususer'@'localhost' IDENTIFIED BY 'YourSecurePassword123!';
GRANT ALL PRIVILEGES ON comusthumbz. TO 'comususer'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 5: Install FFmpeg

sudo apt install ffmpeg -y
which ffmpeg  # Should return /usr/bin/ffmpeg

Step 6: Configure PHP

sudo nano /etc/php/8.3/fpm/php.ini

Update these settings:

memorylimit = 512M

maxexecutiontime = 600

uploadmaxfilesize = 500M

postmaxsize = 500M

maxinputvars = 10000

date.timezone = America/NewYork
; Ensure exec and related functions are NOT in disablefunctions
sudo systemctl restart php8.3-fpm

Step 7: Configure Apache Virtual Host

sudo nano /etc/apache2/sites-available/yourdomain.com.conf
<VirtualHost :80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    DocumentRoot /var/www/yourdomain.com
<Directory /var/www/yourdomain.com>
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php8.3-fpm.sock|fcgi://localhost"
</FilesMatch>

 

 

ErrorLog ${APACHELOGDIR}/yourdomain.com-error.log
CustomLog ${APACHELOGDIR}/yourdomain.com-access.log combined
</VirtualHost>

 

# Enable site and required modules
sudo a2ensite yourdomain.com.conf
sudo a2enmod rewrite headers expires deflate
sudo systemctl restart apache2

Step 8: Install SSL (Let's Encrypt)

sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

Step 9: Upload ComusThumbz

# Create document root
sudo mkdir -p /var/www/yourdomain.com

Upload files (via SCP, SFTP, or wget)

cd /var/www/yourdomain.com

... upload files ...

Set ownership

sudo chown -R www-data:www-data /var/www/yourdomain.com

Set permissions

sudo find /var/www/yourdomain.com -type d -exec chmod 755 {} \;
sudo find /var/www/yourdomain.com -type f -exec chmod 644 {} \;
sudo chmod -R 775 /var/www/yourdomain.com/ct/logs /var/www/yourdomain.com/ct/uploads

Step 10: Set Up Cron Job

sudo crontab -e

Add:

     /usr/bin/php /var/www/yourdomain.com/ct/admin/cron/sitecron.php >> /var/www/yourdomain.com/ct/logs/cron/sitecron.log 2>&1

Ubuntu + Nginx Setup

Nginx is recommended for high-traffic sites due to its efficient handling of static files and concurrent connections.

Step 1: Install Nginx and PHP

sudo apt update
sudo apt install nginx -y

Install PHP-FPM

sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
sudo apt install php8.3-fpm php8.3-mysql php8.3-gd php8.3-curl \
    php8.3-mbstring php8.3-xml php8.3-zip php8.3-imagick -y

Step 2: Configure Nginx

sudo nano /etc/nginx/sites-available/yourdomain.com
server {
    listen 80;
    listen [::]:80;
    servername yourdomain.com www.yourdomain.com;
    root /var/www/yourdomain.com;
    index index.php index.html;

# Security headers
add
header X-Frame-Options "SAMEORIGIN" always;
addheader X-Content-Type-Options "nosniff" always;
add
header X-XSS-Protection "1; mode=block" always;


# Main location block
location / {
tryfiles $uri $uri/ /index.php?$querystring;
}


# REST API rewrite
location /ct/api/v1 {
tryfiles $uri $uri/ /ct/api/v1/index.php?$querystring;
}


# PHP processing
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgipass unix:/var/run/php/php8.3-fpm.sock;
fastcgi
param SCRIPTFILENAME $documentroot$fastcgiscriptname;
include fastcgiparams;
}


# Deny access to sensitive directories
location ~ ^/ct/(dat|logs)/ {
deny all;
return 404;
}


# Cache static files
location ~ \.(jpg|jpeg|png|gif|webp|ico|css|js|mp4|webm|m3u8|ts)$ {
expires 30d;
add
header Cache-Control "public, immutable";
}


# Deny access to hidden files
location ~ /\. {
deny all;
}
}

 

# Enable site
sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

Step 3: Configure PHP-FPM

sudo nano /etc/php/8.3/fpm/php.ini

Update settings as shown in the Apache section, then:

sudo systemctl restart php8.3-fpm

Step 4: Install SSL

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

Step 5: Continue with Steps 4-10 from Apache Guide

(Database setup, FFmpeg, upload files, permissions, cron)


CentOS / AlmaLinux Setup

Step 1: Install EPEL and Required Repositories

# CentOS/RHEL 8+
sudo dnf install epel-release -y
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y

Enable Remi PHP 8.3

sudo dnf module reset php -y
sudo dnf module enable php:remi-8.3 -y

Step 2: Install Apache, PHP, and Extensions

sudo dnf install httpd php php-fpm php-mysqlnd php-gd php-curl \
    php-mbstring php-xml php-zip php-imagick -y

sudo systemctl enable httpd php-fpm
sudo systemctl start httpd php-fpm

 

Step 3: Install MariaDB

sudo dnf install mariadb-server -y
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysqlsecureinstallation

Step 4: Install FFmpeg

# Enable RPM Fusion
sudo dnf install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y

sudo dnf install ffmpeg -y

 

Step 5: Configure PHP

sudo nano /etc/php.ini

Update settings as described in previous sections.

sudo systemctl restart php-fpm

Step 6: Configure SELinux (if enabled)

# Allow Apache to connect to network (for API calls)
sudo setsebool -P httpdcannetworkconnect 1

Allow Apache to write to upload directories

sudo chcon -R -t httpdsysrwcontentt /var/www/yourdomain.com/ct/uploads
sudo chcon -R -t httpdsysrwcontentt /var/www/yourdomain.com/ct/logs

Step 7: Configure Firewall

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

Docker Setup (Development)

For development environments or scalable deployments.

docker-compose.yml

version: '3.8'

services:
web:
image: php:8.3-apache
container
name: comusthumbz-web
ports:


  • "80:80"
  • "443:443"

    volumes:

  • ./:/var/www/html
  • ./docker/php.ini:/usr/local/etc/php/php.ini
  • ./docker/apache.conf:/etc/apache2/sites-available/000-default.conf

    dependson:

  • db

    environment:

  • APACHERUNUSER=www-data
  • APACHERUNGROUP=www-data

    command: >

      bash -c "docker-php-ext-install mysqli pdo pdomysql gd

      && a2enmod rewrite

      && apache2-foreground"

 


db:
image: mariadb:11.4
containername: comusthumbz-db
ports:


  • "3306:3306"

    environment:

      MYSQLROOTPASSWORD: rootpassword

      MYSQLDATABASE: comusthumbz

      MYSQLUSER: comususer

      MYSQLPASSWORD: comuspassword

    volumes:

  • dbdata:/var/lib/mysql

 


ffmpeg:
image: jrottenberg/ffmpeg:4.4-alpine
container
name: comusthumbz-ffmpeg
volumes:


  • ./ct/uploads:/uploads

 


volumes:
dbdata:

 

docker/php.ini

memorylimit = 512M
maxexecutiontime = 600
uploadmaxfilesize = 500M
postmaxsize = 500M
maxinputvars = 10000
date.timezone = UTC

Running Docker Setup

# Build and start containers
docker-compose up -d

Run installer


Navigate to http://localhost/install/


Cloudways Setup

Cloudways provides managed cloud hosting with easy configuration.

Step 1: Launch Application

  1. Log in to Cloudways
  2. Click Launch > Application
  3. Select Custom PHP app
  4. Choose server size and cloud provider
  5. Enter application and server names
  6. Click Launch

Step 2: Configure PHP

  1. Go to Application > Application Settings > PHP Settings
  2. Update:
  • PHP Version: 8.3
  • Memory Limit: 512M
  • Max Execution Time: 600
  • Upload Max Filesize: 500M
  • Post Max Size: 500M

Step 3: Enable PHP Functions

  1. Go to Server > Settings & Packages > Advanced
  2. Find PHP FPM Settings
  3. Remove disabled functions as needed

Step 4: SSH Access

  1. Go to Server > Master Credentials
  2. Note SSH details
  3. Connect via SSH to install FFmpeg:
sudo apt install ffmpeg -y

Step 5: Upload Files

  1. Go to Application > Access Details
  2. Note SFTP credentials
  3. Upload files via SFTP to publichtml/

Step 6: Set Up Cron

  1. Go to Application > Cron Job Management
  2. Add new cron:

Schedule:

  • Command: php ~/publichtml/ct/admin/cron/sitecron.php

Post-Setup Verification

After completing setup on any platform, verify these items:

1. PHP Configuration Check

Navigate to your site and create a test file:

<?php
// testconfig.php
phpinfo();
?>

Verify:

  • [ ] PHP version 8.0+
  • [ ] Required extensions loaded
  • [ ] Memory limit 256M+
  • [ ] Max execution time 300+

 

Delete this file after checking!

2. FFmpeg Check

ffmpeg -version
ffprobe -version

3. Cron Check

After a few minutes:

tail -f /path/to/ct/logs/cron/sitecron.log

 

Should see regular activity.

4. Permission Check

ls -la /path/to/ct/logs/
ls -la /path/to/ct/uploads/

Web server should own these directories.

5. Run Installer

Navigate to https://yourdomain.com/install/ and complete installation.


Troubleshooting Common Setup Issues

"exec() has been disabled" Error

 

Error:
Symptoms: Video processing fails, FFmpeg errors.

 

Solution: Enable exec() in PHP configuration. See platform-specific instructions above.

 

"Permission denied" Errors

 

Error:
Symptoms: Cannot upload files, cannot save settings.

 

Solution:

chown -R www-data:www-data /path/to/ct/

chmod -R 775 /path/to/ct/logs /path/to/ct/uploads

 

Cron Job Not Running

 

Error:
Symptoms: Videos stay in "pending" status.

 

Verify cron:

# Check cron is running

systemctl status cron

 


Check cron log

grep CRON /var/log/syslog

Test manually

php /path/to/ct/admin/cron/sitecron.php

500 Internal Server Error

 

Error:
Symptoms: Blank page or 500 error.

 

Solutions:

  1. Check PHP error log: tail -f /path/to/ct/logs/php-error.log
  2. Check Apache/Nginx error log
  3. Verify .htaccess is valid
  4. Check file permissions

 

API Returns 404

 

Error:
Symptoms: REST API endpoints return 404.

 

Apache: Ensure modrewrite is enabled and AllowOverride All is set.

Nginx: Ensure the API rewrite rule is in your server block:

location /ct/api/v1 {

    tryfiles $uri $uri/ /ct/api/v1/index.php?$querystring;

}

 



Changelog

Date Version Changes
2026-01-02 1.0.0 Initial server setups guide

End of Common Server Setups Guide