Tutorials  /  Ubuntu

Install CubeCart on Ubuntu 20.04 – Complete Setup Guide

Ccentron Redaktion · June 2025 ·6 min read ·Ubuntu, Tutorial

CubeCart is a free and open-source eCommerce solution tailored for setting up online stores efficiently. Developed in PHP, it offers a straightforward deployment process and a user-friendly environment. Key functionalities include:

  • Access to technical support
  • Comprehensive product statistics
  • Integration with social media platforms
  • Support for multiple languages
  • Multi-currency compatibility
  • Database utilities for backup and recovery
  • Offline availability with caching capability

This guide walks you through the installation of CubeCart on a server running Ubuntu 20.04.

Prerequisites

  • Deploy a Ubuntu 20.04 server with the latest updates applied
  • Create a non-root user and grant sudo privileges
VM

Matching infrastructure at centron

Ubuntu servers without your own hardware: ccloud³ VMs with full root access from €3.12 per month, billed by the hour and ready in seconds. Rent a cloud server →

Step 1: Set Up the LAMP Stack

Start by updating the system's package index:

Console
$ sudo apt update

Add the PHP PPA maintained by Ondřej Surý:

Console
$ sudo apt -y install software-properties-common

$ sudo add-apt-repository ppa:ondrej/php

Refresh the package list again to include the new repository:

Console
$ sudo apt update

CubeCart is best supported by PHP version 7.3. Install the required packages, including Apache, MariaDB, and essential PHP modules:

Console
$ sudo apt install apache2 mariadb-server mariadb-client php7.3 libapache2-mod-php7.3 php7.3-json php7.3-common php7.3-gmp php7.3-curl php7.3-mysql php7.3-mysqli php7.3-mcrypt php7.3-opcache php7.3-intl php7.3-fpm php7.3-xmlrpc php7.3-bcmath php7.3-zip php7.3-imagick php7.3-mbstring php7.3-gd php7.3-cli php7.3-xml php7.3-zip wget unzip curl -y

Modify the PHP settings for optimal CubeCart performance by editing the configuration file:

Console
$ sudo nano /etc/php/7.3/apache2/php.ini

Use Control + W to locate the lines you want to change, then update the following values:

  • memory_limit = 512M
  • upload_max_filesize = 100M
  • post_max_size = 100M

Ensure Apache starts on system reboot:

Console
$ sudo systemctl enable apache2

Restart Apache to apply the new configuration settings:

Console
$ sudo systemctl restart apache2

Step 2: Create the CubeCart Database

Start by enabling the MariaDB service to launch automatically on system reboot:

Console
$ sudo systemctl enable mariadb

Next, run the security script to configure and secure your MariaDB installation:

Console
$ sudo mysql_secure_installation

Answer the prompts as follows to tighten security:

  • Press Enter for the current root password
  • Choose Y to set a new root password
  • Select Y to remove anonymous users
  • Choose Y to block remote root login
  • Press Y to delete the test database
  • Choose Y to reload the privileges table

Now, access the MySQL shell. Enter your root password when prompted:

Console
$ sudo mysql -u root -p

Inside the MySQL shell, execute the following commands to set up the database:

  • Create a new database called cubecart:
Code
CREATE DATABASE cubecart;
  • Add a user cubecartuser with a secure password (replace StrongPassword accordingly):
Code
CREATE USER 'cubecartuser'@'localhost' IDENTIFIED BY 'StrongPassword';
  • Grant the user all rights to the cubecart database:
Code
GRANT ALL ON cubecart.* TO 'cubecartuser'@'localhost' WITH GRANT OPTION;
  • Apply the permission changes and exit:
Code
FLUSH PRIVILEGES;
EXIT

Step 3: Install CubeCart

Download the latest version of CubeCart using the link from the official site. The version referenced here is 6.4.4:

Console
$ wget https://www.cubecart.com/download/CubeCart-6.4.4.zip

Create a new directory within the Apache root path for the CubeCart installation:

Console
$ sudo mkdir -p /var/www/cubecart

Extract the downloaded ZIP file into the newly created directory:

Console
$ sudo unzip CubeCart-6.4.4.zip -d /var/www/cubecart

Clean up by removing the ZIP archive:

Console
$ sudo rm CubeCart-6.4.4.zip

Assign ownership of the installation files to the Apache user:

Console
$ sudo chown -R www-data:www-data /var/www/cubecart

Adjust directory permissions to ensure appropriate access rights:

Console
$ sudo chmod -R 755 /var/www/cubecart

Step 4: Configure Apache2 Web Server

Start by permitting HTTP traffic through the system's firewall:

Console
$ sudo ufw allow 80

Now create a dedicated Apache configuration file named cubecart.conf:

Console
$ sudo nano /etc/apache2/sites-available/cubecart.conf

Insert the following configuration details into the file and save your changes:

Code
<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/cubecart
    ServerName example.com
    ServerAlias www.example.com

    <Directory /var/www/cubecart/>
        Options FollowSymlinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Deactivate Apache’s default site configuration to avoid conflicts:

Console
$ sudo a2dissite 000-default.conf

Activate the new CubeCart site configuration:

Console
$ sudo a2ensite cubecart.conf

Enable URL rewriting support, which is essential for CubeCart to function correctly:

Console
$ sudo a2enmod rewrite

Restart Apache to apply all configuration changes:

Console
$ sudo systemctl restart apache2

Step 5: Launch the CubeCart Interface

To begin the web-based setup, open your browser and navigate to your server’s IP address. For instance:

http://192.0.2.10/

Conclusion

You have successfully installed CubeCart on your Ubuntu 20.04 server. Follow the installation wizard in your browser to set up your store. Connect to the database, create an administrator account, and finalize the site configuration. Once completed, you can access both your storefront and admin dashboard.

Jetzt 200 € Guthaben sichern

Testen Sie Ihr Setup auf ccloud³

Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.

centron Redaktion Technische Redaktion

Das Redaktionsteam von centron schreibt Anleitungen aus dem Betriebsalltag: getestet auf unserer eigenen Plattform, betrieben im Rechenzentrum in Hallstadt bei Bamberg.

Kategorie Ubuntu
Teilen
Noch offene Fragen?

Unser Team hilft Ihnen bei Ihrem konkreten Setup weiter – von Menschen, die die Plattform selbst betreiben.

War dieses Tutorial hilfreich?

Ihre Antwort wird anonym gespeichert und hilft uns, die Tutorials zu verbessern.

Kommentare

Noch keine Kommentare – stellen Sie die erste Frage zu diesem Tutorial.

Zum Kommentieren anmelden

Kommentare stehen centron-Kunden offen. Melden Sie sich in Ihrem Konto an, um eine Frage zu diesem Tutorial zu stellen.

Weiterlesen

Das könnte Sie auch interessieren

Jetzt kostenlos anfangen

Melden Sie sich an und erhalten Sie in den ersten 60 Tagen ein Guthaben von 200 € bei centron.

Dieses Werbeangebot gilt nur für neue Konten. Angebot ausschließlich für Gewerbetreibende.

Jetzt loslegen Sales kontaktieren