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.
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.
BLNK_DATA_SOURCE_DNS="postgres://user:pass@postgres:5432/blnk?sslmode=disable"
BLNK_DATABASE_MAX_OPEN_CONNS=25
BLNK_DATABASE_MAX_IDLE_CONNS=10
BLNK_DATABASE_CONN_MAX_LIFETIME=30m
BLNK_DATABASE_CONN_MAX_IDLE_TIME=5m
| 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
sslmode in 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.
Some hosted PostgreSQL providers expose more than one connection URL. For application workloads, use the direct PostgreSQL connection string that is intended for normal client connections.
Best practices
- Always set
BLNK_DATA_SOURCE_DNS explicitly.
- Start with the default pool settings unless you already know your database limits.
- Increase
BLNK_DATABASE_MAX_OPEN_CONNS only 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
BLNK_REDIS_DNS=redis://:password@redis:6379/0
BLNK_REDIS_SKIP_TLS_VERIFY=false
| 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.
Use a full Redis URL when authentication or TLS is involved. For TLS-enabled Redis connections, make sure the URL starts with rediss://.
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.
BLNK_TYPESENSE_DNS=http://typesense:8108
BLNK_TYPESENSE_KEY=blnk-api-key
| 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 |
When to use Typesense
TypeSense is optional. If it is not configured, Blnk starts just fine, but search and indexing features via Typesense are disabled.
For most search use cases, start with the Direct DB filter API. It is a better fit when you need precise database-backed filtering, sorting, and pagination without running a separate search service.
Use Typesense when you need full-text search, faceted filtering, faster queries across very large datasets, or search-oriented workflows that benefit from a dedicated index.
Tip: If you are using TypeSense, we recommend BLNK_TYPESENSE_KEY explicitly instead of relying on the default key.
Need help?
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.
To ask questions or discuss issues, please contact us or join our Discord community.
Tip: Connect to Blnk Cloud to see your Core data.You can view your transactions, manage identities, create custom reports, invite other team members to collaborate, and perform operations on your Core — all in one dashboard.Check out Blnk Cloud →