Checking out the [Malcolm source code]({{ site.github.repository_url }}/tree/{{ site.github.build_revision }}) results in the following subdirectories in your malcolm/ working copy:
api- code and configuration for theapicontainer, which provides a REST API to query Malcolmarkime- code and configuration for thearkimecontainer that processes PCAP files usingcapture, which serves the Viewer applicationconfig- a directory containing the environment variable files that define Malcolm's configurationcontainer-health-scripts- scripts included in Malcolm's images for Docker health checks and Kubernetes liveness checksdashboards- code and configuration for thedashboardscontainer for creating additional ad-hoc visualizations and dashboards beyond that which is provided by Arkime ViewerDockerfiles- a directory containing build instructions for Malcolm's imagesdocs- a directory containing instructions and documentationfile-upload- code and configuration for theuploadcontainer that serves a web browser-based upload form for uploading PCAP files and Zeek logs, and serves an SFTP share as an alternate uploadfilebeat- code and configuration for thefilebeatcontainer that ingests Zeek logs and forwards them to thelogstashcontainerfilescan-logs- an initially empty directory into which file scanning result logs will be generatedfilescan- code and configuration for thefilescancontainer that can scan files extracted by Zeekfreq-server- code and configuration for thefreqcontainer used for calculating entropy of stringshedgehog-raspi- code and configuration for building a Hedgehog Linux Raspberry Pi imagehtadmin- configuration for thehtadminuser account management containerkeycloak- code for thekeycloakcontainerlogstash- code and configuration for thelogstashcontainer that parses Zeek logs and forwards them to theopensearchcontainermalcolm-iso- code and configuration for building an installer ISO for a minimal Debian-based Linux installation for running Malcolmnetbox- code and configuration for thenetboxcontainer which provides asset management capabilitiesnginx- configuration for thenginxreverse-proxy containeropensearch-backup- an initially empty directory for storing OpenSearch index snapshotsopensearch-config- code and scripts used during the initialization of theopensearchcontaineropensearch- an initially empty directory where the OpenSearch database instance will residepcap-capture- code and configuration for thepcap-capturecontainer that can capture network trafficpcap-monitor- code and configuration for thepcap-monitorcontainer that watches for new or uploaded PCAP files and notifies the other services to process thempcap- an initially empty directory for PCAP files to be uploaded, processed, and storedpostgres-scripts- code used in thepostgrescontainer for database initializationpostgres- an initially empty directory to hold the PostgreSQL database used by NetBox and Keycloakscripts- control scripts for starting, stopping, restarting, etc., Malcolmshared- miscellaneous code used by various Malcolm componentsstrelka- code and configuration for thestrelka-containers used in byfilescanfor file scanningsuricata-logs- an initially empty directory for Suricata logs to be uploaded, processed, and storedsuricata- code and configuration for thesuricatacontainer that handles PCAP processing using Suricatavalkey- an initially empty directory where the Valkey database runtime files will resideyara- a directory for custom user-provided YARA ruleszeek-logs- an initially empty directory for Zeek logs to be uploaded, processed, and storedzeek- code and configuration for theZeekcontainer that handles PCAP processing using Zeek_includesand_layouts- templates for the HTML version of the documentation.github- GitHub workflow actions used to build Malcolm using GitHub runners
and the following files of special note:
docker-compose-dev.yml- the configuration file used bydocker composeto build, start, and stop an instance of the Malcolm appliancedocker-compose.yml- similar todocker-compose-dev.yml, only used for the "packaged" installation of Malcolm
Building the Malcolm images from scratch requires Internet access to pull source files for its components. Once Internet access is available, execute the following command to build all the images used by the Malcolm appliance:
$ ./scripts/build.sh
Then, go take a walk or something since it will be a while. When you are done, you can run docker images and see if you have fresh images for:
ghcr.io/idaholab/malcolm/api(based onpython:3-slim)ghcr.io/idaholab/malcolm/arkime(based ondebian:13-slim)ghcr.io/idaholab/malcolm/dashboards-helper(based ondebian:13-slim)ghcr.io/idaholab/malcolm/dashboards(based onopensearchproject/opensearch-dashboards)ghcr.io/idaholab/malcolm/file-upload(based ondebian:13-slim)ghcr.io/idaholab/malcolm/filebeat-oss(based ondocker.elastic.co/beats/filebeat-oss)ghcr.io/idaholab/malcolm/filescan(based onpython:3)ghcr.io/idaholab/malcolm/freq(based ondebian:13-slim)ghcr.io/idaholab/malcolm/htadmin(based ondebian:11-slim)ghcr.io/idaholab/malcolm/keycloak(based onquay.io/keycloak/keycloak)ghcr.io/idaholab/malcolm/logstash-oss(based ondocker.elastic.co/logstash/logstash-oss)ghcr.io/idaholab/malcolm/netbox(based onnetboxcommunity/netbox:latest)ghcr.io/idaholab/malcolm/nginx-proxy(based onalpine:3.23)ghcr.io/idaholab/malcolm/opensearch(based onopensearchproject/opensearch)ghcr.io/idaholab/malcolm/pcap-capture(based ondebian:13-slim)ghcr.io/idaholab/malcolm/pcap-monitor(based ondebian:13-slim)ghcr.io/idaholab/malcolm/postgresql(based onpostgres:16-alpine)ghcr.io/idaholab/malcolm/strelka-backend(based onghcr.io/idaholab/strelka/strelka-backend:malcolm)ghcr.io/idaholab/malcolm/strelka-frontend(based onghcr.io/idaholab/strelka/strelka-frontend:malcolm)ghcr.io/idaholab/malcolm/strelka-manager(based onghcr.io/idaholab/strelka/strelka-manager:malcolm)ghcr.io/idaholab/malcolm/suricata(based ondebian:13-slim)ghcr.io/idaholab/malcolm/valkey(based onvalkey/valkey:7-alpine)ghcr.io/idaholab/malcolm/zeek(based onzeek/zeek)
Alternately, if you have forked Malcolm on GitHub, [workflow files]({{ site.github.repository_url }}/tree/{{ site.github.build_revision }}/.github/workflows/) are provided that contain instructions for GitHub to build the images, as well as sensor and Malcolm installer ISOs. The resulting images are named according to the pattern ghcr.io/owner/malcolm/image:branch (e.g., if you have forked Malcolm with the GitHub user romeogdetlevjr, the Arkime container built for the main branch would be named ghcr.io/romeogdetlevjr/malcolm/arkime:main). To run your local instance of Malcolm using these images instead of the official ones, you will need to edit your docker-compose.yml file(s) and replace the image: tags according to this new pattern, or use the bash helper script [./scripts/github_image_helper.sh]({{ site.github.repository_url }}/blob/{{ site.github.build_revision }}/scripts/github_image_helper.sh) to pull and re-tag the images.
scripts/malcolm_appliance_packager.sh can be run to package up the configuration files (and, if necessary, the images), which can be copied to a network share or USB drive for distribution to non-networked machines. For example:
$ ./scripts/malcolm_appliance_packager.sh
...
Packaged Malcolm to "/home/user/Downloads/malcolm_20251029_140727_d22a504f.tar.gz"
Do you need to package container images also [y/N]? y
This might take a few minutes...
Packaged Malcolm images to "/home/user/Downloads/malcolm_20251029_140727_d22a504f_images.tar.xz"
To install and configure Malcolm, run install.py
To start, stop, restart, etc. Malcolm:
Use the control scripts in the "scripts/" directory:
- start (start Malcolm)
- stop (stop Malcolm)
- restart (restart Malcolm)
- logs (monitor Malcolm logs)
- wipe (stop Malcolm and clear its database)
- auth_setup (change authentication-related settings)
Malcolm services can be accessed at https://<IP or hostname>/
The above example will result in the following artifacts for distribution as explained in the script's output:
$ ls -lh
total 4.0G
drwxrwxr-x 10 user user 156 Oct 29 17:22 installer
-rwxrwxr-x 1 user user 44K Oct 29 17:22 install.py
-rw-rw-r-- 1 user user 460 Oct 29 17:22 malcolm_20251029_140727_d22a504f.README.txt
-rw-rw-r-- 1 user user 270K Oct 29 17:22 malcolm_20251029_140727_d22a504f.tar.gz
-rw-rw-r-- 1 user user 4G Oct 29 17:22 malcolm_20251029_140727_d22a504f_images.tar.xz
-rw-rw-r-- 1 user user 74K Oct 29 17:22 malcolm_common.py
-rw-rw-r-- 1 user user 5.6K Oct 29 17:22 malcolm_constants.py
-rw-rw-r-- 1 user user 50K Oct 29 17:22 malcolm_kubernetes.py
-rw-rw-r-- 1 user user 37K Oct 29 17:22 malcolm_utils.py
If you have obtained pre-packaged installation files to install Malcolm on a non-networked machine via an internal network share or on a USB key, you likely have the following files:
malcolm_YYYYMMDD_HHNNSS_xxxxxxx.README.txt- This readme file contains minimal setup instructions for extracting the contents of the other tarballs and running the Malcolm appliance.malcolm_YYYYMMDD_HHNNSS_xxxxxxx.tar.gz- This tarball contains the configuration files and directory configuration used by an instance of Malcolm. It can be extracted viatar -xf malcolm_YYYYMMDD_HHNNSS_xxxxxxx.tar.gzupon which a directory will be created (named similarly to the tarball) containing the directories and configuration files. Alternatively,install.pycan accept this filename as an argument and handle its extraction and initial configuration for you.malcolm_YYYYMMDD_HHNNSS_xxxxxxx_images.tar.xz- This tarball contains the images used by Malcolm. It can be imported manually viadocker load -i malcolm_YYYYMMDD_HHNNSS_xxxxxxx_images.tar.xzinstall.py- This install script can load the images and extract Malcolm configuration files from the aforementioned tarballs and do some initial configuration for you (see Runninginstall.py).
Run install.py malcolm_XXXXXXXX_XXXXXX_XXXXXXX.tar.gz and follow the prompts. If you do not already have Docker and Docker Compose installed, the install.py script will help you install them.