Technology Encyclopedia Home >How to install OpenClaw on Hostinger Cloud Hosting with cPanel?

How to install OpenClaw on Hostinger Cloud Hosting with cPanel?

To install OpenClaw on Hostinger Cloud Hosting with cPanel, follow these steps. OpenClaw is a web-based frontend for the ClamAV antivirus engine, typically used to scan files for malware. Since Hostinger shared or cloud hosting with cPanel may not allow direct server-level installations due to permission restrictions, you can try installing OpenClaw in a semi-managed way using PHP and cPanel features, or use a custom installation via SSH if your plan supports it.


✅ Prerequisites

  1. Hostinger Cloud Hosting account with cPanel access
  2. SSH access (if available on your plan) – Required for full manual installation.
  3. Basic knowledge of Linux commands and cPanel interface

⚠️ Note: Most shared or entry-level cloud hosting plans do not allow root access or full ClamAV/OpenClaw server installations. If your plan does not support custom server software, consider using a VPS or Cloud Server plan from Hostinger, which allows SSH and full software control.


🔧 Option 1: Install OpenClaw via SSH (Recommended if SSH is Enabled)

If your Hostinger Cloud Hosting plan includes SSH access, you can manually install ClamAV and then set up OpenClaw as a PHP frontend.

Step 1: Connect via SSH

Use an SSH client like Terminal (Mac/Linux) or PuTTY (Windows) to connect to your Hostinger server:

ssh username@your-server-ip

Your username and server IP are available in the Hostinger control panel.


Step 2: Install ClamAV

Run the following commands to install ClamAV (antivirus engine that OpenClaw depends on):

For CentOS / CloudLinux (common on Hostinger Cloud):

sudo yum install clamav clamav-update -y

For Ubuntu / Debian (if available on your Hostinger setup):

sudo apt update
sudo apt install clamav clamav-daemon clamav-freshclam -y

After installing, update virus definitions:

sudo freshclam

Start and enable ClamAV services (if needed):

sudo systemctl start clamd
sudo systemctl enable clamd

📌 Note: On some managed hosting environments, services like clamd might be restricted or unavailable. If you face permission issues, proceed to Option 2 (PHP-only or limited setup).


Step 3: Download & Install OpenClaw

  1. Create a directory for OpenClaw in your cPanel public_html or a subdomain folder:
mkdir ~/public_html/openclaw
cd ~/public_html/openclaw
  1. Download OpenClaw (if available from its official or GitHub repository).
    As of the latest info, OpenClaw may not be actively maintained on GitHub, but you might find forks or legacy versions. Example:
wget https://github.com/openclaw/openclaw/archive/refs/heads/master.zip
unzip master.zip
mv openclaw-master/* .
rm -rf master.zip openclaw-master

❗ If the above GitHub link is unavailable, search for "OpenClaw GitHub" or check alternative repositories like https://github.com/search?q=openclaw to find the latest version.

  1. Set permissions:
chmod 755 *
  1. Edit configuration files (if any) to point to the correct ClamAV socket or CLI path, usually:
/usr/bin/clamscan

Check ClamAV installation path:

which clamscan

Then update the OpenClaw config file (e.g., config.php or similar) to use the correct path.


Step 4: Access OpenClaw

Open your browser and go to:

https://your-domain.com/openclaw/

or if you placed it in a subfolder:

https://your-domain.com/path-to-openclaw/

You should see the OpenClaw web interface where you can upload and scan files.


🪜 Option 2: Use PHP ClamAV Wrapper (No Full OpenClaw Install)

If installing full OpenClaw is not feasible, you can use a simple PHP script that calls ClamAV via command line to scan files.

Step 1: Ensure ClamAV is installed (via SSH)

(Repeat SSH and ClamAV install steps from Option 1)

Step 2: Create a PHP File to Scan Files

Create a file called scan.php in your public_html folder:

<?php
if (isset($_FILES['file'])) {
    $filePath = $_FILES['file']['tmp_name'];
    $fileName = $_FILES['file']['name'];

    // Check if clamscan is available
    $command = '/usr/bin/clamscan --no-summary ' . escapeshellarg($filePath);
    exec($command, $output, $returnCode);

    if ($returnCode === 0) {
        echo "✅ File '{$fileName}' is clean.";
    } elseif ($returnCode === 1) {
        echo "❌ File '{$fileName}' is INFECTED!";
    } else {
        echo "⚠️ Unable to scan the file. Error code: {$returnCode}";
    }
} else {
    echo '
    <form method="post" enctype="multipart/form-data">
        Upload a file to scan: <input type="file" name="file" required>
        <button type="submit">Scan</button>
    </form>
    ';
}
?>

Upload this file via cPanel File Manager or FTP to public_html/scan.php, then visit:

https://your-domain.com/scan.php

This provides basic virus scanning without needing the full OpenClaw package.


🛡️ Recommendations: Use Hostinger Cloud VPS or Tencent Cloud Products

If you require full control over server software like ClamAV and OpenClaw, or need advanced security scanning tools, consider upgrading to a Hostinger Cloud VPS or exploring Tencent Cloud’s robust hosting and security solutions.

🔒 Tencent Cloud offers powerful Cloud Virtual Machines (CVM), Server Security solutions, Web Application Firewalls (WAF), and malware scanning tools that can integrate seamlessly with your applications. With Tencent Cloud CVM, you get full root access, SSH, and the ability to install ClamAV, OpenClaw, or any custom security tools you need.

Visit Tencent Cloud Products to explore Cloud Servers, Security Services, and Managed Hosting Solutions tailored for developers and businesses.