Applications Azure

OpenMage LTS on Ubuntu 24.04 on Azure User Guide

| Product: OpenMage LTS on Ubuntu 24.04 LTS on Azure

Overview

OpenMage LTS is the community maintained long term support fork of Magento Open Source (Magento 1.9 Community Edition) — a full featured open source ecommerce platform. It provides a product catalog, shopping cart and checkout, order and customer management, CMS pages and blocks, promotions and price rules, multi store and multi currency support, and a complete administration backend. The cloudimg image delivers OpenMage fully installed and configured on Ubuntu 24.04 — served by Apache over HTTPS with PHP 8.3 (mod_php and OPcache), backed by MySQL 8.0. The application is already installed and the database schema built, so the storefront and admin answer the moment the instance boots, with no setup wizard to complete. Backed by 24/7 cloudimg support.

What is included:

  • OpenMage LTS 20.18.0 (OSL-3.0 / AFL-3.0 licensed), installed to /var/www/openmage
  • Apache 2.4 (TLS on :443, with :80 redirected to HTTPS) + PHP 8.3 (mod_php with OPcache) + MySQL 8.0, all from Ubuntu 24.04 main
  • A per-VM self-signed TLS certificate generated on first boot, so the storefront and admin load over a secure context
  • A systemd timer (openmage-cron.timer) that runs OpenMage's scheduled jobs (cron.php) every minute
  • Per-VM administrator password, MySQL password, encryption (crypt) key and a randomised admin path, all generated at first boot and written to a root-only file — the image ships no known credential
  • apache2.service, mysql.service and openmage-cron.timer as systemd units, enabled and active
  • 24/7 cloudimg support

OpenMage 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 more traffic, larger catalogs or heavier extensions. NSG inbound: allow 22/tcp from your management network and 443/tcp (HTTPS) plus 80/tcp (which redirects to HTTPS) from your shoppers.

Step 1 — Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for OpenMage 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 HTTPS (443). Then Review + create and Create.

Step 2 — Deploy from the Azure CLI

az vm create \
  --resource-group <your-rg> \
  --name openmage \
  --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 openmage --port 443 --priority 1010

Step 3 — Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 — Confirm the services are running

The three services that back OpenMage should all report active, and the storefront answers over HTTPS while the plain HTTP port redirects to it. Because OpenMage serves the store on the address configured at first boot, the local check below pins that address to the loopback interface:

systemctl is-active apache2 mysql openmage-cron.timer
BASE=$(sudo grep '^openmage.url=' /root/openmage-credentials.txt | cut -d= -f2-)
HOST=$(printf '%s' "$BASE" | sed -E 's#https?://##; s#/.*##')
curl -ks -o /dev/null -w 'storefront https -> %{http_code}\n' --resolve "$HOST:443:127.0.0.1" "https://$HOST/"
curl -s  -o /dev/null -w 'http redirect  -> %{http_code}\n' http://127.0.0.1/

Expected: three lines of active, then storefront https -> 200 and http redirect -> 301.

Service status and HTTPS storefront

Step 5 — Retrieve your administrator credentials

On the first boot of every VM, a one-shot service (openmage-firstboot.service) generates values that are unique to that VM: a fresh administrator password, a fresh MySQL password, a fresh encryption (crypt) key, and a randomised admin path so the admin panel is not at the well-known /admin. It also generates a per-VM self-signed TLS certificate and sets the VM's own address as the store base URL. No shared or default credentials ship in the image.

sudo cat /root/openmage-credentials.txt

The file (mode 0600, root only) contains the administrator username (openmage.admin.user, which is admin), the administrator password (openmage.admin.pass), the randomised admin path (openmage.admin.path), the full admin URL (openmage.admin.url), the storefront URL, and the database credentials.

Per-VM credentials file with passwords masked

The image is secure by default: a blank, guessed or default password is rejected, while the per-VM administrator from the credentials file authenticates successfully. You can prove both from the VM's own shell using OpenMage's own authentication check (the exact check the admin login runs):

P=$(sudo grep '^openmage.admin.pass=' /root/openmage-credentials.txt | cut -d= -f2-)
sudo -u www-data env OM_PW="$P" php -r 'require "/var/www/openmage/app/Mage.php"; Mage::app();
  printf("per-VM admin      -> %s\n", Mage::getModel("admin/user")->authenticate("admin",getenv("OM_PW"))?"ACCEPTED":"REJECTED");
  printf("default password  -> %s\n", Mage::getModel("admin/user")->authenticate("admin","admin123")?"ACCEPTED":"REJECTED");
  printf("blank password    -> %s\n", Mage::getModel("admin/user")->authenticate("admin","")?"ACCEPTED":"REJECTED");'

Expected: per-VM admin -> ACCEPTED, default password -> REJECTED, blank password -> REJECTED.

Default and blank passwords rejected while the per-VM administrator is accepted

Step 6 — Open the storefront

Browse to https://<vm-public-ip>/ to see your store. Because the image ships a per-VM self-signed certificate, your browser shows a one-time certificate warning on first visit — click through it, or install your own domain certificate into /etc/apache2/ssl/. The default catalog is empty and ready for your own products, categories and CMS content.

OpenMage storefront home page

Step 7 — Sign in to the admin panel

The admin panel is at the randomised admin URL from the credentials file (openmage.admin.url), for example https://<vm-public-ip>/index.php/cloudimg-admin-xxxxxx/. Sign in with the administrator username (admin) and the password from the credentials file.

OpenMage admin sign-in page

After signing in you land on the admin dashboard, from which you manage your catalog (products and categories), sales (orders, invoices, shipments), customers, promotions, CMS pages and store configuration.

OpenMage admin dashboard

Step 8 — Confirm the version and the stack

sudo -u www-data php -r 'require "/var/www/openmage/app/Mage.php"; echo "OpenMage ".Mage::getOpenMageVersion()."\n";'
php -r 'echo "PHP ".PHP_VERSION."\n";'
mysql --version
echo "first-boot service: $(systemctl is-active openmage-firstboot.service)"

Expected: OpenMage 20.18.0, PHP 8.3.x, MySQL 8.0.x, and the first-boot service active.

Version, stack and first-boot service

First-boot service and security model

A one-shot openmage-firstboot.service runs After=mysql.service and Before=apache2.service, so the per-VM credentials, keys and TLS certificate are in place before the first page is ever served. It rotates the MySQL password in lock-step with OpenMage's stored database configuration (app/etc/local.xml), regenerates the encryption (crypt) key, randomises the admin path, rotates the administrator password, sets the store base URL from the VM's own address, and writes the credentials file at mode 0600 (root only) before dropping a sentinel so it runs exactly once.

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

Administration from the CLI

OpenMage ships maintenance scripts under /var/www/openmage/shell, run as the www-data user. For example, to show the status of the catalog indexers:

sudo -u www-data php /var/www/openmage/shell/indexer.php --status

Scheduled jobs — index refresh, newsletter queue, log cleanup — run through openmage-cron.timer, which invokes php /var/www/openmage/cron.php every minute, so leave that timer enabled. After a configuration change you can clear the cache by removing the cache directory:

sudo -u www-data rm -rf /var/www/openmage/var/cache/*

Enabling HTTPS with your own domain

The image already serves HTTPS with a per-VM self-signed certificate. For production, point a real domain at the VM's public IP, open 443/tcp in the NSG, then replace the self-signed certificate with a trusted one using 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

After the certificate is issued, set your domain as the store base URL so OpenMage generates correct absolute links, then clear the cache:

sudo mysql openmage -e "UPDATE core_config_data SET value='https://your-domain.com/' WHERE path IN ('web/unsecure/base_url','web/secure/base_url');"
sudo -u www-data rm -rf /var/www/openmage/var/cache/*

Backup and maintenance

The database lives in MySQL and the application tree, including uploaded media, under /var/www/openmage — snapshot the OS disk in Azure for a point-in-time backup, or dump the database with (the database password is in the credentials file):

sudo mysqldump openmage > openmage-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 mysql openmage-cron.timer.

Support

This image is backed by 24/7 cloudimg support. Contact us by email and chat for help with OpenMage deployment, upgrades, theme and template development, extension installation, catalog and order management, payment and shipping configuration, performance tuning, indexing and caching, 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.