Skip to content

Apache Fineract Environment Variables Reference

Apache Fineract is configured entirely through environment variables that map to Spring Boot's application.properties. This page covers every supported variable, its default value, and what it does — sourced directly from the Fineract codebase.

This is the configuration surface you interact with whether you are running Fineract via Docker, Kubernetes, or a plain JAR. Understanding these variables is essential for any non-trivial deployment.

Running on Finecko?

Finecko manages all of this configuration for you. Database connection, SSL, tenant setup, and mode settings are pre-configured and maintained. You can skip the operational sections and focus on the tenant and feature flag variables that control business behaviour.

How variable resolution works

Each entry in application.properties follows the pattern:

spring.some.property=${ENV_VAR_NAME:default_value}

If ENV_VAR_NAME is set in the environment, that value is used. If not, the value after the colon is the default. Setting an env var to an empty string (ENV_VAR=) overrides the default with an empty value.


Database connection pool (FINERACT_HIKARI_*)

These variables configure the HikariCP connection pool that connects to the tenant store database (fineract_tenants). This is not the tenant data database - it is the metadata database that holds tenant registry entries.

VariableDefaultDescription
FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAMEorg.mariadb.jdbc.DriverJDBC driver class. Use org.postgresql.Driver for PostgreSQL.
FINERACT_HIKARI_JDBC_URLjdbc:mariadb://localhost:3306/fineract_tenantsJDBC URL for the tenant store. Change host, port, and DB name to match your setup.
FINERACT_HIKARI_USERNAMErootDatabase username.
FINERACT_HIKARI_PASSWORDmysqlDatabase password. Always override this in production.
FINERACT_HIKARI_MINIMUM_IDLE3Minimum number of idle connections maintained in the pool.
FINERACT_HIKARI_MAXIMUM_POOL_SIZE10Maximum total connections in the pool. Increase for high-concurrency deployments.
FINERACT_HIKARI_IDLE_TIMEOUT60000Time (ms) a connection can sit idle before being evicted.
FINERACT_HIKARI_CONNECTION_TIMEOUT20000Time (ms) to wait for a connection from the pool before throwing an exception.
FINERACT_HIKARI_TEST_QUERYSELECT 1Query used to validate connections.
FINERACT_HIKARI_AUTO_COMMITtrueWhether connections auto-commit transactions.
FINERACT_HIKARI_TRANSACTION_ISOLATIONTRANSACTION_REPEATABLE_READTransaction isolation level.

HikariCP data source properties (FINERACT_HIKARI_DS_PROPERTIES_*)

These are passed directly to the underlying JDBC driver. Most are MySQL/MariaDB-specific performance optimisations that have no effect on PostgreSQL.

VariableDefaultDescription
FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTStrueCache prepared statements on the client side.
FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE250Number of prepared statements cached per connection.
FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT2048Maximum length (chars) of a SQL statement eligible for caching.
FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTStrueUse server-side prepared statements (MySQL/MariaDB).
FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATEtrueTrack session state locally to avoid redundant round trips.
FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTStrueRewrite multi-row INSERT/UPDATE into a single statement for performance.
FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATAtrueCache result set metadata.
FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATIONtrueCache server configuration after the first connection.
FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITStrueSkip redundant SET autocommit calls.
FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATSfalseTrack timing statistics (minor overhead if enabled).
FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIEStrueLog queries that exceed the slow query threshold.
FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTIONtrueInclude the offending SQL in exception messages.

PostgreSQL note

The FINERACT_HIKARI_DS_PROPERTIES_* defaults are optimised for MySQL/MariaDB. When using PostgreSQL, set FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver and update the JDBC URL. Most DS_PROPERTIES_* vars will be silently ignored by the PostgreSQL driver.

PostgreSQL example:

bash
FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://db:5432/fineract_tenants
FINERACT_HIKARI_USERNAME=postgres
FINERACT_HIKARI_PASSWORD=yourpassword

MariaDB example:

bash
FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.mariadb.jdbc.Driver
FINERACT_HIKARI_JDBC_URL=jdbc:mariadb://db:3306/fineract_tenants
FINERACT_HIKARI_USERNAME=root
FINERACT_HIKARI_PASSWORD=yourpassword

Default tenant database (FINERACT_DEFAULT_TENANTDB_*)

These variables define the default tenant that Fineract creates on first startup. The tenant store (fineract_tenants) holds a registry of all tenants; these variables populate the first row in that registry and point to the actual tenant data database.

VariableDefaultDescription
FINERACT_DEFAULT_TENANTDB_HOSTNAMElocalhostHostname of the server hosting the tenant data database.
FINERACT_DEFAULT_TENANTDB_PORT3306Port of the tenant data database server. Use 5432 for PostgreSQL.
FINERACT_DEFAULT_TENANTDB_UIDrootUsername for the tenant data database.
FINERACT_DEFAULT_TENANTDB_PWDmysqlPassword for the tenant data database. Always override in production.
FINERACT_DEFAULT_TENANTDB_NAMEfineract_defaultName of the tenant data database.
FINERACT_DEFAULT_TENANTDB_IDENTIFIERdefaultUnique string identifier for this tenant. Used in the Fineract-Platform-TenantId header.
FINERACT_DEFAULT_TENANTDB_DESCRIPTIONDefault Demo TenantHuman-readable description stored in the tenant registry.
FINERACT_DEFAULT_TENANTDB_TIMEZONEAsia/KolkataBusiness timezone for this tenant. Affects loan schedule dates and interest posting.
FINERACT_DEFAULT_TENANTDB_CONN_PARAMS(empty)Additional JDBC connection parameters appended to the tenant DB connection string.
FINERACT_DEFAULT_TENANTDB_MASTER_PASSWORDfineractMaster password used for encrypting tenant credentials at rest. Change this before any data is written.

Read replica (optional)

Fineract supports pointing read operations at a separate read replica. All variables are empty by default (replica disabled).

VariableDefaultDescription
FINERACT_DEFAULT_TENANTDB_RO_HOSTNAME(empty)Read replica hostname. Leave empty to disable.
FINERACT_DEFAULT_TENANTDB_RO_PORT(empty)Read replica port.
FINERACT_DEFAULT_TENANTDB_RO_UID(empty)Read replica username.
FINERACT_DEFAULT_TENANTDB_RO_PWD(empty)Read replica password.
FINERACT_DEFAULT_TENANTDB_RO_NAME(empty)Read replica database name.
FINERACT_DEFAULT_TENANTDB_RO_CONN_PARAMS(empty)Additional connection parameters for the read replica.

Timezone default is Asia/Kolkata

FINERACT_DEFAULT_TENANTDB_TIMEZONE defaults to Asia/Kolkata because that is where the MifOS project originated. If you are deploying in any other region, set this explicitly or loan schedule dates and interest posting times will be incorrect.

Tenant connection pool sizing

VariableDefaultDescription
FINERACT_CONFIG_MIN_POOL_SIZE-1Minimum connection pool size per tenant. -1 means use HikariCP's default.
FINERACT_CONFIG_MAX_POOL_SIZE-1Maximum connection pool size per tenant. -1 means use HikariCP's default.

Server configuration

VariableDefaultDescription
FINERACT_SERVER_PORT8443Port Fineract listens on. HTTPS by default.
FINERACT_SERVER_SERVLET_CONTEXT_PATH/fineract-providerURL prefix for all API endpoints.
FINERACT_SERVER_SSL_ENABLEDtrueEnable/disable HTTPS. Set to false only in local development behind a TLS-terminating proxy.
FINERACT_SERVER_SSL_KEY_STOREclasspath:keystore.jksPath to the Java KeyStore file. Override with an absolute path for a production certificate.
FINERACT_SERVER_SSL_KEY_STORE_PASSWORDopenmfPassword for the KeyStore. Always override in production.
FINERACT_SERVER_COMPRESSION_ENABLEDtrueEnable HTTP response compression.
FINERACT_TIMEOUT_PER_SHUTDOWN30sGrace period for in-flight requests during shutdown.

Tomcat thread pool

VariableDefaultDescription
FINERACT_SERVER_TOMCAT_THREADS_MAX200Maximum Tomcat worker threads.
FINERACT_SERVER_TOMCAT_THREADS_MIN_SPARE10Minimum idle threads kept alive.
FINERACT_SERVER_TOMCAT_MAX_CONNECTIONS8192Maximum concurrent connections Tomcat will accept.
FINERACT_SERVER_TOMCAT_ACCEPT_COUNT100Queue length for incoming connections when all threads are busy.
FINERACT_SERVER_TOMCAT_MAX_HTTP_FORM_POST_SIZE2MBMaximum size for form POST requests.
FINERACT_SERVER_TOMCAT_MAX_KEEP_ALIVE_REQUESTS100Maximum keep-alive requests per connection.
FINERACT_SERVER_TOMCAT_ACCESSLOG_ENABLEDfalseEnable Tomcat access logging.
FINERACT_SERVER_TOMCAT_MBEANREGISTRY_ENABLEDfalseEnable Tomcat MBean registry (needed for JMX monitoring).

Node and operation mode

VariableDefaultDescription
FINERACT_NODE_ID1Integer identifier for this node. Must be unique across all instances in a multi-node deployment.
FINERACT_MODE_READ_ENABLEDtrueAllow this node to handle read (GET) API requests.
FINERACT_MODE_WRITE_ENABLEDtrueAllow this node to handle write (POST/PUT/DELETE) API requests. Also controls whether Liquibase migrations run on startup.
FINERACT_MODE_BATCH_WORKER_ENABLEDtrueAllow this node to execute batch job work (e.g. Loan COB).
FINERACT_MODE_BATCH_MANAGER_ENABLEDtrueAllow this node to schedule and partition batch jobs.
FINERACT_LIQUIBASE_ENABLEDtrueRun Liquibase migrations on startup. Set to false on worker nodes to skip migration checks.

Single-node default: all four modes are enabled on the same instance.

Multi-node pattern: run one manager node (BATCH_MANAGER=true, BATCH_WORKER=false) and one or more worker nodes (BATCH_MANAGER=false, BATCH_WORKER=true, LIQUIBASE_ENABLED=false). The manager node handles job scheduling; workers execute the partitions.

bash
# Manager node
FINERACT_NODE_ID=1
FINERACT_MODE_BATCH_MANAGER_ENABLED=true
FINERACT_MODE_BATCH_WORKER_ENABLED=false

# Worker node
FINERACT_NODE_ID=2
FINERACT_MODE_BATCH_MANAGER_ENABLED=false
FINERACT_MODE_BATCH_WORKER_ENABLED=true
FINERACT_LIQUIBASE_ENABLED=false

Security

Basic auth and general security

VariableDefaultDescription
FINERACT_SECURITY_BASICAUTH_ENABLEDtrueEnable HTTP Basic Authentication.
FINERACT_SECURITY_OAUTH_ENABLEDfalseEnable OAuth2 authentication (mutual exclusive with basic auth in practice).
FINERACT_SECURITY_2FA_ENABLEDfalseEnable two-factor authentication.
FINERACT_SECURITY_HSTS_ENABLEDfalseAdd HTTP Strict Transport Security headers. Enable when serving over public HTTPS.

CORS

VariableDefaultDescription
FINERACT_SECURITY_CORS_ENABLEDtrueEnable CORS support.
FINERACT_SECURITY_CORS_ALLOWED_ORIGIN_PATTERNS*Allowed origin patterns. Restrict to your frontend domain in production.
FINERACT_SECURITY_CORS_ALLOWED_METHODS*Allowed HTTP methods.
FINERACT_SECURITY_CORS_ALLOWED_HEADERS*Allowed request headers.
FINERACT_SECURITY_CORS_EXPOSED_HEADERS*Response headers exposed to the browser.
FINERACT_SECURITY_CORS_ALLOW_CREDENTIALStrueAllow cookies/auth headers in cross-origin requests.

Batch jobs (Loan COB)

VariableDefaultDescription
FINERACT_JOB_LOAN_COB_ENABLEDtrueEnable the Loan Close of Business batch job. Disable only if you are managing COB externally.
LOAN_COB_CHUNK_SIZE10Number of loans processed per chunk within a batch step.
LOAN_COB_PARTITION_SIZE10Number of loans per partition when distributing COB work across worker nodes.
LOAN_COB_POLL_INTERVAL1000Milliseconds between polling for new partitions on worker nodes.
FINERACT_JOB_STUCK_RETRY_THRESHOLD5Number of times a stuck job is retried before being marked as failed.

Remote job messaging

Fineract uses a message bus to dispatch batch jobs between the manager and worker nodes. Three transports are available: Spring Events (in-process, single JVM), JMS/ActiveMQ, and Kafka.

VariableDefaultDescription
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_SPRING_EVENTS_ENABLEDtrueUse in-process Spring events for job dispatch. Works for single-node deployments only.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_ENABLEDfalseUse JMS (ActiveMQ) for job dispatch.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_URLtcp://127.0.0.1:61616ActiveMQ broker URL.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_QUEUE_NAMEJMS-request-queueJMS queue name for job messages.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_USERNAME(empty)ActiveMQ username.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_JMS_BROKER_PASSWORD(empty)ActiveMQ password.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_ENABLEDfalseUse Kafka for job dispatch.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_BOOTSTRAP_SERVERSlocalhost:9092Kafka bootstrap server addresses.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_NAMEjob-topicKafka topic for job messages.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_PARTITIONS10Number of partitions for the job topic.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_REPLICAS1Replication factor for the job topic.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_TOPIC_AUTO_CREATEtrueAuto-create the Kafka topic if it does not exist.
FINERACT_REMOTE_JOB_MESSAGE_HANDLER_KAFKA_CONSUMER_GROUPIDfineract-consumer-group-idKafka consumer group ID for job workers.

Only one transport at a time

Enable exactly one of SPRING_EVENTS_ENABLED, JMS_ENABLED, or KAFKA_ENABLED. Enabling more than one will result in duplicate job execution.


External business events

Business events (e.g. LoanApprovedBusinessEvent, LoanDisbursalBusinessEvent) can be published to an external message broker for downstream integrations. Disabled by default.

VariableDefaultDescription
FINERACT_EXTERNAL_EVENTS_ENABLEDfalseEnable publishing of business events.
FINERACT_EXTERNAL_EVENTS_PARTITION_SIZE5000Batch size for event publishing.
FINERACT_EXTERNAL_EVENTS_PRODUCER_JMS_ENABLEDfalsePublish events to a JMS topic/queue.
FINERACT_EXTERNAL_EVENTS_PRODUCER_JMS_BROKER_URLtcp://127.0.0.1:61616ActiveMQ broker URL for event publishing.
FINERACT_EXTERNAL_EVENTS_PRODUCER_JMS_TOPIC_NAME(empty)JMS topic name. Set this or QUEUE_NAME.
FINERACT_EXTERNAL_EVENTS_PRODUCER_JMS_QUEUE_NAME(empty)JMS queue name.
FINERACT_EXTERNAL_EVENTS_KAFKA_ENABLEDfalsePublish events to Kafka.
FINERACT_EXTERNAL_EVENTS_KAFKA_BOOTSTRAP_SERVERSlocalhost:9092Kafka bootstrap servers for event publishing.
FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_NAMEexternal-eventsKafka topic for business events.
FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_PARTITIONS10Number of partitions for the events topic.
FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_REPLICAS1Replication factor for the events topic.
FINERACT_EXTERNAL_EVENTS_KAFKA_TOPIC_AUTO_CREATEtrueAuto-create the events topic if it does not exist.
FINERACT_EXTERNAL_EVENTS_KAFKA_TIMEOUT_IN_SECONDS10Timeout for Kafka produce calls.

Content and file storage

VariableDefaultDescription
FINERACT_CONTENT_FILESYSTEM_ENABLEDtrueStore uploaded files on the local filesystem.
FINERACT_CONTENT_FILESYSTEM_ROOT_FOLDER~/.fineractRoot directory for file uploads. Change to a persistent volume path in containerised deployments.
FINERACT_CONTENT_S3_ENABLEDfalseStore uploaded files in AWS S3 instead of the filesystem.
FINERACT_CONTENT_S3_BUCKET_NAME(empty)S3 bucket name.
FINERACT_CONTENT_S3_REGION(empty)AWS region for the S3 bucket.
FINERACT_CONTENT_S3_ACCESS_KEY(empty)AWS access key. Prefer IAM instance profiles where possible.
FINERACT_CONTENT_S3_SECRET_KEY(empty)AWS secret key.
FINERACT_CONTENT_S3_ENDPOINT(empty)Custom S3-compatible endpoint (for MinIO or other S3-compatible stores).
FINERACT_CONTENT_S3_PATH_STYLE_ADDRESSING_ENABLEDfalseUse path-style addressing instead of virtual-hosted. Required for MinIO and some S3-compatible stores.
FINERACT_MULTIPART_FILE_SIZE5MBMaximum size of an individual uploaded file.
FINERACT_MULTIPART_REQUEST_SIZE10MBMaximum size of a multipart HTTP request.
FINERACT_CONTENT_REGEX_WHITELIST_ENABLEDtrueValidate file names against an allowed regex list.
FINERACT_CONTENT_MIME_WHITELIST_ENABLEDtrueValidate file MIME types against an allowed list.

Feature flags

VariableDefaultDescription
FINERACT_MODULE_SELF_SERVICE_ENABLEDfalseEnable the self-service banking module (client-facing APIs).
FINERACT_MODULE_INVESTOR_ENABLEDtrueEnable the investor module.
FINERACT_MODULE_LOAN_ORIGINATION_ENABLEDtrueEnable the loan origination module.
FINERACT_USER_NOTIFICATION_SYSTEM_ENABLEDtrueEnable in-app user notification delivery.
FINERACT_JOB_LOAN_COB_ENABLEDtrueEnable the Loan Close of Business processing job.
FINERACT_JOB_JOURNAL_ENTRY_AGGREGATION_ENABLEDtrueEnable journal entry aggregation job.
FINERACT_IDEMPOTENCY_KEY_HEADER_NAMEIdempotency-KeyHTTP header name for idempotency keys on write requests.
FINERACT_CLIENT_IP_TRACKING_ENABLEDfalseTrack client IP addresses in audit logs.

Observability

VariableDefaultDescription
FINERACT_LOGGING_JSON_ENABLEDfalseOutput logs as structured JSON (useful when shipping to a log aggregator).
FINERACT_LOGGING_HTTP_CORRELATION_ID_ENABLEDfalseAttach a correlation ID to each request for distributed tracing.
FINERACT_LOGGING_HTTP_CORRELATION_ID_HEADER_NAMEX-Correlation-IDHTTP header used to carry the correlation ID.
FINERACT_STATEMENT_LOGGING_ENABLEDfalseLog every SQL statement executed. Only enable temporarily for debugging - very verbose.
FINERACT_SAMPLING_ENABLEDfalseEnable method-level performance sampling.
FINERACT_SAMPLING_RATE1000Sample one call per N invocations.
FINERACT_MANAGEMENT_CLOUDWATCH_ENABLEDfalsePublish metrics to AWS CloudWatch.
FINERACT_MANAGEMENT_METRICS_DISTRIBUTION_HTTP_SERVER_REQUESTSfalsePublish HTTP request percentile histograms to the metrics endpoint.
OTEL_SERVICE_NAMEfineractOpenTelemetry service name for distributed tracing.

Liquibase

VariableDefaultDescription
FINERACT_LIQUIBASE_ENABLEDtrueRun Liquibase schema migrations on startup. Set to false on worker nodes that should not perform migrations.

Quick reference: minimal production environment

The following is the minimum set of variables needed to run Fineract against PostgreSQL in production. All other settings use their defaults.

bash
# Database - tenant store
FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.postgresql.Driver
FINERACT_HIKARI_JDBC_URL=jdbc:postgresql://db:5432/fineract_tenants
FINERACT_HIKARI_USERNAME=postgres
FINERACT_HIKARI_PASSWORD=<strong-password>

# Database - tenant data
FINERACT_DEFAULT_TENANTDB_HOSTNAME=db
FINERACT_DEFAULT_TENANTDB_PORT=5432
FINERACT_DEFAULT_TENANTDB_UID=postgres
FINERACT_DEFAULT_TENANTDB_PWD=<strong-password>
FINERACT_DEFAULT_TENANTDB_TIMEZONE=UTC

# Security
FINERACT_DEFAULT_TENANTDB_MASTER_PASSWORD=<strong-master-password>
FINERACT_SERVER_SSL_KEY_STORE=/etc/ssl/fineract/keystore.jks
FINERACT_SERVER_SSL_KEY_STORE_PASSWORD=<keystore-password>
FINERACT_SECURITY_CORS_ALLOWED_ORIGIN_PATTERNS=https://your-app.example.com

# Node
FINERACT_NODE_ID=1