Blnk relies on PostgreSQL and Redis to run core ledger operations, and can optionally use TypeSense for search and indexing. This page explains the settings used to connect and tune each service.Documentation Index
Fetch the complete documentation index at: https://docs.blnkfinance.com/llms.txt
Use this file to discover all available pages before exploring further.
Database settings
Use these settings to configure Blnk’s PostgreSQL connection and connection pool.Note: Blnk only supports PostgreSQL as its database engine. You cannot use other database engines like MySQL or SQLite with Blnk.
| Description | Default | |
|---|---|---|
BLNK_DATA_SOURCE_DNS | PostgreSQL connection string used by Blnk. This is required. | None |
BLNK_DATABASE_MAX_OPEN_CONNS | Maximum number of open database connections in the pool. | 25 |
BLNK_DATABASE_MAX_IDLE_CONNS | Maximum number of idle database connections kept ready. | 10 |
BLNK_DATABASE_CONN_MAX_LIFETIME | Maximum amount of time a database connection can be reused before it is recycled. | 30m |
BLNK_DATABASE_CONN_MAX_IDLE_TIME | Maximum amount of time an idle database connection is kept before it is recycled. | 5m |
BLNK_DATA_SOURCE_DNS
This is the PostgreSQL connection string Blnk uses to connect to its database. This setting is required. Blnk will not start without it.
- Make sure the database is reachable from the environment where Blnk is running. This includes verifying the hostname, port, credentials, and network access rules before starting the server.
-
You should also make sure the
sslmodein the connection string matches what your database provider expects. If this is set incorrectly, Blnk may fail to connect even when the rest of the connection string is valid.
Best practices
- Always set
BLNK_DATA_SOURCE_DNSexplicitly. - Start with the default pool settings unless you already know your database limits.
- Increase
BLNK_DATABASE_MAX_OPEN_CONNSonly if your PostgreSQL instance can handle more concurrent connections. - Use the connection lifetime and idle time settings to recycle stale connections in long-running deployments.
Redis configuration
| Description | Default | |
|---|---|---|
BLNK_REDIS_DNS | Redis address or connection URL used by Blnk. This is required. | None |
BLNK_REDIS_SKIP_TLS_VERIFY | Disables TLS certificate verification for Redis connections. | false |
BLNK_REDIS_DNS
BLNK_REDIS_DNS is the Redis address or connection URL Blnk uses for queueing and coordination. This setting is required.
Why? Because Blnk uses Redis for distributed balance locks, transaction and webhook queues, hot-pair state, and other worker coordination. If Redis is unavailable, queue processing and lock coordination are affected even if PostgreSQL is healthy.
BLNK_REDIS_SKIP_TLS_VERIFY
This disables certificate verification for TLS Redis connections.
Only set to true when you are working in a controlled environment and understand the risk. Disabling certificate verification weakens transport security and should not be the default for production deployments.
Typesense configuration
Use these settings to enable Blnk search and indexing via Typesense.| Description | Default | |
|---|---|---|
BLNK_TYPESENSE_DNS | TypeSense server address. If unset, Blnk disables search and indexing features via Typesense. | Disabled when unset |
BLNK_TYPESENSE_KEY | API key used to connect to TypeSense. | blnk-api-key |