MO2.1 Install openIMIS using Docker
Video tutorial
This guide is valid for the installation of the current openIMIS version.
0. Prerequisite
To install openIMIS using Docker, you first need first to install Docker on your computer/server. Please visit Get Docker website to download and install the version that matches your OS.
1. Download openIMIS Docker files
Download the files from openimis-dist_dkr onto your machine and extract the files.
After downloading, you will have to complete the next steps via the command-line from inside the folder you have just downloaded and extracted.
2. Edit the configuration files
The Docker based deployment of openIMIS is configured using environment variables. For convenience, these environment variables are managed in env files. You will find example configuration files from the archive you downloaded in Step 1.
Copy the example configuration files to new files and remove the
.examplesuffix.
As an example, the.env.exampleshould be copied or renamed to just.env
The files have comments explaining what the various configurations are for. We will highlight a few of them here.
Version variables: The following variables determine which version of openIMIS you will run in docker - by default they default to the latest release of the project.
# NOTE: You can also use these tags to specify a GitHub branch or tag, this maybe useful for advanced scenarios
DB_TAG=25.10
BE_TAG=25.10
FE_TAG=25.10Demo data variable: The DEMO_DATASET variable if enabled as shown below, will start the openIMIS platform with pre-populated sample data which you can use to explore the product. When it is False, the database will be empty.
DEMO_DATASET=trueWe recommend reading through the .env files to understand the rest of the configuration options available.
3. Run the Docker containers via docker-compose
After editing the configuration files, you are now ready to run openIMIS.
$ docker compose upOnce this completes successfully, you should have a complete openIMIS release running locally and accessible via your local network interface. By default the containers bind to port 80 and 443. You should be able to test it by navigating to http://localhost/front or https://localhost/front/login
3.1. Administering the platform
If you configured the platform to include the DEMO_DATASET, you will automatically have a user account generated with the following credentials
Username: Admin
Password: admin1234. Verify and Review the Running Services
The openIMIS Docker setup consists of several containers, each serving a specific role in the system:
db: PostgreSQL database used to persist application data.
backend: Django-based API server handling business logic and data processing.
frontend: React-based user interface of openIMIS.
migrations: Initializes or upgrades the backend database schema (runs once at startup).
worker: Celery service for background processing and asynchronous tasks.
rabbitmq: Message broker used by Celery for task queueing.
opensearch: Search and analytics engine for indexing and querying openIMIS data.
opensearch-dashboards: UI dashboard to visualize and explore data from OpenSearch.
proxy/traefik (external network): Acts as a reverse proxy, routing HTTP/S traffic to the appropriate services.
All services communicate over a shared Docker network (openimis-net) and are initialized through the Docker Compose setup.
If the new initialization method works reliably, note that demo/static data (e.g., reference values, sample claims, insurees) will be automatically loaded via Django fixtures as part of the container initialization.
4.1. Verifying Running Containers
To check whether your Docker containers are running properly, you can use the following command:
$ docker psLook for your openIMIS containers in the output. In the STATUS column, you should see messages like:
Up 5 minutes (healthy)or
Up 3 minutes (starting)4.2. Health Checks
In addition to being "up", many openIMIS services include a Docker health check to ensure the container is fully operational (not just running). For example:
The database container (
db) usespg_isreadyto confirm that PostgreSQL is accepting connections.The backend (
backend,worker) containers depend on successful completion of themigrationscontainer and may not start until it's marked healthy.The opensearch service uses an HTTP-based check to validate cluster health.
You should wait until the containers report Up ... (healthy) before assuming the service is ready to use.
To inspect container health details directly, you can run:
$ docker inspect --format='{{.State.Health.Status}}' <container_name>Or view logs with:
$ docker logs <container_name>This is especially useful during initial setup or when troubleshooting startup issues.
4.3. Managing the running services
From within openimis-dist_dkr directory:
To stop all docker containers:
docker compose stopTo (re-)start all docker containers:
docker compose up -dTo pull new images or images update `docker compose pull`
4.4. Updating the Docker Images
To ensure you're using the latest available versions of the openIMIS components, you can pull updated images from the GitHub Container Registry:
$ docker compose pullThis will download the latest images based on the tag specified in your .env file (e.g., develop, latest, or a specific release version).
4.5. Configure https via certbot
there is a docker-compose that support let’s encrypt certificates
first export NEW_OPENIMIS_HOST ,
dry run
$ docker-compose run --rm --entrypoint "certbot certonly --webroot -w /var/www/certbot --staging --register-unsafely-without-email -d ${NEW_OPENIMIS_HOST} --rsa-key-size 2048 --agree-tos --force-renewal" certbotactual setup
$ docker-compose run --rm --entrypoint "certbot certonly --webroot -w /var/www/certbot --register-unsafely-without-email -d ${NEW_OPENIMIS_HOST} --rsa-key-size 2048 --agree-tos --force-renewal" certbot
5. OpenSearch / OpenSearch Dashboards Setup
OpenSearch and OpenSearch Dashboards provide powerful search and analytics capabilities within the openIMIS platform. However, they are not enabled by default in the Dockerized openIMIS distribution and require additional setup steps.
IMPORTANT: Before starting, ensure that your openIMIS Docker setup is working with the database, backend, and frontend containers.
5.1. Step-by-Step Setup
Copy the example OpenSearch environment file and configure it. Edit
.env.openSearchto adjust settings such asOPENSEARCH_PASSWORD,CLUSTER_NAME, and port numbers as needed for your environment.
cp .env.openSearch.example .env.openSearchBuild Required Containers
Use the following command to build the additional containers (OpenSearch, Dashboards):
docker compose -f docker-compose.yml -f docker-compose.openSearch.yml build opensearch opensearch-dashboardsRun the Services
Once built, you can start the services. These will start OpenSearch, the Dashboards interface, and the proxy layer:
docker compose -f docker-compose.yml -f docker-compose.openSearch.yml up opensearch opensearch-dashboards
5.2. Integration with openIMIS Frontend and Backend
To fully integrate OpenSearch with openIMIS, a few environment variables need to be configured:
Set OpenSearch Authentication Token
In the main .env file of your openimis-dist_dkr setup, add:
OPENSEARCH_BASIC_TOKEN=Basic <base64_encoded_admin:password>Replace <base64_encoded_admin:password> with the base64-encoded version of your OpenSearch admin credentials.
Enable Proxy Route in openIMIS Frontend
In the Dockerfile or environment configuration of the openimis-fe_js container, set the following variable:
ENV OPENSEARCH_PROXY_ROOT="opensearch"This defines the base path under which the OpenSearch Dashboards UI will be accessible.
3. Final Step: Run openIMIS Stack with OpenSearch
Once all the above steps are done, you can start or restart the main services with:
docker compose -f docker-compose.yml -f docker-compose.openSearch.yml up -dThis will run the full openIMIS stack (DB, backend, frontend) including OpenSearch and Dashboards.
5.3. Accessing OpenSearch Dashboards
After everything is up and running, you can access the Dashboards UI at:
https://<your-domain>/opensearchYou should see the OpenSearch Dashboards interface, with access governed by the admin credentials you've set in .env.openSearch.
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/