Deployment guide
There are two ways to self-host Blnk Core in your environment: via Docker or Kubernetes.- Docker
- Kubernetes
- Managed PostgreSQL instance
- Managed Redis instance
- Docker or k8s installed
- Linux server (Ubuntu 20.04 LTS or newer recommended)
Set up your configuration file
blnk.json file or environment variables.For more options, go to Blnk Configuration.Create a 'docker-compose.yml' file
docker-compose.yml file in the Blnk repository.redis and postgres services from your docker-compose.yaml file.Back-office management
Once your Blnk Core is deployed in your own environment, you can connect it to a Blnk Cloud account to operate your ledger from a back-office dashboard.
Connect Core to Blnk Cloud
Monitoring
Setting up monitoring
We recommend connecting to Blnk Cloud to set up monitoring for your Core in less than 5 minutes. See Quick setup: Blnk Cloud. To manually export logs, traces, and metrics for your local deployment:Enable observability in Core
"enable_observability": true in blnk.json, then restart server and worker after you finish the compose changes below.Add Jaeger and Prometheus services
docker-compose.yaml to include Jaeger and Prometheus. This example extends the base compose with trace export on server and worker:Start or restart the stack
docker compose --profile monitoring up -d to start Core, Jaeger, and Prometheus together.Open Jaeger at http://localhost:16686 and Prometheus at http://localhost:9090 to confirm data is flowing.To learn more, see Monitoring in Blnk.Troubleshooting
Use this guide to troubleshoot your deployment when Blnk fails to start or you experience errors in your deployment.Server fails to start or cannot reach PostgreSQL
Server fails to start or cannot reach PostgreSQL
data_source or BLNK_DATA_SOURCE_DNS.Verify your connection string
BLNK_DATA_SOURCE_DNS (or data_source.dns in blnk.json) includes the correct host, port, database name, user, and password.Set sslmode to match your provider; most managed Postgres instances require sslmode=require.See Database settings.Check network access
Migrations fail on startup
Migrations fail on startup
blnk migrate up.The Docker Compose example runs migrations before starting the API (blnk migrate up && blnk start). Migration failures prevent the server from listening on port 5001.Confirm database permissions
CREATE and ALTER privileges on the blnk database (or your chosen database name).Inspect migration logs
Transactions stay queued or workers are idle
Transactions stay queued or workers are idle
QUEUED; the worker container restarts or logs Redis connection errors.Workers depend on Redis for queueing and coordination. The server and worker must share the same Redis and queue configuration.Verify Redis connectivity
BLNK_REDIS_DNS (or redis.dns in blnk.json) points at your managed Redis instance. Include the password in the URL when required:rediss:// and review Redis configuration.Confirm the worker is running
server and worker services must be up:Check queue health
BLNK_QUEUE_MONITORING_PORT (default 5004), open the monitoring dashboard or probe the endpoint:API is unreachable or containers keep restarting
API is unreachable or containers keep restarting
docker ps shows a restarting server or worker container; requests to port 5001 time out.Review container status
Confirm port exposure
5001 is published in docker-compose.yaml and allowed through your host firewall and cloud security groups.curl http://localhost:5001/health (or your health endpoint) should respond when the server is healthy.Validate configuration is loaded
blnk.json, confirm the file is mounted into both server and worker containers. When using environment variables, set them on both services—mismatched config between server and worker causes subtle queue issues.See Blnk configuration.