The Blnk Query Agent provides secure, read-only access to your database from Blnk Cloud. Get up and running in minutes with Docker.
Before you begin, ensure you have:
Create a dedicated read-only user in your PostgreSQL database. This user should have SELECT permissions on the tables that Blnk needs to access.
Security Note: The agent only requires read access. Never use administrative credentials.
Run the official Docker image with your configuration:
docker run -d \
--name blnk-agent \
-e DB_URL="postgres://readonly:[email protected]:5432/mydb?sslmode=require" \
-e CONNECTION_KEY="your-api-key-here" \
blnkfinance/query-agent:latest
Check that everything is working:
# View container status
docker ps | grep blnk-agent
# Check connection logs
docker logs blnk-agent --tail 20
# Test health endpoint
curl http://localhost:9090/health
✅ Success Response:
{"status": "healthy", "database": "connected", "websocket": "connected"}
| Variable | Description | Format |
|---|---|---|
DB_URL | PostgreSQL connection string | postgres://user:pass@host:port/db?sslmode=require |
CONNECTION_KEY | Your Blnk API key | sk_live_... or sk_test_... |
macOS & Windows:
-e DB_URL="postgres://user:[email protected]:5432/db?sslmode=require"
Linux:
--network host \
-e DB_URL="postgres://user:pass@localhost:5432/db?sslmode=require"
Ensure your database accepts connections from your Docker host's public IP. Most cloud providers require you to whitelist IP addresses in their firewall settings.
# Pull latest version
docker pull blnkfinance/query-agent:latest
# Restart with new image
docker stop blnk-agent && docker rm blnk-agent
# Stop the agent
docker stop blnk-agent
# Remove container
docker rm blnk-agent
# Clean up (optional)
docker image prune -f
Content type
Image
Digest
sha256:2e34fb5c9…
Size
4.4 MB
Last updated
about 1 year ago
docker pull blnkfinance/query-agent