Deployment guide

VirtueMart

Overview

VirtueMart is a mature, free and open source e-commerce solution that runs as a component inside the Joomla content management system. It provides a complete online store: product catalogue and categories, a shopping cart and checkout, orders, customers, coupons, multiple currencies and taxes, and pluggable payment and shipping methods. The store sits inside the full Joomla CMS for content pages, menus, media and multilingual sites, and you manage everything from one administrator panel.

The SecureAnyCloud image delivers VirtueMart 4.6 on Joomla 5, fully installed and configured on Ubuntu 24.04. It is a classic LAMP stack of Apache with mod_php 8.3 and MariaDB. VirtueMart's own sample catalogue is preloaded, so the storefront renders a real shop from the first boot.

What you get:

  • VirtueMart 4.6.4 (GPL-2.0) installed on Joomla 5 (latest 5.4.x) at /var/www/joomla
  • Apache with libapache2-mod-php8.3 (web front on :80), PHP 8.3 with OPcache and MariaDB, all from Ubuntu 24.04 main/universe
  • VirtueMart's sample catalogue (dozens of demonstration products, categories, prices and images) preloaded, and a Shop menu item, so the storefront works immediately. Clear the sample data and add your own products when you are ready
  • A per-VM Joomla administrator password and MariaDB password, generated at first boot and written to a root-only file, so no shared or default credential ships
  • apache2.service and mariadb.service as enabled, active systemd units, with the Joomla task scheduler running hourly from virtuemart-cron.timer
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region. Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point. Scale up for larger catalogues or heavier traffic.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network, and 80/tcp (HTTP) from your customers. If you enable HTTPS, also allow 443/tcp from your customers.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for VirtueMart by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Select Review + create, then select Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:virtuemart-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name virtuemart \
  --image sac1647283583153:virtuemart-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name virtuemart --port 80 --priority 1010

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

Confirm that Apache and MariaDB both report active, that the storefront answers HTTP 200, and that the administrator sign-in page is reachable:

systemctl is-active apache2 mariadb curl -s -o /dev/null -w 'storefront / -> %{http_code}\n' http://127.0.0.1/ curl -sL -o /dev/null -w 'shop (VirtueMart) -> %{http_code}\n' 'http://127.0.0.1/index.php?option=com_virtuemart&view=category' curl -s -o /dev/null -w 'administrator / -> %{http_code}\n' http://127.0.0.1/administrator/

The expected output is two lines of active, then 200 for the storefront and shop, and 200 for the administrator page.

Step 5 - Retrieve your administrator credentials

On the first boot of every VM, a one-shot service (virtuemart-firstboot.service) rotates the credentials so that they are unique to that VM. It sets a fresh MariaDB password and a fresh Joomla administrator password. No shared or default credential ships in the image.

Read the credentials file:

sudo cat /root/virtuemart-credentials.txt

The file (mode 0600, root only) contains the administrator user (joomla.admin.user, which is admin), the administrator password (joomla.admin.pass), the storefront and admin URLs, and the database credentials.

To verify the administrator login from the VM's own shell, run the following command. It reads the per-VM password, fetches a CSRF token, posts a real administrator sign-in, and confirms that the Joomla control panel is reached:

PASS=$(sudo grep '^joomla.admin.pass=' /root/virtuemart-credentials.txt | cut -d= -f2-) ok=0 for i in $(seq 1 8); do
CJ=$(mktemp)
curl -s -c "$CJ" -b "$CJ" http://127.0.0.1/administrator/ -o /tmp/vm-login.html
TOKEN=$(grep -oE 'name="[0-9a-f]{32}" value="1"' /tmp/vm-login.html | grep -oE '[0-9a-f]{32}' | head -1)
curl -s -c "$CJ" -b "$CJ" --data-urlencode username=admin --data-urlencode passwd="$PASS" \
  --data-urlencode option=com_login --data-urlencode task=login --data-urlencode "${TOKEN}=1" \
  -o /dev/null http://127.0.0.1/administrator/index.php
curl -s -L -b "$CJ" http://127.0.0.1/administrator/index.php -o /tmp/vm-verify.html if grep -qiE 'logout|com_cpanel' /tmp/vm-verify.html; then ok=1; rm -f "$CJ"; break; fi rm -f "$CJ"; sleep 2 done rm -f /tmp/vm-login.html /tmp/vm-verify.html [ "$ok" = 1 ] && echo 'admin login -> OK' || { echo 'admin login -> FAILED'; exit 1; }

The expected output is admin login -> OK.

Step 6 - Sign in to the storefront and admin panel

Browse to http://<vm-public-ip>/ for the storefront and to http://<vm-public-ip>/administrator/ for the Joomla administrator panel. Sign in as admin with the password from the credentials file.

VirtueMart serves on whatever address you use to reach the VM, so stopping and starting the VM or attaching a custom domain needs no reconfiguration.

Step 7 - Manage your shop

In the administrator, open Components > VirtueMart to reach the VirtueMart control panel. From there you manage Products, Categories, Orders & Shoppers, Manufacturers, Shop (your vendor and store details and currency) and Configuration.

The image ships with a sample catalogue and a Shop menu item, so you can explore a working store immediately. When you are ready, clear the sample products and add your own from Products > New. Build your storefront navigation with Categories, and set your shop currency, payment methods and shipping methods under Shop and Configuration.

Step 8 - Confirm the versions and the sample catalogue

grep -oE 'MAJOR_VERSION[^;]+|MINOR_VERSION[^;]+|PATCH_VERSION[^;]+' /var/www/joomla/libraries/src/Version.php | tr '\n' ' '; echo
sudo mariadb -N -B joomla -e "SELECT CONCAT('VirtueMart ', JSON_UNQUOTE(JSON_EXTRACT(manifest_cache,'\$.version'))) FROM jos_extensions WHERE element='com_virtuemart' AND type='component';"
sudo mariadb -N -B joomla -e "SELECT CONCAT('published products: ', COUNT(*)) FROM jos_virtuemart_products WHERE published=1;"

The expected output is Joomla major version 5, the VirtueMart 4.6.4 component, and the count of published sample products.

First-boot service and security model

A one-shot virtuemart-firstboot.service runs After=mariadb.service and Before=multi-user.target, so the per-VM credentials are rotated before the store is first reachable. The service rewrites the database password in Joomla's configuration.php and resets the Joomla admin account password. It then writes the credentials file at mode 0600 (root only) and creates a sentinel so that it runs exactly once.

systemctl status virtuemart-firstboot.service --no-pager | head -6 sudo stat -c '%a %U:%G %n' /root/virtuemart-credentials.txt

Both seeded accounts are rotated at first boot. The Joomla super-user admin and the MariaDB joomla application user each get a fresh per-VM password. MariaDB root authenticates through the local unix socket with no password.

The database binds to 127.0.0.1 only. The storefront HTTP check confirms that the shop is serving the sample catalogue.

Enabling HTTPS with your own domain

The image serves HTTP on :80. For production, point a real domain at the VM's public IP and open 443/tcp in the NSG. Then install a trusted certificate with Let's Encrypt, replacing the domain in the command:

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-apache
sudo certbot --apache -d your-domain.com

Certbot configures the Apache virtual host for HTTPS and sets up automatic renewal. Joomla derives its links from the request host, so no further reconfiguration is needed.

Backup and maintenance

For a point-in-time backup, snapshot the VM's disk in Azure. Alternatively, dump the database. The database password is in the credentials file:

sudo mariadb-dump joomla > virtuemart-backup.sql

Keep the OS patched with sudo apt update && sudo apt upgrade. Unattended security upgrades are enabled by default. To restart the stack, run sudo systemctl restart apache2 mariadb.

The Joomla task scheduler runs hourly from virtuemart-cron.timer. To run it on demand, use sudo -u www-data php /var/www/joomla/cli/joomla.php scheduler:run.

Support

This image comes with 24/7 SecureAnyCloud support. Contact us by email and chat for help with VirtueMart and Joomla deployment, upgrades, product and category management, payment and shipping method configuration, custom domains and TLS, extension installation, performance tuning and database administration.

All product and company names are trademarks or registered trademarks of their respective holders. Their use does not imply any affiliation with or endorsement by them. VirtueMart and Joomla are distributed under the GNU General Public License. SecureAnyCloud packages and supports this independent image.

Deploy on Azure

Launch VirtueMart 4.6 on Joomla 5 on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure