Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

Osclass Hosting — Best Hosting Setup for Osclass Websites

5 min read
09.01.2026

Recommended Hosting Environment for Osclass

To ensure smooth performance for Osclass, choose a hosting setup that meets these requirements:

Osclass Hosting Best Setup
Osclass hosting — pick RAM-first, disk grows fast with images.

For the parallel "Osclass sysadmin install guide," see Osclass Hosting — A Complete Guide for System Administrators. For other CMS hosting topics, Best Hosting Options for Mautic.

Minimum Requirements

Component Requirement
Web Server Apache / Nginx / LiteSpeed
PHP Version PHP 7.4+ (PHP 8+ is recommended for better performance)
Database MySQL 5.7+ or MariaDB 10+
PHP Extensions cURL, GD, MBstring, XML, OpenSSL, MySQLi
Memory Limit At least 128MB (256MB+ recommended)

Recommended VPS/Dedicated Setup

For high-traffic Osclass websites with thousands of listings, a properly configured VPS is essential.

Example Configuration for 10,000+ Listings

Component Specification
CPU 3-4 vCPUs or more
RAM 4GB RAM (8GB+ recommended for high traffic)
Storage NVMe SSD with at least 40GB
Operating System Ubuntu 22.04 LTS / AlmaLinux 9
Web Server Stack Nginx + PHP-FPM or Apache + mod_php
Database MariaDB 10.6+ with optimized queries
For EraHost Users: Our Cloud-2 and Cloud-3 VPS plans provide excellent starting points for Osclass websites, offering balanced resources for growing classifieds platforms.

How to Install Osclass on a VPS

1. Update the Server

For Ubuntu/Debian:

sudo apt update && sudo apt upgrade -y

For CentOS/RHEL/AlmaLinux:

sudo yum update -y

2. Install LAMP or LEMP Stack

Option A: Install Apache + MySQL + PHP (LAMP) - Ubuntu/Debian

sudo apt install apache2 mysql-server php php-mysqli php-curl php-gd php-mbstring php-xml php-zip unzip -y

Restart services:

sudo systemctl restart apache2
sudo systemctl restart mysql

Option B: Install Nginx + MySQL + PHP (LEMP) - Ubuntu/Debian

sudo apt install nginx mysql-server php-fpm php-mysqli php-curl php-gd php-mbstring php-xml php-zip unzip -y

Restart services:

sudo systemctl restart nginx
sudo systemctl restart mysql

3. Download & Install Osclass

Navigate to the web root and download Osclass:

cd /var/www/html
sudo wget https://osclass-community.github.io/osclass/download/osclass.zip
sudo unzip osclass.zip
sudo mv osclass/* .

Set the correct permissions:

sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 755 /var/www/html

4. Create a MySQL Database for Osclass

mysql -u root -p

Inside MySQL, run:

CREATE DATABASE osclass_db;
CREATE USER 'osclass_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON osclass_db.* TO 'osclass_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

5. Configure Apache/Nginx for Osclass

Apache Virtual Host Configuration

sudo nano /etc/apache2/sites-available/osclass.conf

Add:

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/html
    <Directory /var/www/html/>
        AllowOverride All
        Require all granted
        Options -Indexes
    </Directory>
</VirtualHost>

Enable the site:

sudo a2ensite osclass.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Nginx Configuration

sudo nano /etc/nginx/sites-available/osclass

Add:

server {
    listen 80;
    server_name yourdomain.com;
    root /var/www/html;
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }
}

Enable the site:

sudo ln -s /etc/nginx/sites-available/osclass /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

6. Install Osclass via Web Installer

  1. Open your browser and visit: http://yourdomain.com
  2. Follow the Osclass installation wizard:
    • Enter database name, username, and password.
    • Create an admin account.
    • Set up your classifieds website details.
  3. Click Finish Installation.
  4. Important: Delete the /oc-includes/osclass/install.php file after installation for security.

Now, Osclass is installed and ready!

Linux VDS
High performance for your projects
  • Root access and flexible setup
  • Control panel
  • NVMe disks
  • DDR5
Linux VDS

Performance Optimization for Osclass

Enable Caching

Use Memcached or Redis to improve page load speed:

sudo apt install memcached php-memcached -y
sudo systemctl restart apache2  # or nginx/php-fpm

In Osclass Admin Panel, enable caching under Settings > Performance.

Enable GZIP Compression

For Apache:

sudo a2enmod deflate
sudo systemctl restart apache2

For Nginx (add to your server block):

gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/json application/javascript application/xml+rss;

Restart Nginx: sudo systemctl restart nginx

Optimize MySQL/MariaDB Performance

Edit MySQL configuration:

sudo nano /etc/mysql/my.cnf

Add under [mysqld] section:

innodb_buffer_pool_size = 256M
query_cache_size = 64M
query_cache_limit = 4M
key_buffer_size = 64M
max_allowed_packet = 64M

Restart MySQL: sudo systemctl restart mysql

Secure Your Osclass Hosting

  1. Enable HTTPS with Let's Encrypt:
    sudo apt install certbot python3-certbot-apache  # Apache
    sudo certbot --apache -d yourdomain.com
    
    # or for Nginx
    sudo apt install certbot python3-certbot-nginx
    sudo certbot --nginx -d yourdomain.com
  2. Use Fail2Ban to Protect SSH & Login Pages:
    sudo apt install fail2ban -y
    sudo systemctl enable fail2ban
  3. Disable Root SSH Login:
    sudo nano /etc/ssh/sshd_config
    # Change: PermitRootLogin no
    sudo systemctl restart sshd
  4. Regular Updates: Keep your system and Osclass updated:
    sudo apt update && sudo apt upgrade -y

Summary

Task Command/Steps
Update VPS sudo apt update && sudo apt upgrade -y
Install LAMP/LEMP Stack sudo apt install apache2 mysql-server php php-mysqli -y
Download Osclass wget https://osclass-community.github.io/osclass/download/osclass.zip
Create MySQL Database CREATE DATABASE osclass_db;
Configure Virtual Host Edit /etc/apache2/sites-available/osclass.conf or /etc/nginx/sites-available/osclass
Set Permissions sudo chown -R www-data:www-data /var/www/html
Enable HTTPS certbot --apache -d yourdomain.com
Optimize Performance Enable Memcached, GZIP compression, MySQL tuning

Now your Osclass classifieds website is fully set up, optimized, and secured on a VPS!

Frequently asked questions
Mostly images. 1000 listings × 5 photos × 200 KB = 1 GB. Plus thumbnails generated by Osclass (typically 3 sizes per upload) = 1.5x that. Once you have older listings keep the images even after listings expire — annual growth often 20-50 GB for an active classifieds site. Plan disk expansion or move uploads to S3/B2 early.
Move to object storage (S3, B2, Wasabi) once you cross 50 GB or you have multiple Osclass servers behind a load balancer. Osclass has plugins for S3-compatible upload. Same-server is simpler for small sites — under 20 GB, the operational simplicity outweighs the S3 cost saving.
`innodb_buffer_pool_size` set to 60-70% of total RAM (assuming MySQL co-located). Many Osclass queries hit `oc_t_item_description` for full-text search — if you have > 50k listings, switch to a Sphinx or Elasticsearch search plugin; MySQL fulltext is the wrong tool past that scale.
Two: bots scrape listings (high read traffic from a few IPs — rate-limit at the web server), and spammers create fake listings via the form. Enable CAPTCHA on listing creation, require email verification, and moderate manually for the first 100 of each new user. Cloudflare + the WAF rule set catches most automated abuse.
Related articles
Osclass Hosting — A Complete Guide for System Administrators
2GB Hosting: What Kind of Website Can It Handle?
SMTP Hosting: Setup and Usage Guide