Configure server runtime, secure mode, request size limits, tokenization, and rate limiting in Blnk.
This page covers the configuration used to control how the Blnk server listens for requests, protects access to the API, and enables tokenization for sensitive identity fields.
This controls whether API authentication is enforced when you make requests to the server. When set to false, Blnk skips authentication checks.When set to true, requests must authenticate via X-Blnk-Key header using one of the following:
This is required for any secure Blnk deployment. It is used in two places in Blnk:
As the master API key for authenticated requests to the server
As the HMAC signing secret for outgoing webhooks and hook callbacks.
Webhook security
Signature verification for webhook consumers.
This means the same secret affects both request authentication and webhook signature validation on systems receiving Blnk webhooks.
Make sure to keep BLNK_SERVER_SECRET_KEY out of version control. Store it in a secret manager or inject it through environment variables in production.
When monitoring export is enabled, Blnk serves Prometheus metrics at GET /metrics on the API port and on the worker monitoring port. Set metrics_bearer_token to require Authorization: Bearer <token> on scrape requests.
server.secure
Token set
/metrics access
false
no
Open
false
yes
Bearer required
true
yes
Bearer required
true
no
Blocked
The same rules apply on the worker monitoring port. Auth failures return structured JSON — see API error codes.
Tokenization is only enabled when BLNK_TOKENIZATION_SECRET is set and is exactly 32 bytes long. If the secret is missing, tokenization is disabled. If the secret is set but not 32 bytes long, Blnk does not fail startup, but tokenization operations may fail when called.When enabled, Blnk uses this secret for AES-GCM encryption in standard tokenization and HMAC-based seeding for format-preserving tokenization.
Note: Store this secret securely and keep it stable for each environment. If you change it after data has already been tokenized, previously tokenized values may no longer detokenize correctly.
400 Bad Request with GEN_MALFORMED_REQUEST and message "http: request body too large".
Multipart uploads
BLNK_SERVER_MAX_UPLOAD_SIZE_MB
Upload rejected.
These size limits are separate from per-endpoint item limits. A request can be within the item-count limit and still exceed the body-size limit.For example, a bulk transaction request with the accepted count may exceed 5 MB if each transaction contains large metadata or long field values.
If both BLNK_RATE_LIMIT_RPS and BLNK_RATE_LIMIT_BURST are unset, Blnk applies its built-in defaults.If you set only one of those two values, Blnk derives the other automatically:
if only BLNK_RATE_LIMIT_RPS is set, burst defaults to 2 * RPS
if only BLNK_RATE_LIMIT_BURST is set, requests_per_second defaults to burst / 2
Tip: Start with the defaults unless you have a clear traffic policy or abuse-prevention requirement.
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.