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.
In
blnk.json, conn_max_lifetime and conn_max_idle_time are integer seconds. Environment variables accept Go duration format (e.g. 30m, 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
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.In
blnk.json, backpressure_retry_interval is a duration in nanoseconds (for example 5000000000 for 5s). The environment variable accepts Go duration format (for example 5s). Omit the field to use the default.
Set Typesense memory limits on the Typesense service itself, not in Blnk:
typesense.env