Apache Fineract
Apache Fineract is an open-source core banking platform providing a flexible, extensible foundation for a wide range of financial services. By making robust banking technology openly available, it lowers barriers for institutions and innovators to reach underserved and unbanked populations.
Have a look at the documentation, the wiki or at the FAQ, if this README does not answer what you are looking for.
If you are interested in contributing to this project, but perhaps don't quite know how and where to get started, please join our developer mailing list and chat server, listen into our conversations, chime into threads, or just send us a "Hello!" introduction message; we're a friendly bunch, and look forward to hearing from you.
For the developer wiki, see Contributor's Zone. Maybe these how-to articles help you to get started.
In any case visit our JIRA Dashboard to find issues to work on, see what others are doing, or open new issues.
In the moment you get started writing code, please consult our CONTRIBUTING guidelines, where you will find more information on subjects like coding style, testing and pull requests.
See Fineract Development Environment in the docs for hardware, software, and tool prerequisites and recommendations.
For a list of known vulnerabilities, see Apache Fineract Security Reports.
If you believe you have found a new vulnerability, let us know privately.
For details about security during development and deployment, see the documentation here.
If you’re running Apache Fineract on a private fork, you might want to consider disabling GitHub Actions CI. This is because the usage minutes and artifact costs (including the built workspace and logs generated during execution) could incur additional expenses, that you should be aware!
Follow these steps to quickly set up and run Apache Fineract locally.
# get code
git clone https://github.com/apache/fineract.git
cd fineract
# create dbs
./gradlew createPGDB -PdbName=fineract_tenants
./gradlew createPGDB -PdbName=fineract_default
# start backend
./gradlew devRunAfter a minute or two, Fineract will be listening for API requests on port 8443.
Wait for the APACHE FINERACT IS READY message in the log before sending requests.
Stopping a bootRun or devRun process is reported by Gradle as Build cancelled while executing task, but that does not mean that Fineract failed.
A graceful shutdown is also logged, as APACHE FINERACT IS SHUTTING DOWN GRACEFULLY.
[!TIP] Java properties or environment variables can be used to override default settings. See
fineract-provider/src/main/resources/application.properties.
Confirm Fineract is ready with, for example:
curl --insecure https://localhost:8443/fineract-provider/actuator/healthExpected response for fresh instance:
{"status":"UP","groups":["liveness","readiness"]}To test authenticated endpoints, include credentials in your request:
# basic auth header uses colon-delimited and base64-encoded default "mifos:password" login
curl --location --insecure \
https://localhost:8443/fineract-provider/api/v1/clients \
--header 'Content-Type: application/json' \
--header 'Fineract-Platform-TenantId: default' \
--header 'Authorization: Basic bWlmb3M6cGFzc3dvcmQ='Expected response for fresh instance:
{"totalFilteredRecords":0,"pageItems":[]}Unit tests need nothing running:
./gradlew test -x :integration-tests:test -x :twofactor-tests:test -x :oauth2-tests:testThe integration, two-factor, OAuth2 and Cucumber E2E suites all drive a live Fineract instance over HTTP, and the build does not start one for you — start it first, or every test fails on connection refused. The Docker stack is what CI uses, so it is the configuration these suites are actually verified against:
# build the image once
./gradlew :fineract-provider:jibDockerBuild -Djib.to.image=fineract -x test -x cucumber
# start Fineract plus its database, LocalStack and the mock OAuth2 server
docker compose -f docker-compose-postgresql-test.yml up -d
./gradlew :integration-tests:waitForFineract
./gradlew :integration-tests:test --tests ClientLoanIntegrationTestUse docker-compose-mariadb-test.yml or docker-compose-mysql-test.yml for the other database engines.
Docker is not a requirement, though. Anything that serves https://localhost:8443/fineract-provider works just as
well — ./gradlew devRun from the Quick Start above, or ServerApplication from your IDE — since that is the
address the suites default to. Point them somewhere else with the BACKEND_PROTOCOL, BACKEND_HOST and
BACKEND_PORT environment variables.
:twofactor-tests and :oauth2-tests need the server started in a different authentication mode, so they cannot
share an instance with :integration-tests. Layer the matching override on top and recreate the service:
docker compose -f docker-compose-postgresql-test.yml -f docker-compose-twofactor-test.yml \
up -d --force-recreate fineract
./gradlew :twofactor-tests:testSee CONTRIBUTING.md and the Integration Testing chapter for the rest.
Running Fineract just to try it out is relatively easy. If you intend to use it in a production environment, be aware that a proper deployment can be complex, costly, and time-consuming. Considerations include: Security, privacy, compliance, performance, service availability, backups, and more. The Fineract project does not provide a comprehensive guide for deploying Fineract in production. You might need skills in enterprise Java applications and more. Alternatively, you could pay a vendor for Fineract deployment and maintenance. You will find tips and tricks for deploying and securing Fineract in our official documentation.
Build a modern, cloud native, fully self contained JAR file:
./gradlew clean bootJarThe JAR will be created in the fineract-provider/build/libs directory.
If you intend to use MariaDB or MySQL (warning: both are deprecated), you must download the appropriate JDBC driver yourself and override default database settings. When you start the JAR, specify the directory containing the JDBC driver.
MariaDB example:
# Assumes mariadb-java-client.jar exists in current dir.
# For MariaDB or MySQL, override default settings such as these:
export FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.mariadb.jdbc.Driver
export FINERACT_DEFAULT_TENANTDB_PORT=3306
export FINERACT_HIKARI_JDBC_URL=jdbc:mariadb://localhost:3306/fineract_tenants
java -Dloader.path=. -jar fineract-provider/build/libs/fineract-provider.jarThis does not require an external Tomcat.
[!NOTE] Versions of mariadb driver and Fineract JARs are omitted from filenames above for brevity.
Build a traditional WAR file:
./gradlew :fineract-war:clean :fineract-war:warThe WAR will be created in the fineract-war/build/libs directory. Afterwards deploy the WAR to your Tomcat Servlet Container.
We recommend using the JAR instead of the WAR file deployment, because it's much easier.
CI covers the JAR-based image everywhere and the WAR through one smoke job
(build-war-smoke.yml), which deploys the WAR into a stock Tomcat and runs
a single E2E scenario against it. To reproduce that locally:
./gradlew :fineract-war:war
docker compose -f docker-compose-war-test.yml up -d
curl --retry 60 --retry-all-errors http://localhost:8080/fineract-provider/actuator/healthTomcat serves the WAR over plain HTTP on port 8080, so point the suites at it with BASE_URL (E2E) or
BACKEND_PROTOCOL/BACKEND_PORT (integration tests).
It is possible to do a 'one-touch' installation of Fineract using containers (AKA "Docker") for dev/test convenience and local/offline demos. This includes the database running in the container.
As prerequisites, you must have docker and docker-compose installed on your machine; see
Docker Install and Docker Compose Install.
Alternatively, you can also use Podman
(e.g. via dnf install podman-docker), and Podman Compose
(e.g. via pip3 install podman-compose) instead of Docker.
[!CAUTION] Our images are NOT production-ready. For example, notice how the
testSpring profile is enabled viafineract-common.env, included bydocker-compose.yml, buttestmust not be enabled in production. YOU are responsible for securing your production instances. See How to run for production.
To run a new Fineract instance on Linux you can simply:
git clone https://github.com/apache/fineract.git
cd fineract
./gradlew :fineract-provider:jibDockerBuild -x testOn Windows, do this instead:
git clone https://github.com/apache/fineract.git --config core.autocrlf=input
cd fineract
gradlew :fineract-provider:jibDockerBuild -x testInstall the Loki log driver and start:
docker plugin install grafana/loki-docker-driver:latest \
--alias loki --grant-all-permissions
docker compose -f docker-compose-development.yml up -dThe Fineract (back-end) should be running at https://localhost:8443/fineract-provider/ now.
Wait for https://localhost:8443/fineract-provider/actuator/health to return {"status":"UP"}.
You must go to https://localhost:8443 and remember to accept the self-signed SSL certificate of the API once in your browser.
Docker Hub has a pre-built container image of this project, built continuously.
The official Fineract Docker image includes the PostgreSQL JDBC driver only. MySQL and MariaDB JDBC drivers are not included due to license incompatibility (see LICENSE section below). To use Fineract with MySQL or MariaDB, download the driver from the vendor and either build your own Docker image on top of the official one, mount it via a Docker volume, or install it from the OS package manager inside a custom image.
You must specify the tenants database JDBC URL by passing it to the fineract container via environment
variables; please consult the docker-compose.yml for exact d
No open issues yet, or sync has not completed.