E-commerce Azure

VirtueMart on Joomla on Ubuntu 24.04 on Azure User Guide

| Product: VirtueMart 4.6 on Joomla 5 on Ubuntu 24.04 LTS on Azure

Overview

VirtueMart is a mature, free and open source e-commerce solution that runs as a component inside the Joomla content management system. It gives you 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 — all wrapped in the full Joomla CMS for content pages, menus, media and multilingual sites, managed from one administrator panel. The cloudimg image delivers VirtueMart 4.6 on Joomla 5 fully installed and configured on Ubuntu 24.04: a classic LAMP stack of Apache with mod_php 8.3 and MariaDB, with VirtueMart's own sample catalogue preloaded so the storefront renders a real shop from the first boot. Backed by 24/7 cloudimg support.

What is included:

  • 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 + 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 it and add your own products when ready
  • Per-VM Joomla administrator password and MariaDB password, generated at first boot and written to a root-only file — no shared or default credential ships
  • apache2.service and mariadb.service as systemd units, enabled and active; the Joomla task scheduler runs hourly from virtuemart-cron.timer
  • 24/7 cloudimg support

VirtueMart storefront

Prerequisites

An active Azure subscription, an SSH key pair, and a VNet + 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. NSG inbound: allow 22/tcp from your management network and 80/tcp (HTTP) — plus 443/tcp if you enable HTTPS — 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 cloudimg, and select Create. On Basics 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). Then Review + createCreate.

Step 2 — Deploy from the Azure CLI

az vm create \
  --resource-group <your-rg> \
  --name virtuemart \
  --image <marketplace-image-urn> \
  --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

Apache and MariaDB should both report active, the storefront answers HTTP 200, and 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/

Expected: two lines of active, then 200 for the storefront and shop, and 200 for the administrator page.

Appliance services and first-boot sentinel

Step 5 — Retrieve your administrator credentials

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

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.

Per-VM credentials file

You can prove the admin login round-trip from the VM's own shell — this reads the per-VM password, fetches a CSRF token, posts a real administrator sign-in, and confirms 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; }

Expected: admin login -> OK.

Step 6 — Sign in to the storefront and admin panel

Browse to http://<vm-public-ip>/ for the storefront and http://<vm-public-ip>/administrator/ for the Joomla administrator, and sign in as admin with the password from the credentials file. VirtueMart serves on whatever address you reach the VM on, so stopping and starting the VM or attaching a custom domain needs no reconfiguration.

VirtueMart storefront with the sample catalogue

Joomla administrator sign-in

Step 7 — Manage your shop

From the administrator, open Components → VirtueMart for the VirtueMart control panel. From there you manage Products, Categories, Orders & Shoppers, Manufacturers, Shop (your vendor/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 and shipping methods under Shop and Configuration.

VirtueMart control panel

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;"

Expected: Joomla major version 5, the VirtueMart 4.6.4 component, and the count of published sample products.

Joomla + VirtueMart versions and stack

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. It rewrites the database password in Joomla's configuration.php, resets the Joomla admin account password, writes the credentials file at mode 0600 (root only), and drops a sentinel so 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 ship rotated: the Joomla super-user admin and the MariaDB joomla application user each get a fresh per-VM password at first boot, and MariaDB root authenticates via the local unix socket with no password. The database binds to 127.0.0.1 only, and the storefront HTTP proof below confirms the shop is serving the sample catalogue.

Storefront, shop and administrator over HTTP

Enabling HTTPS with your own domain

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

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 required.

Backup and maintenance

Snapshot the VM's disk in Azure for a point-in-time backup, or 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). The stack restarts cleanly with sudo systemctl restart apache2 mariadb. The Joomla task scheduler runs hourly from virtuemart-cron.timer; you can run it on demand with sudo -u www-data php /var/www/joomla/cli/joomla.php scheduler:run.

Support

This image is backed by 24/7 cloudimg 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. Use of them does not imply any affiliation with or endorsement by them. VirtueMart and Joomla are distributed under the GNU General Public License; this independent image is packaged and supported by cloudimg.