Installing Liferay DXP in Amazon Web Services
You can run Liferay DXP on AWS using a new or an existing EKS cluster; a plain installation or Liferay’s offering on AWS Marketplace. Either installation requires several tools, including Helm, Terraform, and AWS CLI.
Using Liferay DXP in AWS uses a special Helm chart. See Provisioning Liferay in Kubernetes for more information.
Prerequisites
-
Install Git CLI.
-
Install AWS CLI.
-
Configure AWS CLI to use your IAM credentials.
-
Install the Terraform CLI.
-
Install the Helm CLI.
-
Install the kubectl CLI.
-
Install the Oras CLI (plain installation only).
Log into AWS
First, use the CLI to log into AWS.
-
Export your profile to use for the AWS SDK and its tools:
export AWS_PROFILE=[profile name]
-
Log into AWS.
aws sso login
Clone the Terraform Files
Next, clone the terraform files from the repository:
git clone -n --depth=1 --filter=tree:0 https://github.com/liferay/liferay-portal.git liferay-aws-terraform
cd liferay-aws-terraform
git sparse-checkout set --no-cone /cloud/terraform/aws
git checkout
cd cloud/terraform/aws
Now you have all the files necessary to interface with an EKS cluster. Next, you can
Create a New EKS Cluster
Use the Terraform CLI to create a new EKS cluster complete with a VPC and networking:
-
From your terminal’s working directory after the previous step (
liferay-aws-terraform/cloud/terraform/aws/
), navigate to theeks/
directory. -
Edit
terraform.tfvars
to configure your cluster’s infrastructure as needed. See the variables invariables.tf
for reference.NoteBy default, the system deploys an EKS cluster in the US West (Oregon) region (
us-west-2
), spanning two availability zones. -
Run these Terraform commands:
terraform init
terraform apply
-
Follow the prompt to apply your changes.
-
Write the result of the
terraform output
command to theterraform.tfvars
file in thedependencies/
directory (inliferay-aws-terraform/cloud/terraform/aws/
):terraform output > ../dependencies/terraform.tfvars
Use an Existing EKS Cluster
Create dependent services to use with your EKS cluster:
-
From your terminal’s working directory (
liferay-aws-terraform/cloud/terraform/aws/
), navigate to thedependencies/
directory. -
Edit
terraform.tfvars
to configure your cluster’s infrastructure as needed. See the variables invariables.tf
for reference. -
Run these Terraform commands:
terraform init
terraform apply
-
Follow the prompt to apply your changes.
Configure Kubernetes for Helm
To use Helm, you must use the AWS CLI to update your Kubernetes configuration.
-
Navigate to the
dependencies/
directory (inliferay-aws-terraform/cloud/terraform/aws/
). -
Run this command:
aws eks update-kubeconfig \ --name $(terraform output -raw cluster_name) \ --region $(terraform output -raw region)
-
Test this command to confirm that it works:
kubectl cluster-info
Install the Nginx Ingress Controller
Install the Nginx Ingress Controller to expose the Liferay DXP instance to the internet:
helm upgrade nginx-ingress-controller \
oci://registry-1.docker.io/bitnamicharts/nginx-ingress-controller \
--create-namespace \
--install \
--namespace nginx-ingress-controller \
--version 11.6.8
Launch Liferay with Helm
Next, use helm
to launch Liferay. Liferay uses different helm charts for the plain and AWS Marketplace installations.
Installing the Liferay AWS Marketplace Helm Chart
-
Go to Liferay DXP’s offering on AWS Marketplace.
-
On the Launch this software page, find the Launch instructions section and copy the commands listed under Step 2: Launch the software.
You can ignore step 1.
-
In the commands you copied, add these arguments to the
helm install
command:--set "liferay-aws.liferay-default.ingress.className=nginx" \ --set "liferay-aws.liferay-default.ingress.enabled=true" \ --set "liferay-aws.liferay-default.ingress.rules[0].http.paths[0].backend.service.name=liferay-default" \ --set "liferay-aws.liferay-default.ingress.rules[0].http.paths[0].backend.service.port.name=http" \ --set "liferay-aws.liferay-default.ingress.rules[0].http.paths[0].path=/" \ --set "liferay-aws.liferay-default.ingress.rules[0].http.paths[0].pathType=ImplementationSpecific" \ --set "liferay-aws.liferay-default.serviceAccount.annotations.eks\.amazonaws\.com/role-arn=$(terraform output -raw liferay_sa_role)" \
-
Execute the commands you copied, including the modified
helm install
command.The command installs Liferay DXP with Liferay’s official AWS Marketplace Helm chart, but it takes some time to complete.
-
Run this command to watch for your Liferay DXP installation to complete:
kubectl get statefulset liferay-default \ --namespace liferay-system \ --watch
-
Wait for the installation to complete to proceed.
Installing the Plain Liferay AWS Helm Chart
-
In the
dependencies/
directory (inliferay-aws-terraform/cloud/terraform/aws/
), create aaws-helm-values.yaml
file with the following content:liferay-default: customEnv: x-slim-os: - name: LIFERAY_NETWORK_HOST_ADDRESSES value: https://$(OPENSEARCH_ENDPOINT):443 - name: LIFERAY_OPENSEARCH_PASSWORD value: $(OPENSEARCH_PASSWORD) - name: LIFERAY_OPENSEARCH_ENABLED value: "true" customVolumeMounts: x-slim-os: - mountPath: /tmp name: liferay-persistent-volume subPath: system/tmp - mountPath: /opt/liferay/elasticsearch-sidecar name: liferay-persistent-volume subPath: system/es-sidecar ingress: className: nginx enabled: true rules: - http: paths: - backend: service: name: liferay-default port: name: http path: / pathType: ImplementationSpecific service: annotations: {} type: ClusterIP
-
Choose from the available versions of the helm chart using the Oras CLI:
oras repo tags us-central1-docker.pkg.dev/liferay-artifact-registry/liferay-helm-chart/liferay-aws
-
Store the selected version in a variable called
LIFERAY_AWS_HELM_CHART_VERSION
:export LIFERAY_AWS_HELM_CHART_VERSION=[version]
-
Install the Liferay AWS helm chart:
helm upgrade liferay oci://us-central1-docker.pkg.dev/liferay-artifact-registry/liferay-helm-chart/liferay-aws \ --create-namespace \ --install \ --namespace $(terraform output -raw deployment_namespace) \ --set "liferay-default.image.tag=2025.q2.0-slim" \ --set "liferay-aws.liferay-default.serviceAccount.annotations.eks\.amazonaws\.com/role-arn=$(terraform output -raw liferay_sa_role)" \ --values aws-helm-values.yaml \ --version ${LIFERAY_AWS_HELM_CHART_VERSION}
ImportantYou must use a slim Liferay Docker image. For more information on Liferay image types, see Docker Image Versions
-
Run this command to watch for your Liferay DXP installation to complete:
kubectl get statefulset liferay-default \ --namespace liferay-system \ --watch
Wait for the installation to complete to proceed.
Log Into Your Live Instance
Now Liferay DXP is ready in your EKS cluster, but you must retrieve your credentials to access it.
-
Extract your Liferay installation’s public DNS with this command:
kubectl get svc nginx-ingress-controller \ --namespace nginx-ingress-controller \ --output jsonpath='{.status.loadBalancer.ingress[0].hostname}'
The command returns the address you can use to access your installation.
-
In your web browser, paste the address you retrieved from the previous step with
https://
in front, like this:https://[NUMBER].[REGION].elb.amazonaws.com
Once it finishes loading, a page appears with a Sign In button.
-
Run this command to retrieve your administrator password:
kubectl get secret liferay-default \ --namespace liferay-system \ --output jsonpath='{.data.LIFERAY_DEFAULT_PERIOD_ADMIN_PERIOD_PASSWORD}' \ | base64 -d
-
Log in using
test@liferay.com
as the email and the password you retrieved from the previous step.
Congratulations! You now have access to your own Liferay DXP installation from AWS marketplace.