Deployment guide

Liferay Portal CE

Overview

Liferay Portal Community Edition is the free, open-source edition of Liferay's enterprise portal and digital experience platform (DXP). You can build websites, intranets and web applications with content management, page building, user and role management, and a large administration Control Panel.

The SecureAnyCloud image gives you your own private Liferay portal, ready to serve sites and content and backed by a bundled local MariaDB database. It installs Liferay Portal CE 7.4.3.132 GA132 from the official Tomcat bundle and runs it as the dedicated liferay system service under OpenJDK 21.

What you get:

  • Liferay Portal CE 7.4.3.132 GA132 installed from the official Liferay Tomcat 9.0.98 bundle and run as the liferay system service under OpenJDK 21
  • A bundled local MariaDB database, initialised at build time so the portal boots ready to use, bound to loopback 127.0.0.1:3306
  • Apache Tomcat bound to 127.0.0.1:8080, fronted by nginx on port 80
  • Port 80 also serving an unauthenticated /healthz endpoint for load balancer probes
  • The MariaDB data directory and the Liferay data/ directory (document library and search indexes), each on a dedicated Azure data disk
  • A unique administrator password, generated on first boot of every VM by rotating Liferay's well-known default login test@liferay.com / test to a per-VM secret. The password is recorded in a root-only file, and the default login is proven rejected before the image is captured, so no VM ships with a known credential
  • mariadb.service, liferay.service and nginx.service as systemd units, enabled and active
  • 24/7 SecureAnyCloud support

SecureAnyCloud is not affiliated with or endorsed by Liferay, Inc. Liferay is a trademark of Liferay, Inc. This image packages the open-source Liferay Portal Community Edition (LGPL-2.1).

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.

Liferay is a memory-hungry Java application. Standard_D4s_v5 (4 vCPU / 16 GiB RAM) is the recommended size for comfortable production use. The smaller Standard_D2s_v4 (2 vCPU / 8 GiB) also runs the portal with a conservative heap.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the portal. Also allow 443/tcp if you add TLS. The bundled MariaDB port 3306 and the Tomcat port 8080 are bound to loopback only and are never exposed.

The portal is served over plain HTTP by default. For production, put your own domain and a trusted certificate in front of it (see the TLS step below).

Step 1 - Deploy from the Azure Marketplace

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

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

Review the two dedicated data disks on the Disks tab, then select Review + create and 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:liferay-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name liferay \
  --image sac1647283583153:liferay-ubuntu-24-04:default:latest \
  --size Standard_D4s_v5 \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Open port 80 to your network:

az vm open-port --resource-group <your-rg> --name liferay --port 80 --priority 900

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

First boot runs a one-time initialisation that starts the portal and generates the per-VM administrator password. It completes in a few minutes.

Liferay's first start is thorough: it starts the OSGi runtime and a bundled search engine. Allow a couple of minutes after the VM is created before the portal answers on port 80.

Step 4 - Confirm the services are running

sudo systemctl is-active mariadb.service liferay.service nginx.service
sudo ss -tlnp | grep -E ':80 |:8080|:3306'

All three services report active. Tomcat (8080) and MariaDB (3306) are bound to 127.0.0.1 only. nginx on port 80 is the single public entry point.

Step 5 - Retrieve your administrator password

First boot writes the unique per-VM administrator credentials to a root-only file. Read it as root:

sudo findmnt /var/lib/mysql
sudo findmnt /var/lib/liferay
sudo cat /root/liferay-credentials.txt

Sign in with the email test@liferay.com and the generated password shown in the file.

Step 6 - Verify the security of the deployment

The image never ships with Liferay's well-known default password. Run this check to confirm three things:

  • The per-VM administrator can sign in and reach the Control Panel.
  • The default test@liferay.com / test login is rejected.
  • The unauthenticated health endpoint answers for load balancer probes.
sudo bash /usr/local/sbin/liferay-cred-roundtrip.sh curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://127.0.0.1/healthz

Step 7 - Confirm where the data lives

The MariaDB data directory and the Liferay data directory each live on a dedicated StandardSSD data disk. The disks are captured into the image, so they are re-provisioned on every VM. Confirm the mounts:

sudo lsblk -o NAME,SIZE,TYPE,MOUNTPOINT df -h /var/lib/mysql /var/lib/liferay

Step 8 - Sign in to the portal

Open http://<vm-public-ip>/ in a browser and select Sign In, or go straight to http://<vm-public-ip>/c/portal/login. Enter the email test@liferay.com and the per-VM password from Step 5.

Step 9 - Manage roles from the Control Panel

Open the Control Panel from the applications menu. Under Roles, manage regular, site, organization, asset library and account roles for fine-grained access control across the portal.

Step 10 - Manage users and organizations

In the Control Panel, open Users and Organizations. Here you create and manage user accounts, screen names, organizations and user groups.

Step 11 - Create and manage web content

Open Content & Data > Web Content. Here you author and manage articles, along with the structures and templates that drive the content on your sites and pages.

Step 12 - Add a domain and TLS for production

The portal is served over plain HTTP on port 80 by default. For production, point a DNS name at the VM. Then either add a certificate to your own reverse proxy or load balancer in front of nginx, or install one directly with Certbot:

sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d portal.example.com

In the Control Panel, open Instance Settings > Virtual Host and set the site's virtual host to your domain. Liferay then generates links with that domain.

Maintenance

  • Services: sudo systemctl restart liferay.service restarts the portal (allow a minute for the OSGi runtime to warm up). sudo systemctl restart mariadb.service restarts the database.
  • Logs: the portal log is at /opt/liferay/tomcat/logs/catalina.out. First-boot activity is in /var/log/liferay-firstboot.log.
  • Database: reach the bundled MariaDB on the VM with sudo mariadb (root over the local socket). It listens on loopback only and is never exposed.
  • Backups: back up the liferay database (for example with mysqldump) and the Liferay data directory at /var/lib/liferay/data, which holds the document library and search indexes.
  • Updates: the OS receives unattended security updates. To upgrade Liferay itself, follow Liferay's own upgrade documentation.

Support

SecureAnyCloud maintains this image and provides 24/7 support. For assistance, contact sales@secureanycloud.com.

SecureAnyCloud is not affiliated with or endorsed by Liferay, Inc. Liferay is a trademark of Liferay, Inc. This image packages the open-source Liferay Portal Community Edition (LGPL-2.1). It is not Liferay DXP or Liferay Enterprise.

Deploy on Azure

Launch Liferay Portal Community Edition 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