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.
Before proceeding, ensure your server meets the minimum requirements outlined in the Requirements Guide.
Supported Environments
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
- Log in to HestiaCP at
https://your-server-ip:8083 - Go to WEB tab
- Click Add Web Domain
- Enter your domain name
- Enable SSL Support and check Let's Encrypt
- Click Save
[Screenshot: hestiacp-add-domain]
Step 2: Configure PHP
- Go to WEB tab
- Click the wrench icon next to your domain
- Select PHP 8.3 from the PHP version dropdown
- Click Save
Step 3: Enable Required PHP Functions
HestiaCP disables many PHP functions by default. You MUST enable them for ComusThumbz to work.
Option A: Via HestiaCP Panel
- Go to SERVER > Configure > PHP-FPM
- Find your PHP version (e.g., PHP 8.3)
- Locate
disablefunctionsin the configuration - Remove these functions from the disabled list:
exec
shellexecpassthruprocopenpopen
- Click Save
- 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
- Navigate to
/home/username/web/yourdomain.com/publichtml/ - 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
- SSH into your server
- Run:
crontab -e - 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
- Navigate to
https://yourdomain.com/install/ - Follow the installation wizard
- Delete the
/install/folder after completion
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
- Log in to cPanel
- Go to Software > MultiPHP Manager
- Select your domain
- Choose PHP 8.3 (or highest available 8.x)
- Click Apply
[Screenshot: cpanel-php-version]
Step 2: Configure PHP Settings
- Go to Software > MultiPHP INI Editor
- Select Editor Mode
- Choose your domain
- Update these settings:
memorylimit = 512Mmaxexecutiontime = 600uploadmaxfilesize = 500Mpostmaxsize = 500Mmaxinputvars = 10000
- Click Save
Step 3: Enable PHP Functions
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:
- Log in to WHM
- Go to Service Configuration > PHP Configuration Editor
- Find
disablefunctions - Remove:
exec, shellexec, passthru, procopen, popen - 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
- Navigate to
publichtml/ - Click Upload
- 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
- Go to Databases > MySQL Databases
- Create a new database (e.g.,
usernamecomus) - Create a new user with a strong password
- Add user to database with ALL PRIVILEGES
Step 6: Set Up Cron Job
Go to Advanced > Cron Jobs
- Set schedule:
(every minute) - Command:
/usr/local/bin/php /home/username/publichtml/ct/admin/cron/sitecron.php >> /home/username/publichtml/ct/logs/cron/sitecron.log 2>&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
- Log in to Plesk
- Go to Websites & Domains
- Click Add Domain
- Enter your domain and configure settings
- Enable SSL/TLS support
Step 2: Configure PHP
- Go to Websites & Domains > Your domain > PHP Settings
- Set PHP version to 8.3
- Configure:
memorylimit = 512Mmaxexecutiontime = 600uploadmaxfilesize = 500Mpostmaxsize = 500M
- Click OK
Step 3: Enable PHP Functions
- Go to PHP Settings for your domain
- Find Additional directives section
- Add:
disablefunctions =
(Empty value removes all disabled functions)
- 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
- Go to Websites & Domains > Your domain > Scheduled Tasks
- Click Add Task
- Schedule: Every minute (
) - Command:
/usr/bin/php /var/www/vhosts/yourdomain.com/httpdocs/ct/admin/cron/sitecron.php
Step 6: Upload and Install
- Upload files via FTP or File Manager
- Set permissions
- 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
addheader X-Frame-Options "SAMEORIGIN" always;
addheader X-Content-Type-Options "nosniff" always;
addheader 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;
fastcgiparam 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;
addheader 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
containername: 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
containername: 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
- Log in to Cloudways
- Click Launch > Application
- Select Custom PHP app
- Choose server size and cloud provider
- Enter application and server names
- Click Launch
Step 2: Configure PHP
- Go to Application > Application Settings > PHP Settings
- 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
- Go to Server > Settings & Packages > Advanced
- Find PHP FPM Settings
- Remove disabled functions as needed
Step 4: SSH Access
- Go to Server > Master Credentials
- Note SSH details
- Connect via SSH to install FFmpeg:
sudo apt install ffmpeg -y
Step 5: Upload Files
- Go to Application > Access Details
- Note SFTP credentials
- Upload files via SFTP to
publichtml/
Step 6: Set Up Cron
- Go to Application > Cron Job Management
- 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
Symptoms: Video processing fails, FFmpeg errors.
Solution: Enable exec() in PHP configuration. See platform-specific instructions above.
"Permission denied" Errors
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
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
Symptoms: Blank page or 500 error.
Solutions:
- Check PHP error log:
tail -f /path/to/ct/logs/php-error.log - Check Apache/Nginx error log
- Verify
.htaccessis valid - Check file permissions
API Returns 404
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;
}
Related Documentation
- Requirements Guide - Complete system requirements
- Welcome Guide - Getting started overview
- Installation Guide - Step-by-step installation
- Settings Control Center - Master configuration
Changelog
End of Common Server Setups Guide