Legacy Knowledge Base
Published Jun. 30, 2025

How to run the Liferay PaaS webserver service locally to test configuration changes

Written By

Michael Wall

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.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

NOTE: Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.

Issue

  • Customers may wish to test Nginx webserver service configuration changes without affecting their Liferay PaaS environments, for example:
    • Testing new or updated .conf files to add additional headers or turn off Gzip.
    • Testing custom scripts.

Environment

  • Liferay PaaS

Resolution

  • The docker images used by the Liferay PaaS platform are available from Docker Hub > Liferay Cloud, meaning the webserver service can be run outside of Liferay PaaS using Docker Desktop or similar tool.
  • The webserver service config folder from the webserver service can be injected into the docker container as follows (sample window command):

     
    docker run -p 80:80 -e LCP_PROJECT_ENVIRONMENT=dev -e LCP_PROJECT_ID=local -e LCP_PROJECT_UID=local -v c:/temp/configs:/lcp-container/configs:ro liferaycloud/nginx:1.24.0-6.1.4
     

  • liferaycloud/nginx:1.24.0-6.1.4 is the service version from the webserver LCP.json file.

  • c:/temp/configs is the webserver service configs folder location to inject in.

  • LCP_PROJECT_ENVIRONMENT=dev determines the Liferay PaaS environment configuration to be used - in this case dev. This will provide the configs, scripts and public folders, with 'dev' on top of 'common' in this example.

Additional Information

  • The files from the configs folder are visible within the container from Docker Desktop > container > files > etc/nginx
  • The traffic will be on port 80 as you won't have the Liferay PaaS Loadbalancer to handle HTTPS.
Did this article resolve your issue ?

Legacy Knowledge Base