Installing on Liferay Self-Hosted (Docker)
Liferay and PostgreSQL run in containers, and the forum’s microservice runs in a third container that shares Liferay’s network, so Liferay reaches it at localhost:58081 as on a server. You copy the forum’s zips into the running Liferay container, in the same order as on a server. These steps were tested with the liferay/dxp:2026.q1.4-lts image.
You need Docker. Run the commands from a folder that holds the release’s three zips, downloaded from the latest release.
- Step 1: Add the Liferay Fixes
- Step 2: Start PostgreSQL and Liferay
- Step 3: Deploy the Batch
- Step 4: Deploy the Microservice’s Zip
- Step 5: Start the Microservice
- Step 6: Set Up Email Notifications
- Step 7: Create the Forum Sites
- Day to Day
- Related Information
Step 1: Add the Liferay Fixes
Create a folder named patching next to the zips, and put the hotfix from Liferay Support in it. Liferay installs it each time its container starts. Without a hotfix, leave the folder empty, and use the workarounds.
Step 2: Start PostgreSQL and Liferay
-
Create a network for the containers, and start PostgreSQL. Replace
change-mewith a password of your own, here and in the next command:docker network create forums docker run -d --name forums-postgres --network forums --restart unless-stopped \ -e POSTGRES_DB=lportal -e POSTGRES_USER=liferay -e POSTGRES_PASSWORD=change-me \ -v forums-postgres-data:/var/lib/postgresql/data \ postgres:16.15 -
Start Liferay. The
forums-liferay-routesvolume holds the credentials Liferay writes for the microservice:docker run -d --name forums-liferay --network forums -p 8080:8080 --restart unless-stopped \ -e LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_DRIVER_UPPERCASEC_LASS_UPPERCASEN_AME=org.postgresql.Driver \ -e LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_URL=jdbc:postgresql://forums-postgres:5432/lportal \ -e LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_USERNAME=liferay \ -e LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_PASSWORD=change-me \ -v forums-liferay-data:/opt/liferay/data \ -v forums-liferay-routes:/opt/liferay/routes \ -v "$PWD/patching:/mnt/liferay/patching" \ liferay/dxp:2026.q1.4-lts -
Wait until Liferay has started:
docker logs forums-liferayshowsServer startup in. This takes a few minutes. Liferay is then athttp://localhost:8080.
Step 3: Deploy the Batch
-
Copy the batch into the running container:
docker cp liferay-forums-batch.zip forums-liferay:/opt/liferay/osgi/client-extensions/ -
Follow the log, and wait until it shows five lines containing
Finished batch engine import taskafter the copy, then press Ctrl+C:docker logs -f --since 2m forums-liferay | grep "Finished batch engine import task"
Liferay also logs a few of these lines while it starts. Only count the ones after the copy, and don’t continue until all five have finished.
Step 4: Deploy the Microservice’s Zip
docker cp liferay-forums-etc-spring-boot.zip forums-liferay:/opt/liferay/osgi/client-extensions/
Wait until docker logs forums-liferay shows STARTED liferayforumsetcspringboot.
Step 5: Start the Microservice
-
Build the microservice’s image from the
Dockerfilein its zip:mkdir microservice unzip liferay-forums-etc-spring-boot.zip -d microservice docker build -t liferay-forums-microservice microservice -
Start it in Liferay’s network, with Liferay’s credentials volume:
docker run -d --name forums-microservice --network container:forums-liferay --restart unless-stopped \ -v forums-liferay-routes:/opt/liferay/routes:ro \ -e LIFERAY_ROUTES_CLIENT_EXTENSION=/opt/liferay/routes/default/liferay-forums-etc-spring-boot \ -e LIFERAY_ROUTES_DXP=/opt/liferay/routes/default/dxp \ liferay-forums-microservice -
Check that Liferay reaches it. This prints
READY:docker exec forums-liferay curl -s http://localhost:58081/ready
Step 6: Set Up Email Notifications
The batch created two email templates with a placeholder sender address. Set real addresses, then restart the microservice with docker restart forums-microservice, before members get email. See Email Notifications.
Step 7: Create the Forum Sites
Continue with Creating Forum Sites.
Day to Day
- After Liferay’s container restarts, restart the microservice’s container too, since it shares Liferay’s network:
docker restart forums-microservice. -
The zips live in Liferay’s container. If you remove the container and start a new one, for example to change a setting or the image, the new container has none of the forum’s zips. Copy in the batch, then the microservice’s zip, as in Steps 3 and 4. Then remove the microservice’s container and start it again with the
docker runcommand of Step 5: it was tied to the old Liferay container, so restarting it fails.docker rm -f forums-microservice - Logs:
docker logs forums-liferayanddocker logs forums-microservice.