CubeCart
Overview
CubeCart is an e-commerce platform for running an online store. This SecureAnyCloud image runs CubeCart 6.7.5 on AWS behind nginx with PHP-FPM 8.3 and OPcache enabled, and with MariaDB as the database. CubeCart comes already installed, so the first request lands on a working storefront.
What you get:
- PHP-FPM 8.3 with OPcache, and the mysqli, gd, curl, mbstring, xml, zip and intl extensions that CubeCart needs
- MariaDB on the same instance, bound to the loopback interface only
- A systemd timer that runs the CubeCart cron every five minutes for scheduled tasks
- HTTPS on port 443, with plain HTTP on port 80 redirecting to it. CubeCart 6.7.5 requires HTTPS end to end: it redirects plain HTTP to HTTPS and issues secure session cookies
- A self-signed certificate generated fresh on the first boot of every instance, so no two instances share a private key. Your browser shows a certificate warning until you install a trusted certificate. The HTTPS step below covers switching to a free Let's Encrypt certificate
- CubeCart already installed, with the
setup/directory removed. You can sign straight in to the admin control panel with no setup wizard to work through - A fresh administrator password and a fresh MariaDB password generated on the first boot of every deployed instance, so two instances launched from the same Amazon Machine Image never share secrets. Both passwords are written to
/root/cubecart-credentials.txtwith mode 0600, so only the root user can read them - The CubeCart application code and storefront document root, including product images, under
/var/www/cubecarton a dedicated EBS volume separate from the operating system disk - The MariaDB data directory on its own EBS volume at
/var/lib/mysql, so each tier can be resized independently of the others - The unmodified CubeCart community edition, distributed under the GNU General Public License v3.0, including the "Powered by CubeCart" storefront branding
Prerequisites
Before you deploy this image, make sure you have:
- An AWS account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network and inbound ports 80 and 443 from the networks your customers use to reach the store
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line
Launch the instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for CubeCart. Select the SecureAnyCloud listing and choose Select, then Continue on the subscription summary.
Pick an instance type of m5.large or larger. The CubeCart workload is PHP and MariaDB heavy, and catalog and checkout operations benefit from memory. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Create or select a security group that allows inbound port 22 from your management network and inbound ports 80 and 443 from the networks your customers use. Leave the root volume at the default size or larger.
Select Launch instance. First-boot initialisation takes a few seconds after the instance state becomes Running and the status checks pass.
Launch the instance from the AWS CLI
The following command launches an instance from the SecureAnyCloud CubeCart Marketplace AMI into an existing subnet and security group. Replace <ami-id> with the AMI ID shown on the Marketplace listing, and <key-name> with your EC2 key pair name.
Replace <subnet-id> with your subnet ID. Replace <security-group-id> with a security group that opens ports 22, 80 and 443 as described above.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":30,"VolumeType":"gp3"}}]' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=cubecart-01}]'On success, the command prints a JSON document. Note the instance ID. Once the instance is running, retrieve its public address with aws ec2 describe-instances --instance-ids <instance-id> --query "Reservations[].Instances[].PublicIpAddress" --output text.
Connect and retrieve the initial credentials
Connect over SSH with the key pair you selected and the public IP address from Step 2. The SSH login user for the CubeCart 6.7.5 on Ubuntu 24.04 AMI is ubuntu.
Connect with ssh -i <path-to-key.pem> ubuntu@<instance-public-ip>. Substitute your key path and the instance's public IP address.
The per-instance administrator password is written to a root-only file on first boot. Read it with:
sudo cat /root/cubecart-credentials.txtThe file lists the storefront URL, the admin control panel URL, the administrator username (admin) and password, and the MariaDB database name, user and password. Store the administrator password in your password manager, and treat the file as sensitive.
Verify the stack is running
CubeCart is served by three systemd units. Confirm that they are active:
systemctl is-active nginx php8.3-fpm mariadbEach line returns active. Confirm that nginx is listening on the HTTPS port with ss -tlnp | grep ':443'. Confirm the PHP version with php -v. This image ships PHP 8.3.
The CubeCart cron processes scheduled tasks and runs every five minutes through a systemd timer:
systemctl status cubecart-cron.timerSign in to the admin control panel
Browse to https://<instance-public-ip>/admin.php to reach the admin control panel. The certificate is self-signed, so your browser shows a security warning the first time. Choose to proceed (in Chrome, select Advanced, then Proceed).
Sign in with the username admin and the password from /root/cubecart-credentials.txt.
After you sign in, you land on the Dashboard. It shows sales figures, recent orders, a store overview and quick tasks. The left-hand menu gives you Customers, Inventory, Reporting, File Manager and Settings.
The customer-facing storefront is at https://<instance-public-ip>/. Your customers browse the catalog, add products to the basket and check out there.
Change the administrator password and set your details
The first-boot password is unique to your instance, but you should still set your own. In the admin control panel, open Settings > Administrators and edit the admin user.
Set your name and email address, and change the password to one you control. CubeCart stores administrator passwords as bcrypt hashes.
Set your store name and core settings
Open Settings > Store Settings. Set the Store Name, the store email address, and your address, country and default currency. These appear on the storefront, on invoices and in transactional emails.
The store URL is pinned on first boot to your instance address. When you move to a custom domain (see below), update it here and in /var/www/cubecart/includes/global.inc.php.
Build your catalog
CubeCart organises your shop with categories and products.
- Categories (Inventory > Categories) group your products, for example Clothing, Accessories or Downloads.
- Products (Inventory > Products) are what you sell. Add a product, set its name, price, stock and description, assign it to a category, and upload product images.
- Product Options (Inventory > Product Options) define variants such as size or colour.
The image ships with one example category and product so the storefront renders out of the box. Delete them once you have added your own.
Configure payment and shipping
CubeCart processes orders through payment and shipping extension modules.
- Payment gateways (Manage Extensions > Payment) include PayPal, Stripe, Sage Pay and others. Enable the gateways you use and enter your merchant credentials.
- Shipping modules (Manage Extensions > Shipping) let you charge by weight, price or a flat rate, or integrate a carrier. Configure the rules that match your fulfilment.
Place a test order end to end before you go live, to confirm your payment and shipping configuration.
Install a trusted HTTPS certificate with Let's Encrypt
The image serves HTTPS with a self-signed certificate so the store works immediately, but browsers show a warning. For production, point a DNS name at the instance's public address and install a free Let's Encrypt certificate.
The commands below are illustrative. Replace shop.example.com with your domain and run them as root. They involve a domain you own and interactive prompts, so run them yourself.
Install Certbot and the nginx plugin, then request a certificate. Certbot edits the nginx site in place and reloads nginx:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d shop.example.com
After the trusted certificate is live, set the store URL to your https://shop.example.com address under Settings > Store Settings. Then update $glob['standard_url'] in /var/www/cubecart/includes/global.inc.php to match.
Back up and maintain the store
The CubeCart database lives in MariaDB on the /var/lib/mysql volume. The application files and product images live under /var/www/cubecart. Back up both.
A simple database dump is:
sudo mysqldump --single-transaction cubecart | gzip > cubecart-db-$(date +%F).sql.gzTake EBS snapshots of the data volumes for point-in-time recovery, and take a snapshot before any CubeCart version upgrade. Keep the operating system patched with sudo apt-get update && sudo apt-get -y upgrade.
Review the storage layout
The application and database tiers are on dedicated EBS volumes, and each volume can be resized independently:
df -h /var/lib/mysql /var/www/var/lib/mysql holds the MariaDB data directory and /var/www holds the CubeCart code, storefront document root and product images.
To grow a tier, modify the EBS volume in the EC2 console. Then extend the filesystem with sudo resize2fs <device>.
Screenshots
The CubeCart storefront, served over HTTPS on first boot with the Foundation theme, catalog and shopping cart:
A storefront category page, with featured products, best sellers and on-sale listings:
The admin control panel sign-in page:
The admin control panel dashboard after you sign in with the per-instance administrator password:
The product inventory, where you manage the catalog, categories, options, pricing and stock:
Support
This image is backed by 24/7 technical support from SecureAnyCloud, covering CubeCart deployment, upgrades, catalog and store configuration, payment and shipping modules, themes, email delivery and database administration. Contact support through the channel listed on the AWS Marketplace listing.
Deploy on AWS
Launch CubeCart on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com