Legacy Knowledge Base
Published Sep. 10, 2025

Setting Up the Liferay Platform on AWS EC2

Written By

Christopher Lui

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

This article is a guide to help users set up, install and cluster Liferay DXP 7.0 or 7.1 on AWS Elastic Compute Cloud (EC2). 

Resolution

EC2 Instance Set Up

There are 2 kinds of EC2 instances: (1) EC2-classic and (2) EC2-VPC. Please refer to Amazon's documentation for more detailed information: Differences Between EC2-Classic and EC2-VPC

Each EC2 instance needs to be accessible to the other. If a domain name is available for each node, it is better to assign elastic IP address. By default, the public address of the server is dynamicmeaning a new address is assigned when the server is restartedwhereas elastic IP addresses are not dynamic.

When launching a server, make sure the right protocol and ports are enabled as you define the Security Group. You can also edit existing security groups if you need to change or add rules. 

Make EC2 Server Available to Internet

By default, EC2-VPC is not available to the internet. To make it available to the internet, you need to create an internet gateway for the VPC and associate the gateway to the route table. You can do this via the VPC Management Console under the Networking section. 

Portal Installation

You can install the Liferay platform either by using our bundles or by manually installing it on an existing application server. Since this task is not much different from setting up the Liferay platform on a local server, you may simply follow our official documentation for getting your installation started. 

Depending on your operating system’s security settings and firewall, you may need to allow the appropriate traffic as well. 

Clustering Liferay DXP on EC2

EC2 only supports Unicast at this time. And while Amazon has a Multicast proof of concept via IP_GRE, it has not been tested with the Liferay platform and is not supported by Liferay Support. To configure the Liferay platform's Ehcache for Unicast, you will need to customize the tcp.xml that comes with our implementation of JGroups. Below are quick guides for doing this:

You'll also need to make sure to configure the EC2 Security Group to allow JGroups traffic. If you find that you have correctly setup the Liferay platform and JGroups clustering, but Liferay platform's clustering still isn't working and there are no errors thrown, it is likely because the EC2 Security Groups are not allowing the appropriate traffic.

Please see the Additional Info below to read the Amazon EC2 Security Group documentation. 

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base