Hosting Control Panel

THEX Panel — Installation Center

A clean, documentation-style control center for OpenLiteSpeed hosting, LSPHP 7.4 and MariaDB, with website management, databases, file management, phpMyAdmin access, SSL workflows and server administration.

Platform Specifications

Core software included in the current release.

Operating System
Ubuntu 22.04
LTS · amd64
Web Server
OpenLiteSpeed
Production Ready
PHP Runtime
LSPHP 7.4
LiteSpeed PHP stack
Database
MariaDB
Server + client tools

Installation

Recommended one-command installation on a clean Ubuntu 22.04 amd64 server.

1

Prepare a clean server

Use Ubuntu 22.04 LTS amd64 with root access.

2

Run the online installer

The installer downloads the panel package and required software from the configured release host.

3

Run the built-in repair stage

The installer downloads and runs the OpenLiteSpeed repair script automatically.

4

Apply the database security update

On existing installations, run the Security Update command once so the THEX panel can create users and assign database privileges.

5

Login and change the password

Open the THEX panel and immediately replace the initial credentials.

# Run as root
curl -4 -fsSL https://fil.thex.cam/install.sh | bash
For security, review the installer source before running it on a production server. The current installer targets Ubuntu 22.04 amd64.

Repair & Recovery

The repair script is independent from the panel application.

What the repair script handles

OpenLiteSpeed listenersHTTP 80 / HTTPS 443
Service conflictsDisables Apache/Nginx conflicts
THEX OLS helperDomain/vHost and PHP mapping helper
Database administrationTHEX user privilege verification
PermissionsRepairs common web-root permissions
Configuration testRuns OpenLiteSpeed validation before restart

Run repair manually

Use this on an existing THEX installation.

curl -4 -fsSL https://fil.thex.cam/THEX-post-install-fix.sh -o /tmp/THEX-post-install-fix.sh
chmod +x /tmp/THEX-post-install-fix.sh
bash /tmp/THEX-post-install-fix.sh

Security Update

Required database administration permissions for the current THEX panel workflow.

What changed

The current THEX database workflow creates databases and users separately, then assigns users with ALL PRIVILEGES.

Database provisioning Create Database
User provisioning Create Database User
Privilege assignment Add User To Database
Required panel DB grant GRANT OPTION
The panel account thex_user must be able to create users and grant database privileges. Apply the command below once as root on an existing installation.

Apply the required database grant

Run as root or another MariaDB administrative account.

# Grant THEX full database administration rights
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'thex_user'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES;"

# Verify the final grant
mysql -e "SHOW GRANTS FOR 'thex_user'@'localhost';"

Recommended verification

Confirm that a database user can access its assigned database.

# Example: verify user "adam" can open database "adam"
mysql -u adam -p -e "USE adam; SHOW TABLES;"
Security note: The command above gives thex_user global database administration rights with GRANT OPTION. This is appropriate for a dedicated hosting-panel administration account, but it should not be reused by websites or application code.

WordPress Update

Compatibility fix for themes that use PHP short open tags on LSPHP 7.4.

Why this update is needed

Some WordPress themes use short PHP tags such as <?. The existing server was configured with short tags disabled, which caused a PHP parse error in the theme.

PHP Runtime LSPHP 7.4
Compatibility option short_open_tag = On
Server OpenLiteSpeed
Theme behavior No theme code changes required
This update changes the LSPHP 7.4 configuration so existing WordPress themes that rely on short PHP tags continue to work without editing the theme files.

Apply the WordPress compatibility update

Run the following commands as root.

# Check the active LSPHP 7.4 configuration
/usr/local/lsws/lsphp74/bin/lsphp --ini

# Enable PHP short open tags
sed -i 's/^[;[:space:]]*short_open_tag[[:space:]]*=.*/short_open_tag = On/' /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini

# Add the setting if it does not exist
grep -qE '^[[:space:]]*short_open_tag[[:space:]]*=' /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini || echo 'short_open_tag = On' >> /usr/local/lsws/lsphp74/etc/php/7.4/litespeed/php.ini

# Verify the setting
/usr/local/lsws/lsphp74/bin/lsphp -i | grep -i '^short_open_tag'

# Restart OpenLiteSpeed
/usr/local/lsws/bin/lswsctrl restart

Verify WordPress theme PHP syntax

Use the same LSPHP binary that OpenLiteSpeed runs.

# Replace the domain/path with the actual WordPress installation
/usr/local/lsws/lsphp74/bin/lsphp -l /var/www/my.thex.cam/html/wp-content/themes/CimaNew/functions.php
Expected result: No syntax errors detected. If the theme previously failed because of <? tags, the server-side compatibility setting above fixes the issue without rewriting the theme.

SSL Setup

Install Certbot on Ubuntu and verify that the SSL certificate management tool is available.

1. Install Certbot

Run these commands as root on the server.

# Update the package index
apt update

# Install Certbot
apt install -y certbot

2. Verify Certbot

Confirm that Certbot was installed correctly.

# Check the installed Certbot version
certbot --version
Expected result: Certbot prints its installed version. If the command is not found, install the package again and check the system package manager output.

3. SSL Preparation Checklist

Complete these checks before requesting a certificate for a domain.

DNS Domain points to this server
HTTP Port 80 is reachable
HTTPS Port 443 is available
Web Server OpenLiteSpeed is running
Certbot certbot --version works
Installing Certbot does not issue a certificate by itself. The domain must resolve to this server and the web-server configuration must be ready before certificate issuance.

OpenLiteSpeed & WordPress URLs

Enable WordPress rewrite rules and load each site's .htaccess automatically.

1. Enable Rewrite in the vHost

Example for my.thex.cam.

# Edit the site's OpenLiteSpeed vHost
nano /usr/local/lsws/conf/vhosts/my.thex.cam/vhconf.conf

# Make sure this exists
rewrite {
    enable          1
    autoLoadHtaccess   1
}

2. Enable Rewrite in the Root Context

Use the site's actual document root.

context / {
    type           static
    location          /var/www/my.thex.cam/html/
    allowBrowse       1
    enableRewrite     1
}

3. Validate and Restart OpenLiteSpeed

Run the configuration test before restarting the web server.

# Validate the OpenLiteSpeed configuration
/usr/local/lsws/bin/openlitespeed -t

# Restart OpenLiteSpeed
/usr/local/lsws/bin/lswsctrl restart
The configuration test should complete successfully before restarting the service.

4. WordPress .htaccess Rules

Keep WordPress's generated rewrite block in the site's document root.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

5. Save WordPress Permalinks

After enabling rewrite support, refresh the WordPress permalink configuration.

WordPress Admin Settings → Permalinks
Action Click “Save Changes”
Expected result Pretty URLs work without /index.php/
OpenLiteSpeed must have rewrite enabled and autoLoadHtaccess enabled for the WordPress .htaccess rules to be loaded automatically.

Quick Verification

Use these checks after creating or repairing a WordPress site.

# Check HTTP/HTTPS listeners
ss -lntp | grep -E ':(80|443)\b'

# Check the site vHost file
grep -nE 'rewrite|autoLoadHtaccess|enableRewrite' /usr/local/lsws/conf/vhosts/my.thex.cam/vhconf.conf