Multi-node Docker deployments

This article provides a sample approach that you can follow to setup the database and other infrastructure of your choice.


  • For production deployments, it is advised that you use Kubernetes to orchestrate the deployment of the applications. Docker compose is not ideal for production setup. Proceed at your own risk.
  • For HA setup to work, you need to mount a license file or provide an environment variable XL_LICENSE with a license text converted to base64 for the Deploy instances. The folders you mount needs to be owned by user 10001, for example, you can run sudo chown -R 10001 xl-deploy-master if you want to mount directories under $PWD/xl-deploy-master folder.


The setup includes

  • A load balancer with HaProxy
  • RabbitMQ single node setup
  • PostgreSQL database single node setup
  • Deploy master nodes
  • Deploy worker nodes


  • The database setup is for demo purposes, use your own setup or use an external database
  • The MQ setup is for demo purposes, use your own setup or use an external MQ
  • The HAproxy setup is for demo purposes, use your own setup


The production setup for Deploy as mentioned here can be performed using Docker compose as described in the steps below. Follow the steps to deploy the sample:

  1. Create a directory “xl-deploy-ha” and download the docker-compose-xld-ha.yaml and docker-compose-xld-ha-workers.yaml files.
  2. Create a directory rabbitmq in “xl-deploy-ha” directory and download the enabled_plugins.
  3. To set up using automated scripts, use the and scripts. For manual setup, follow the steps described below. Note: Change the passwords as required whether you run automated scripts, or perform manual setup.
  4. To shut down and clean the Docker container, run the script.
# Set passwords
export XLD_ADMIN_PASS=admin
export RABBITMQ_PASS=admin
export POSTGRES_PASS=admin

# Create Docker network
docker network create xld-network

# deploy master nodes, load balancer, mq and database.
docker-compose -f docker-compose-xld-ha.yaml up --scale xl-deploy-master=3 -d

# get the IP of master nodes, change the container names if you are not inside a folder named "xl-deploy-ha"
export XLD_MASTER_1=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' xl-deploy-ha_xl-deploy-master_1)
export XLD_MASTER_2=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' xl-deploy-ha_xl-deploy-master_2)
export XLD_MASTER_3=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' xl-deploy-ha_xl-deploy-master_3)
export XLD_LB=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' xl-deploy-lb)

# Deploy the worker nodes (if required, you can change the number of nodes here)
docker-compose -f docker-compose-xld-ha-workers.yaml up --scale xl-deploy-worker=3 -d

# Print the status
docker-compose -f docker-compose-xld-ha.yaml -f docker-compose-xld-ha-workers.yaml ps
  1. To view the logs of individual containers, run the docker logs <container_name> -f command.
  2. To access Deploy UI, go to http://localhost:8080.
  3. To shut down the setup, run:
# Shutdown deployments
docker-compose -f docker-compose-xld-ha.yaml -f docker-compose-xld-ha-workers.yaml down
# Remove network
docker network rm xld-network

Upgrading multi-node deployments

For more information about upgrading a multi-node Deploy using Docker Compose, see Multi-node docker deployments