Running DarkLight as a Docker Container in CentOS

Dockerizing DarkLight Server and using Docker Compose to instantiate a DarkLight instance provides a much smoother and quicker deployment than the traditional installation method. Each time DarkLight is run it essentially downloads and builds the latest version.


You should do the following procedure as a user that has sudo permissions. Don't login as root (why not?)

Firewall should allow the following ports:

  • 41617/tcp Connection between client/server (Active MQ)
  • 49143/tcp Connection between client/server
  • 8282/tcp "P2" update server so the server can update the client version
  • 2222/tcp (optional - configurable) SSH Connection into the Server to send commands (requires change to ini file)

These ports are all between the client and the server so you could additionally only open these ports to the IP addresses your clients are running on. The server will also attempt to reach out to the internet to check with DarkLight's servers for updates.

Opening a port

sudo firewall-cmd --permanent --zone=public --add-port=41617/tcp
sudo firewall-cmd --permanent --zone=public --add-port=49143/tcp
sudo firewall-cmd --permanent --zone=public --add-port=8282/tcp
sudo firewall-cmd --permanent --zone=public --add-port=2222/tcp


sudo systemctl restart network
sudo systemctl restart firewalld


Set up the Repository

sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo

Install the latest Docker Engine

sudo yum install docker-ce docker-ce-cli

Start Docker

sudo systemctl start docker

Test Docker

sudo docker run hello-world


Download the current release

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Change permissions

sudo chmod +x /usr/local/bin/docker-compose

Test Docker Compose

docker-compose --version

Create a directory where DarkLight will live

This should probably be in your user space with your documents where you have the most disk space. We are also assuming that you are not logged in as the root account (always a bad idea).

cd ~
mkdir darklight
cd darklight

Download the Compose Directory

curl -O

(local download option) Download

Unzip the compose file and move to the folder

unzip ./ 

Don't have unzip? Install it with sudo yum install unzip

cd compose

Copy the DarkLight certs to Docker

There are two DarkLight repositories, one on each side of the US. Choose the one closest to you for the best transfer speeds.

sudo mkdir -p /etc/docker/certs.d/


sudo mkdir -p /etc/docker/certs.d/

sudo cp darklight-docker.crt /etc/docker/certs.d/


sudo cp darklight-docker.crt /etc/docker/certs.d/

Restart the Docker service

sudo systemctl restart docker

Login to the registry

You will need credentials from

sudo docker login


sudo docker login

Pull the latest version of DarkLight

sudo docker pull


sudo docker pull

Set settings specific to your server

Edit docker-compose.yml

Change every reference of "FQDN" to your fully-qualified domain name

  • hostname
  • alias

Save the .yml file

How to do this in vi:

  1. Open in vi vi docker-compose.yml
  2. Search/Replace FQDN :%s/FQDN/
    1. (If using darklight-west) :%s/-east/-west/
  3. Save and Exit ZZ

Add a DarkLight license file

If you don't have a darklight.lic file, please contact

Copy your darklight.lic file to the compose directory

curl -u username -O
  • Start DarkLight
    docker-compose up -d
  • Login to the OSGi SSH console (setup details are below)
    ssh username@<FQDN> -p 2222
  • Login to the container
    docker exec -it darklight bash
  • Follow the logs
    docker logs --follow darklight
  • Stop DarkLight: Login to the OSGi console and type shutdown
  • OSGi SSH Setup Instructions
  • Configuring Client Authentication
  • Connecting a Client to a Server
  • start/docker
  • Last modified: 2019/09/11 23:00