Nginx reverse proxy
Terminates HTTPS and routes frontend and API traffic securely.
Prepare an Ubuntu server for Apache Fineract and the Mifos Web App using controlled Docker images, persistent storage, Nginx, HTTPS, backups and monitoring.
Recommended design
Terminates HTTPS and routes frontend and API traffic securely.
Provides the browser-based user interface used by operational teams.
Provides lending, savings, accounting, reporting and REST API services.
Stores tenants, customers, products, loans, transactions and accounting data.
Protects business data and alerts the operations team when services fail.
Before installation
Step-by-step
Apply available package and security updates before installing application dependencies.
sudo apt update
sudo apt upgrade -y
sudo rebootAvoid operating the application permanently as the root user.
sudo adduser mifos
sudo usermod -aG sudo mifosInstall Git, curl, certificate utilities, firewall tools and supporting packages.
sudo apt install -y \
ca-certificates \
curl \
git \
gnupg \
nginx \
ufw \
unzipUse Docker's signed Ubuntu repository instead of an uncontrolled installation script.
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-pluginAdd the dedicated Mifos user to the Docker group and start a fresh login session.
sudo usermod -aG docker mifos
sudo systemctl enable --now dockerSeparate application files, secrets, persistent data, logs and backups.
sudo mkdir -p /opt/mifos/{app,config,data,logs,backups}
sudo chown -R mifos:mifos /opt/mifos
sudo chmod 750 /opt/mifosStore database and application secrets outside the source-code repository.
sudo -u mifos touch /opt/mifos/config/production.env
sudo chmod 600 /opt/mifos/config/production.envUse fixed, reviewed image tags. Never leave production images on a floating latest tag.
sudo -u mifos nano /opt/mifos/app/docker-compose.ymlReview the resolved Compose configuration before starting containers.
cd /opt/mifos/app
docker compose --env-file ../config/production.env config
docker compose --env-file ../config/production.env pull
docker compose --env-file ../config/production.env up -dReview container state and application logs before exposing the platform publicly.
cd /opt/mifos/app
docker compose ps
docker compose logs --tail=200 fineract
curl -k https://127.0.0.1:8443/fineract-provider/actuator/healthNetwork protection
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow "Nginx Full"
sudo ufw enable
sudo ufw status verboseProduction readiness
Production implementation
MifosX provides Apache Fineract deployment, database setup, Mifos Web App configuration, SSL, backups, monitoring, migration, testing and production support.