Custom Domains and TLS

Setting up a custom domain for Monolith requires just a couple of item and steps:

  1. Setup the domain that you want to use.

  2. Create SSL certificates with any necessary intermediate certs that are required for the domain.

  3. Add those SSL certificates to your Monolith deployment.

    1. Update the docker-compose.yml file

    2. Copy the SSL certs to your Monolith deployment folder.

Setting up a Custom Domain

This process will be different for everyone, but usually your IT department can establish a specific Domain for you to use to access your Monolith deployment in a web browser.

This is helpful because it allows you to use domain resolution in your browser instead of a plain IP address that points at your Monolith server.

This also lets you setup SSL that can be verified by your browser and create secure and encrypted web traffic between your Monolith users and the Monolith server.

Generating SSL certificates

Again, this process varies, but you will need to generate two SSL certificates that are associated with your custom domain. These certificate file comprise of a certificate file and a key file.

This is also a process that your IT department can help you with.

Update your docker-compose.yml

Before we can use the new SSL certificates, we need to update our Monolith deployment config so that it will override the built in self-signed certificates that Monolith uses by default.

Under the "nginx" block of the docker-compose.yml file, add the following line under "volumes":

./data/nginx/certs:/etc/nginx/certs

The entire "nginx" block should look like this:

  nginx:
    container_name: nginx
    image: monolithforensics/nginx:latest
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./data/logs/nginx:/var/log/nginx/
      - ./data/nginx/certs:/etc/nginx/certs

Rename the SSL certificates

When using custom SSL certs, Monolith is looking for certificates with specific names - rename your SSL certs to the following file names:

// Cert file
default_monolith.crt

// Key File
default_monolith.key

Copy SSL certs to Monolith Deployment Folder

Copy the SSL certs to "data" folder within your Monolith deployment, the final cert locations should look like this:

// Some code
{monolith-deployment-folder}/data/nginx/certs/default_monolith.crt
{monolith-deployment-folder}/data/nginx/certs/default_monolith.key

Re-deploy the Monolith Server

In order for Monolith to start using the new certs, we need to redeploy/restart the Monolith server so that it will indest the cert files.

Open a terminal or command prompt in the location of the docker-compose.yml file.

Enter the following commands, in order, to re-deploy and restart the Monolith server:

// shut down current deployment
docker compose down

// wait for process to complete

// Restart Monolith deployment
docker compose up -d

Conclusion

Now, Monolith will start using these certs and your custom domain to create a secure and encrypted connection between the server and your clients systems; both in the web browser and the Monolith desktop client.

Last updated