How to Install Bahmni on Azure Server or AWS Cloud – Complete Guide
Bahmni is a free and open-source Hospital Information System (HIS) designed to help hospitals and healthcare organizations manage their daily operations digitally.
Bahmni integrates multiple open-source applications, including OpenMRS for electronic medical records, OpenELIS for laboratory information management, and Odoo for billing and enterprise resource management, depending on the selected deployment configuration.
In this tutorial, we will explore how to deploy Bahmni on a cloud server such as Microsoft Azure or Amazon Web Services (AWS), configure the server, prepare the required dependencies, and understand the installation process.
1. What is Bahmni?
Bahmni is an integrated hospital management solution that helps healthcare organizations manage different hospital activities through a centralized platform.
- OpenMRS: Electronic Medical Records (EMR) and patient management.
- OpenELIS: Laboratory Information Management System (LIMS).
- Odoo: Billing, accounting and enterprise resource management integrations.
- Bahmni Reports: Reporting and hospital operational insights.
Learn more from the official Bahmni website.
2. Prerequisites
Before starting the installation, make sure you have access to a cloud platform and a Linux server.
| Requirement | Configuration |
|---|---|
| Cloud Platform | Microsoft Azure or AWS |
| Operating System | Ubuntu Linux recommended for current Docker deployment |
| Processor | At least 2 CPUs for testing |
| RAM | 4–8 GB or more for testing |
| Storage | 20 GB minimum for initial experimentation; plan additional storage for databases and medical files |
| Access | SSH and sudo privileges |
| Internet | Required to download installation packages and container images |
Important: The above is a basic experimental configuration, not a production hospital server recommendation. Actual requirements depend on patient records, concurrent users, databases, laboratory integrations and medical image storage.
3. Launch a Cloud Server on Azure or AWS
Microsoft Azure
- Log in to the Azure Portal.
- Navigate to Virtual Machines.
- Click Create Virtual Machine.
- Select a supported Linux operating system.
- Configure the CPU, RAM and storage.
- Configure SSH access and network security rules.
- Launch the virtual machine.
Amazon Web Services (AWS)
- Log in to the AWS Management Console.
- Navigate to EC2.
- Click Launch Instance.
- Select a supported Linux AMI.
- Choose an appropriate instance type.
- Configure storage and security groups.
- Launch the instance and connect using SSH.
4. Connect to the Linux Server
Once your cloud instance is running, connect to it using SSH.
ssh username@YOUR_PUBLIC_IP
Update the operating system packages.
sudo apt update
sudo apt upgrade -y
5. Configure Swap Space (Optional)
Swap space can help a Linux server handle temporary memory pressure. It does not replace physical RAM.
Check the existing swap configuration:
swapon --show
free -h
To create a 4 GB swap file, execute:
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
Activate the swap file:
sudo swapon /swapfile
Configure automatic activation after reboot:
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Verify the swap configuration:
swapon --show
free -h
6. Recommended Method: Install Bahmni Using Docker
Important update: Bahmni now recommends Docker-based installation for trying the application. The older RPM-based installation method described in the original tutorial is no longer supported.
The Docker approach makes deployment and upgrades easier and avoids installing the older application dependencies directly into the operating system.
Step 1: Install Docker
Follow the official Docker installation instructions for your Linux distribution:
Docker Engine Installation Guide
Step 2: Verify Docker Installation
docker --version
docker compose version
Step 3: Download the Bahmni Docker Project
Follow the official Bahmni Docker installation instructions to obtain the deployment files and configuration.
Official Bahmni Installation Guide
Step 4: Configure the Deployment
Review the Docker Compose configuration and configure the required application services, database settings, persistent volumes, ports and environment variables according to the official installation guide.
Step 5: Start Bahmni
Use the startup commands and configuration provided in the official Bahmni Docker project. Verify that all required containers are running before accessing the application.
For production deployments, configure persistent storage, database backups, TLS certificates, authentication and monitoring before exposing the application publicly.
7. Legacy Installation: Bahmni 0.92 / 0.93 on CentOS 7
Historical installation reference: The following commands are retained from the original RPM-based installation tutorial. They are intended only for understanding or reproducing an old Bahmni environment.
Warning: CentOS 7 reached end of life on June 30, 2024. The old RPM repositories, Python dependencies and installer packages may be unavailable or insecure. Do not use this procedure for a new production hospital deployment.
Step 1: Install the Legacy Prerequisite
yum install -y https://kojipkgs.fedoraproject.org//packages/zlib/1.2.11/19.fc30/x86_64/zlib-1.2.11-19.fc30.x86_64.rpm
Step 2: Install Required Python Packages
The original installation required additional Python packages and specific older versions.
sudo yum install epel-release
sudo yum install python-pip
sudo pip install pip==v19.0
sudo pip uninstall click
sudo pip install click==v7.0
sudo pip install pyusb
sudo pip install babel==v0.9.6
sudo pip install decorator==v3.4.0
sudo pip install beautifulsoup4
Note: These are legacy Python dependencies. Do not install these old packages globally on a current operating system.
Step 3: Install the Bahmni Installer
The original tutorial used Bahmni Installer version 0.92.
yum install http://repo.mybahmni.org/releases/bahmni-installer-0.92-155.noarch.rpm
Verify the installation:
bahmni --help
Step 4: Configure the Bahmni Installer
The original installation used a configuration file located at:
/etc/bahmni-installer/setup.yml
The original tutorial downloaded this file using a shortened URL. For safety, do not blindly execute an unverified shortened URL. Obtain the matching configuration from a trusted, archived Bahmni installation source.
For Bahmni 0.92 and earlier, the original repository setting was:
bahmni_repo_url: http://repo.mybahmni.org/releases/
Review the configuration before running the installer.
Step 5: Configure the Bahmni Inventory
The original installer used a local inventory configuration.
echo "export BAHMNI_INVENTORY=local" >> ~/.bashrc
source ~/.bashrc
Verify that the environment variable is configured:
echo $BAHMNI_INVENTORY
Step 6: Run the Legacy Bahmni Installer
For Bahmni 0.92 or earlier, the original installation command was:
bahmni -aru http://repo.mybahmni.org/releases/ansible-2.4.6.0-1.el7.ans.noarch.rpm install
For the original 0.93 procedure, the command was:
bahmni install
These commands are historical references only and are not a supported current installation procedure.
Step 7: Verify Installed Packages
The original CentOS-based installation used the following command:
yum list installed | grep bahmni
In the modern Docker deployment, verify the running containers using Docker commands and the official project instructions instead.
8. Legacy Python Dependency Reference
The original Bahmni installation tutorial included the following Python dependency versions. These are preserved for historical troubleshooting and compatibility reference.
Babel==2.3.4
decorator==4.0.10
docutils==0.12
ebaysdk==2.1.4
feedparser==5.2.1
gevent==1.1.2
greenlet==0.4.10
jcconv==0.2.3
Jinja2==2.10.1
lxml==3.5.0
Mako==1.0.4
MarkupSafe==0.23
mock==2.0.0
ofxparse==0.16
passlib==1.6.5
Pillow==3.4.1
psutil==4.3.1
psycogreen==1.0
psycopg2==2.7.3.1
pydot==1.2.3
pyparsing==2.1.10
pyPdf==1.13
pyserial==3.1.1
Python-Chart==1.39
python-dateutil==2.5.3
python-ldap==2.4.27
python-openid==2.2.5
pytz==2016.7
pyusb==1.0.0
PyYAML==3.12
qrcode==5.3
reportlab==3.3.0
requests==2.20.0
six==1.10.0
suds-jurko==0.6
vatnumber==1.2
vobject==0.9.3
Werkzeug==0.11.11
wsgiref==0.1.2
XlsxWriter==0.9.3
xlwt==1.1.2
xlrd==1.0.0
Important: Do not install this package list blindly on a modern server. Several packages are outdated, and some versions may contain known security vulnerabilities or compatibility issues.
9. Common Installation Issues and Troubleshooting
| Problem | Possible Solution |
|---|---|
| Insufficient RAM | Increase server memory and review application resource usage. |
| Docker containers fail to start | Inspect container logs and configuration. |
| Database connection failure | Verify database credentials, networking and service health. |
| Unable to access Bahmni | Check firewall rules, ports and reverse proxy configuration. |
| Installation package unavailable | Check the repository and version compatibility. |
| Insufficient disk space | Increase storage and review database and application data usage. |
Check Docker Containers
docker ps -a
Check Docker Logs
docker compose logs
Check Disk Space
df -h
Check Available Memory
free -h
10. Important Security Considerations
Bahmni is a healthcare information system that may store sensitive patient and clinical information. Security should be considered before making the application accessible over the internet.
- Use a supported operating system and regularly apply security updates.
- Configure HTTPS using trusted TLS certificates.
- Restrict SSH access to authorized IP addresses.
- Never expose database ports directly to the public internet.
- Configure strong passwords and role-based access controls.
- Implement regular database and file backups.
- Encrypt sensitive data and protect backup storage.
- Monitor application logs and infrastructure activity.
- Validate applicable healthcare privacy and data protection requirements.
11. Official Bahmni Resources
For updated installation instructions and additional configuration details, refer to the following resources:
- Bahmni Official Installation Page
- Bahmni Installation Documentation
- Bahmni System Requirements
- Docker Engine Installation Guide
12. Conclusion
Bahmni is a powerful open-source hospital management platform that integrates patient records, laboratory management, billing and other healthcare operations into a unified solution.
By deploying Bahmni on Microsoft Azure or Amazon AWS, healthcare organizations and developers can experiment with cloud-based hospital information systems and build scalable healthcare infrastructure.
For new deployments, the recommended approach is to use the current Docker-based installation or the officially documented cloud/Kubernetes deployment rather than the discontinued CentOS 7 RPM installation.
I hope this tutorial helps you understand the Bahmni architecture, server prerequisites and cloud deployment process.
Happy Learning and Happy Hosting!
Related Keywords: Bahmni Installation, Bahmni on Azure, Bahmni on AWS, Hospital Management System, OpenMRS, OpenELIS, Odoo, Healthcare IT, Docker, Cloud Computing.
Comments
Post a Comment