Skip to main content

Deploy Colander with Docker Compose

This guide shows how to deploy Colander, or only some of its components, with Docker Compose, using the Colander quick deploy package. The package is the docker folder of the colander-ansible repository.

Colander supports two deployment methods: Docker Compose with this package, and the Ansible playbooks. Choosing how to deploy Colander explains the difference.

Requirements​

Docker and Docker Compose installed on the machine hosting Colander.

Download Colander quick deploy​

Download colander-quick-deploy.zip and extract it:

Download and extract Colander quick deploy
curl -fsSLO https://pts-project.org/colander-ansible/colander-quick-deploy.zip
unzip colander-quick-deploy.zip
cd docker

Run all the following commands from the docker folder.

Bootstrap the configuration​

Most settings have safe defaults, but some secrets are required before the first start. Generate a minimal .env file containing randomly generated secrets:

Bootstrap the .env file
docker compose -f compose-init.yml up -d

To configure more, such as the domain names, the image versions or the volume paths, copy the settings you need from .env.example into your .env file. Every setting of .env.example is commented. See Docker Compose deployment for the main ones.

Start the components you need​

Each component has its own Compose file. Start only the one you need with docker compose -f <file> up -d:

Start Colander only
docker compose -f compose-colander.yml up -d
Start Threatr only
docker compose -f compose-threatr.yml up -d
Start Mandolin only
docker compose -f compose-mandolin.yml up -d
Start CyberChef only
docker compose -f compose-cyberchef.yml up -d

To combine several components, give several -f arguments:

Start Colander and Threatr
docker compose -f compose-colander.yml -f compose-threatr.yml up -d

Or start the whole stack​

compose.yml is the base file for production deployments. It starts the whole stack, Colander, Threatr, Mandolin, CyberChef and Playwright, and obtains certificates from Let's Encrypt:

Start the whole stack
docker compose up -d

Before exposing it to the Internet, review your .env file: the domain names of the services, the email address used for Let's Encrypt, and the addresses the reverse proxy listens on, which are bound to 127.0.0.1 by default.

If you cannot obtain a valid Let's Encrypt certificate in your context, use compose-dev.yml instead. It overrides some of the services of compose.yml, generates a self-signed certificate in ./data/traefik/certs/self-signed/cert.pem, and exposes the Traefik dashboard on http://localhost:8080:

Start the whole stack with a self-signed certificate
docker compose -f compose-dev.yml up -d

To let a PiRogue connect to this Colander over HTTPS, add the self-signed certificate to the trust store of the operating system of the PiRogue.

Access the services​

ServiceLocal addressHostname address
Colanderhttp://localhost:5000https://colander.local:4443
Threatrhttp://localhost:5001https://threatr.local:4443
Mandolinhttp://localhost:5002https://mandolin.local:4443
CyberChefhttp://localhost:5003https://cyberchef.local:4443
Traefik dashboard, compose-dev.yml onlyhttp://localhost:8080http://traefik.local:8080

To use the hostname addresses, add the hostnames at the end of the line starting with 127.0.0.1 in the /etc/hosts file of the computer you browse from.

Create the administrator accounts​

Create the first administrator of Colander and, if you started it, of Threatr. Each command asks for a username, an email address and a password:

Create the administrator accounts
docker compose -f compose-dev.yml exec colander-front /entrypoint python manage.py createsuperuser
docker compose -f compose-dev.yml exec threatr-front /entrypoint python manage.py createsuperuser

Use the same -f arguments as the ones you started the stack with. For instance, replace -f compose-dev.yml with nothing if you started it with docker compose up -d.

Stop the stack​

Stop the stack
docker compose -f compose-dev.yml stop

Again, use the same -f arguments as the ones you started the stack with.

Next steps​