The Fireblocks Agent connects your Fireblocks Key Link workspace to the system that holds your keys. It receives signing requests from Fireblocks, forwards them to your Customer Server, and returns the signed results to Fireblocks.
This is source-available software, not open source. The source is published so that customers can install, run and audit it, but it remains Fireblocks' proprietary software. Use is governed by the Fireblocks Key Link Agent Licence. See Licence below.
- What the Agent is
- KeyLink Flow
- Requirements
- Production deployment
- Configuration
- Message delivery and reliability
- Transport modes
- Customer Server contract
- Operations
- Troubleshooting
- Develop locally
- Reporting a security issue
- Licence
The Agent is a lightweight relay that you run on your own infrastructure.
- It holds no keys and does no signing. Signing happens in your Customer Server, backed by your HSM or key management system.
- It verifies every request before forwarding it. The Agent checks the Fireblocks signatures on each request against the Fireblocks service certificates. A request that fails verification is discarded and never reaches your Customer Server.
- It connects outbound only. The Agent opens connections to Fireblocks and to your Customer Server. It listens on no port and exposes no API of its own.
Fireblocks (Mobile API Gateway) <--- outbound HTTPS / WSS --- Fireblocks Agent --- HTTP(S) ---> Customer Server ---> HSM
The Customer Server is one of the following:
- KeyLink Flow, the customer-hosted key management and signing orchestration service that Fireblocks provides as a companion to Key Link. See KeyLink Flow.
- Your own server, built against the Customer Server API. See Customer Server contract.
The diagram shows the default WebSocket transport, where Fireblocks pushes requests to the Agent. With HTTP long-polling, the Agent retrieves them instead; the rest of the flow is the same. See Transport modes.
| Actor | Role |
|---|---|
| Console | The Fireblocks web console. |
| Mobile API Gateway | The Fireblocks endpoint the Agent connects to, for pairing and for receiving and answering requests. |
| Developer API | The Fireblocks API used for workspace setup and configuration. |
| Fireblocks Agent | This service. Relays requests between Fireblocks and your Customer Server. |
| Customer Server | Your server, or KeyLink Flow. Signs requests through your HSM. |
| HSM | Your HSM or key management system, on premises or in the cloud. |
KeyLink Flow is the companion to Fireblocks Key Link: a customer-hosted key management and signing orchestration service that connects your HSM to Fireblocks, in hot or air-gapped cold mode, so you deploy the integration instead of building it. It runs in your own environment, with a web console, and acts as your Customer Server: instead of building and maintaining your own server against the Customer Server API, you deploy KeyLink Flow next to the Agent and connect it to your HSM.
What KeyLink Flow provides:
- Hot mode: one server, connected to the Agent and to your HSM, signs requests as they arrive or after an operator approves them.
- Cold mode: an online server receives requests and an air-gapped offline server signs them with your HSM. Requests and signatures move between the two as files, so the offline server and your HSM have no connection to Fireblocks or the online environment.
- Key management: create and manage your validation and signing keys in your HSM, ready to register with Fireblocks. On Thales Luna HSMs, derive signing keys from master keys to scale to large numbers of keys.
- HSM support: works with any HSM that supports the PKCS#11 interface, with ready-made configurations for Thales Luna.
- Operator console: a web console to monitor and approve signing requests and manage keys.
- Business continuity: in Hot mode, sign and broadcast transactions when Fireblocks is unreachable.
KeyLink Flow is available to Fireblocks Key Link customers. To get access, contact your Customer Success Manager (CSM).
| Requirement | Detail |
|---|---|
| Container runtime | Docker or any runtime that runs a standard image. The Dockerfile builds on node:24.22.1-alpine. |
| Node.js (source runs only) | Node.js 24.22.1, as pinned in .nvmrc. Needed only if you run the Agent outside the container. |
| Outbound to Fireblocks | HTTPS and WebSocket Secure (WSS) on port 443 to MOBILE_GATEWAY_URL. In production this is https://mobile-api.fireblocks.io. |
| Outbound to your Customer Server | HTTPS to CUSTOMER_SERVER_URL. The Agent refuses http:// unless ALLOW_INSECURE_CUSTOMER_SERVER=true (local development only). |
| Inbound | None. Open no inbound ports for the Agent. |
| Fireblocks setup | A Key Link workspace and an Agent API user with a pairing token. See Workspace setup flows. |
Always deploy a tagged release, never a branch.
git clone https://github.com/fireblocks/fireblocks-agent.git
cd fireblocks-agent
git checkout <release-tag> # for example 2.4.3
docker build -t fireblocks-agent:<release-tag> .If your build host cannot reach the public npm registry, pass your own registry or mirror: docker build --build-arg NPM_REGISTRY=<registry-url> -t fireblocks-agent:<release-tag> .
What the image does, as defined in the Dockerfile:
- Builds with
node:24.22.1-alpine, pinned by digest:npm ci,npm run build, then removes development dependencies. Node 24.22.1 is one of the October 2026 security releases that remove the compromised eMudhra intermediate CAs. - Copies only
dist, the productionnode_modules,package.jsonand.env.prodinto the final image, in/app. - Installs
tinias the init process and starts the Agent withnode dist/index.jsas the container's main process. If the Agent exits, the container stops with the Agent's exit code and your restart policy applies. - Runs as the non-root
nodeuser (UID 1000)./app, the code and its dependencies belong to root, so the Agent cannot change them. Only/app/logs(log files,LOG_DIR) and/app/data(an interactively paired device's credentials,DEVICE_DATA_PATH) belong to UID 1000 and to group0with the same permissions, so the image also runs as the random user ID in group0that Red Hat OpenShift assigns. - Exposes no ports and defines no health check.
Pairing exchanges a one-time pairing token for the Agent's device credentials: a JSON document with userId, deviceId and refreshToken. Pair once, then reuse the credentials for every later start.
-
Create the Agent API user and get its pairing token. See Workspace setup flows.
-
Start a temporary container with an interactive terminal. The image runs the Agent directly, so the pairing prompt is attached to your terminal:
docker run -it --name fireblocks-agent-pairing -e NODE_ENV=prod fireblocks-agent:<release-tag>
-
At the
Enter pairing tokenprompt, paste the pairing token. Wait forGreat! your device is now paired!. -
In a second terminal, copy the credentials file out of the container, then remove the container:
docker cp fireblocks-agent-pairing:/app/data/.fireblocks-refresh-token ./device-data.json docker rm -f fireblocks-agent-pairing
-
Store the contents of
device-data.jsonin your secrets manager (for example HashiCorp Vault, AWS Secrets Manager or Google Secret Manager). Then delete the local file.
The credentials file is a bearer credential: anyone who holds it can act as your Agent. The refresh token does not rotate, so the stored value stays valid across restarts and upgrades.
For a one-time job (for example a Kubernetes Job), the Agent can pair without a prompt. Put the pairing token in a file and run dist/pair.js. The container runs as your own user ID in group 0 (--user), so it can write to the mounted out directory on Linux, and the result belongs to you:
mkdir -p out
docker run --rm --user "$(id -u):0" \
-v "$PWD/pairing-token:/run/secrets/pairing-token:ro" \
-v "$PWD/out:/out" \
-e NODE_ENV=prod \
-e PAIRING_TOKEN_FILE=/run/secrets/pairing-token \
-e DEVICE_DATA_OUTPUT_FILE=/out/device-data.json \
fireblocks-agent:<release-tag> node dist/pair.jsIt pairs, writes the credentials as JSON to DEVICE_DATA_OUTPUT_FILE (readable by its owner only), and exits: 0 when paired, 1 when pairing failed, 2 when a setting or file is wrong (nothing is sent to Fireblocks). It refuses to overwrite an existing output file, writes nothing else, and logs neither the token nor the refresh token. A pairing token is valid for one hour after it is issued.
Inject the stored credentials as the FB_DEVICE_DATA environment variable from your secrets manager, or mount them as a file and set FB_DEVICE_DATA_FILE to its path (for example a Kubernetes Secret mounted as a file), which keeps them out of the container's environment. The Agent then starts already paired, with no prompt and nothing written to disk. It logs only that it used the variable, never its value.
# FB_DEVICE_DATA is already in the shell environment, loaded from your secrets manager.
docker run -d --name fireblocks-agent \
--restart unless-stopped \
-e NODE_ENV=prod \
-e CUSTOMER_SERVER_URL=https://customer-server.example.internal/api \
-e CUSTOMER_SERVER_CA_FILE=/run/customer-server-ca/ca.crt \
-v /etc/keylink/ca.crt:/run/customer-server-ca/ca.crt:ro \
-e CUSTOMER_SERVER_AUTHORIZATION \
-e FB_DEVICE_DATA \
fireblocks-agent:<release-tag>- Never put
FB_DEVICE_DATAin a committed.envfile or on a command line. Pass it by name, as above, or through your orchestrator's secret mechanism (for example a Kubernetes Secret synced from your secrets manager). - Set
CUSTOMER_SERVER_URLto the server'shttps://address, the name its certificate covers. The shipped.env.prodpoints it athttps://localhost:5000/api, which inside a container is the container itself. - Trust the server's CA. When a private CA issued the server's certificate (for KeyLink Flow's development certificate,
customer-server/dev-tls/ca.crt), mount that CA certificate and setCUSTOMER_SERVER_CA_FILEto it, as above. Leave it out for a certificate from a public CA. - Set a restart policy (
--restart unless-stopped, orrestartPolicy: Alwaysin Kubernetes). The Agent is the container's main process, so when it exits the container stops, and without a restart policy it stays stopped. - Monitor the container state. The Agent exits on an uncaught error, and at startup if it is not paired and has no interactive terminal. The container then stops, so a rising restart count (or
CrashLoopBackOffin Kubernetes) is the signal. The reason is in the container log (docker logs). - The container runs as a non-root user. The image runs as
node(UID 1000), which owns/app/logs(log files) and/app/data(pairing credentials); everything else in/appbelongs to root. Files you mount, such as theCUSTOMER_SERVER_CA_FILEcertificate or the credentials file (/app/data/.fireblocks-refresh-token), must be readable by UID 1000:chownthem, or pass the credentials inFB_DEVICE_DATAinstead. To keep log files or interactively paired credentials across container replacements, mount volumes at/app/logsor/app/data(for example-v fireblocks-agent-data:/app/data); a volume must be writable by UID 1000. If you override the user (docker run --user, or a KubernetessecurityContext), that user needs write access to/app/logsand/app/data, which any user in group0has. - Read-only root filesystem. The Agent writes log files to
LOG_DIR(/app/logsin the image) by default. With a read-only root filesystem, setLOG_TO_FILE=falseto log to the console only, or setLOG_DIRto a mounted volume, and supply the credentials withFB_DEVICE_DATA_FILEorFB_DEVICE_DATA. The Agent then writes nothing to the image.
The Helm chart in deploy/helm/fireblocks-agent runs the Agent under OpenShift's default restricted-v2 policy, with the credentials in Secrets mounted as files, and pairs it once with a Job instead of steps 2 and 3 above. It works with any Customer Server.
These flows happen once, in your Fireblocks workspace and your HSM. Only pairing involves the Agent.
You add a validation key once. Fireblocks uses it to approve new signing keys. You add it through the Fireblocks API, not through the Agent.
Convert each signing key into a certificate signed by an active validation key. Then register the signed certificates with Fireblocks through the API or the Console.
The Agent reads its configuration from environment variables. It also loads the file .env.<NODE_ENV> from the project root, for example .env.prod when NODE_ENV=prod. A variable already set in the environment takes precedence over the same variable in the file.
| Variable | Default | Description |
|---|---|---|
MOBILE_GATEWAY_URL |
None (.env.prod: https://mobile-api.fireblocks.io) |
The Fireblocks Mobile API Gateway. Use https://mobile-api.fireblocks.io in production. |
CUSTOMER_SERVER_URL |
None (.env.prod: https://localhost:5000/api) |
Base URL of your Customer Server, https://. The Agent calls <CUSTOMER_SERVER_URL>/messagesToSign and <CUSTOMER_SERVER_URL>/messagesStatus. An http:// URL, a missing URL or another scheme stops the Agent at startup (exit status 2). |
ALLOW_INSECURE_CUSTOMER_SERVER |
false |
true allows an http:// CUSTOMER_SERVER_URL, for local development only: signing requests and the Authorization header then cross the network unencrypted, and the Agent logs a warning. Only true or false. |
CUSTOMER_SERVER_AUTHORIZATION |
None | If set, the Agent sends this value in the Authorization header of every Customer Server call. Use it to authenticate the Agent or to tell several Agents apart. Treat it as a secret. |
CUSTOMER_SERVER_CA_FILE |
None | PEM file with the CA certificate (or several) that issued your Customer Server's certificate, for a private CA or a self-signed certificate. Trusted in addition to the default CA certificates (Node's bundled ones and NODE_EXTRA_CA_CERTS), for the calls to the Customer Server only. A file that cannot be read or holds no certificate stops the Agent at startup. Old name: SSL_CERT_PATH, still accepted with a deprecation warning; setting both is an error. The Agent's connections to Fireblocks always use the default CA certificates. |
FB_DEVICE_DATA |
None | The Agent's device credentials as JSON with userId, deviceId and refreshToken, so the Agent starts already paired. If the value is not valid JSON, lacks a field, or has a userId or deviceId that is not a GUID, the Agent logs the problem (never the value), ignores the variable and falls back to the credentials file, then to the pairing prompt. Supply it only from a secrets manager. |
FB_DEVICE_DATA_FILE, CUSTOMER_SERVER_AUTHORIZATION_FILE |
None | Path to a file holding FB_DEVICE_DATA or CUSTOMER_SERVER_AUTHORIZATION, for example a Kubernetes Secret mounted as a file. The file is read once at startup and surrounding whitespace is removed. A value from a file takes precedence over the same variable in .env.<NODE_ENV>. Setting both a variable and its _FILE variant in the environment, or naming a file that cannot be read or is empty, stops the Agent at startup with an error that names the setting, never the value. |
NODE_ENV |
None | Selects the .env.<NODE_ENV> file to load. |
LOG_DIR |
The working directory (/app/logs in the image) |
Directory for the info-<date>.log files. |
DEVICE_DATA_PATH |
.fireblocks-refresh-token next to the code, in dist/ (/app/data/.fireblocks-refresh-token in the image) |
The file where the Agent stores an interactively paired device's credentials and reads them at startup. If this file does not exist but dist/.fireblocks-refresh-token does (written by an earlier version), the Agent reads that one and logs a warning to move it. FB_DEVICE_DATA and FB_DEVICE_DATA_FILE take precedence over it. |
LOG_TO_FILE |
true |
Set to false, 0, no or off to log to the console only, for example with a read-only root filesystem. |
HEARTBEAT_FILE |
None | Path of a heartbeat file for a liveness check. While the connection loop to Fireblocks makes progress (each connection attempt, the WebSocket opening, each answered keep-alive ping, each long poll), the Agent writes the current time to it, in whole seconds since the epoch, at most every 5 seconds. A check that finds the time older than a few minutes can restart the Agent. A failing connection attempt still counts as progress, so an outage at Fireblocks or at a proxy does not make the file go stale. Unset, nothing is written. The Helm chart sets it for its liveness probe. |
| Variable | Default | Description |
|---|---|---|
HTTPS_PROXY |
None | Proxy for the connections to Fireblocks, for example http://proxy.example.com:3128. The REST calls, the signing WebSocket and pairing all use it. The Agent opens a CONNECT tunnel through the proxy, so TLS to Fireblocks stays end to end. A user name and password in the URL are sent to the proxy as basic authentication. |
HTTP_PROXY |
None | The same, for an http:// MOBILE_GATEWAY_URL (test setups only). |
NO_PROXY |
None | Comma-separated hosts or domain suffixes (.example.com) that go direct. |
HTTPS_PROXY_FILE, HTTP_PROXY_FILE |
None | Path to a file holding the proxy URL, for a URL with credentials, read like the other _FILE settings. |
NODE_EXTRA_CA_CERTS |
None | Node's own setting: a PEM file of extra CA certificates to trust, for example the root CA of a proxy that inspects TLS. The default CA certificates stay trusted, and certificate checks are never turned off. |
The lower-case names (https_proxy, no_proxy) work too. Leave Node's own NODE_USE_ENV_PROXY unset: the Agent applies the proxy itself, only to its connections to Fireblocks. The proxy is only for Fireblocks: the Agent always calls your Customer Server directly, so signing requests never pass through it. The proxy must allow CONNECT to port 443 of the MOBILE_GATEWAY_URL host (mobile-api.fireblocks.io in production) and keep the tunnel open: the WebSocket runs inside it for as long as the Agent is connected. A proxy that inspects TLS must also pass WebSocket upgrades through. The startup log shows the route, never the credentials: Fireblocks URL: https://mobile-api.fireblocks.io, through the proxy http://proxy.example.com:3128.
| Variable | Default | Description |
|---|---|---|
WEBSOCKET_ENABLED |
true |
Message transport. Any of false, 0, no or off (any case, surrounding spaces ignored) selects HTTP long-polling. Any other value, including blank or unset, keeps the WebSocket transport. See Transport modes. |
WS_PING_INTERVAL_MS |
30000 |
WebSocket keep-alive ping interval. If no pong or other traffic arrives within one interval, the Agent closes the connection and reconnects. |
WS_OPEN_TIMEOUT_MS |
10000 |
Time allowed for the WebSocket handshake to complete before the Agent abandons the attempt and retries. |
WS_CONNECT_TIMEOUT_MS |
60000 |
Time allowed for a whole WebSocket connection attempt, including the access-token request that precedes it. Keep it above FB_HTTP_TIMEOUT_MS; the Agent logs a warning at startup if it is not. |
WS_MAX_PAYLOAD_BYTES |
1048576 (1 MiB) |
Largest single WebSocket frame the Agent accepts from Fireblocks. |
FB_HTTP_TIMEOUT_MS |
30000 |
Deadline for short HTTP calls to Fireblocks: access token, pairing, service certificates, acknowledgements and HTTP responses. |
FB_LONG_POLL_TIMEOUT_MS |
90000 |
Deadline for one long-poll request. Applies only when WEBSOCKET_ENABLED is off. |
| Variable | Default | Description |
|---|---|---|
CUSTOMER_SERVER_PULL_CADENCE_MS |
30000 |
Interval between messagesStatus calls for requests that are still pending. |
CUSTOMER_SERVER_TIMEOUT_MS |
30000 |
Deadline for each messagesStatus call. |
CUSTOMER_SERVER_SIGN_TIMEOUT_MS |
120000 |
Deadline for each messagesToSign call. Longer than the status deadline because signing waits on your HSM. |
AGENT_REQUESTS_CACHE_SIZE |
2048 (.env.prod: 1024) |
Number of in-flight requests the Agent keeps in memory. When the cache is full, the oldest entry is dropped. See Message delivery and reliability. |
BROADCAST_BATCH_SIZE |
30 |
Number of final responses the Agent sends to Fireblocks before it waits for them, and their acknowledgements, to complete. |
CUSTOMER_SERVER_TIMEOUT_MS, CUSTOMER_SERVER_SIGN_TIMEOUT_MS and the FB_* and WS_* numeric values fall back to their defaults when they are not positive numbers. CUSTOMER_SERVER_PULL_CADENCE_MS, AGENT_REQUESTS_CACHE_SIZE and BROADCAST_BATCH_SIZE are used as given: set them to positive whole numbers, or leave them unset to use the default. A blank value or 0 is not replaced by the default; a blank or 0 CUSTOMER_SERVER_PULL_CADENCE_MS, for example, makes the Agent poll your Customer Server continuously.
Delivery is at-least-once. Fireblocks can deliver the same request to the Agent more than once, and the Agent can forward the same request to your Customer Server more than once. Your Customer Server is responsible for de-duplication.
- Fireblocks delivers a request. The Agent verifies its signatures.
- The Agent sends it to your Customer Server (
messagesToSign). - While the status is
PENDING_SIGN, the Agent keeps the request in its in-memory cache and pollsmessagesStatus. - When the status reaches
SIGNEDorFAILED, the Agent sends the response to Fireblocks and acknowledges the request.
The Agent acknowledges a request only when it reaches SIGNED or FAILED. A request that is still pending, or whose messagesToSign call failed or timed out, stays unacknowledged, and Fireblocks delivers it again.
The Agent also acknowledges, and discards, requests that fail signature verification and requests of an unknown type. These never reach your Customer Server.
| Situation | What happens |
|---|---|
| WebSocket closes or reconnects | Unacknowledged requests return to the queue immediately and are delivered again on the next connection. Fireblocks refreshes each socket every 15 minutes, so this happens during normal operation. |
HTTP long-poll (WEBSOCKET_ENABLED=false) |
Unacknowledged requests are redelivered only after the 90-minute acknowledgement timeout. Restarting the Agent does not shorten this. |
| Agent restart | The in-flight cache lives in memory and is lost. Unacknowledged requests are delivered and forwarded to your Customer Server again. |
| Cache full | When more than AGENT_REQUESTS_CACHE_SIZE requests are in flight, the oldest entry is dropped. If that request is delivered again, the Agent forwards it again. |
While a request is in the Agent's cache, a repeat delivery is not sent to your Customer Server again; the Agent uses the status it already holds.
- De-duplicate on
transportMetadata.requestId. When arequestIdyou have already seen arrives, do not sign again. Return the existing status (PENDING_SIGN,SIGNEDwith the same signatures, orFAILED). - Use
txIdfor reconciliation. For transaction signing requests, the payload'stxIdidentifies the Fireblocks transaction, and the Agent uses it as therequestId. - Accept concurrent calls. The Agent does not wait for one
messagesToSigncall to finish before it sends the next.
KeyLink Flow already de-duplicates on requestId this way.
| WebSocket (default, recommended) | HTTP long-poll | |
|---|---|---|
| Setting | WEBSOCKET_ENABLED unset or true |
WEBSOCKET_ENABLED=false |
| Default since | 2.4.0 | Before 2.4.0 |
| How requests arrive | Fireblocks pushes them over a WSS connection to /msg/ws |
The Agent polls GET /msg |
| Acknowledgements | Over the socket while it is connected, otherwise HTTP | HTTP |
| Transaction signing responses | Over the socket while it is connected, otherwise HTTP | HTTP |
| Proof-of-ownership responses | HTTP | HTTP |
| Redelivery of unacknowledged requests | When the socket closes (at least every 15 minutes) | After the 90-minute acknowledgement timeout |
WebSocket is the default and the recommended mode. It removes the throughput limit of polling and is suited to a Customer Server that signs requests in parallel. If the connection drops, the Agent reconnects with exponential backoff, from 1 second up to 30 seconds with random jitter, and requests a fresh access token for each attempt. There is no automatic fallback to long-polling; the Agent keeps reconnecting.
HTTP long-poll is available by setting WEBSOCKET_ENABLED=false. Use it if your network cannot carry WebSocket traffic to Fireblocks, and note its much slower redelivery.
| Mode | Startup log lines |
|---|---|
| WebSocket | Starting in WebSocket push mode (WEBSOCKET_ENABLED=true, version=...), then WS: connected - MAG will push messages (no polling) |
| HTTP long-poll | Starting in HTTP long-poll mode (WEBSOCKET_ENABLED=false, version=...), then repeated Waiting for messages from Fireblocks... |
Your Customer Server implements two endpoints, defined in the OpenAPI spec api/customer-server.api.yml. The Agent calls both with POST and JSON bodies, and adds the Authorization header if CUSTOMER_SERVER_AUTHORIZATION is set.
| Endpoint | Request | Response | Deadline |
|---|---|---|---|
POST /messagesToSign |
{ "messages": [MessageEnvelope] } |
{ "statuses": [MessageStatus] } |
CUSTOMER_SERVER_SIGN_TIMEOUT_MS (120 s) |
POST /messagesStatus |
{ "requestsIds": [string] } |
{ "statuses": [MessageStatus] } |
CUSTOMER_SERVER_TIMEOUT_MS (30 s) |
- Request types:
KEY_LINK_TX_SIGN_REQUEST(transaction signing) andKEY_LINK_PROOF_OF_OWNERSHIP_REQUEST(proof of key ownership). - Algorithms:
ECDSA_SECP256K1andEDDSA_ED25519. - Statuses:
PENDING_SIGN,SIGNED,FAILED.SIGNEDandFAILEDare final. ReturnSIGNEDwithresponse.signedMessages, orFAILEDwithresponse.errorMessage. - Response types:
KEY_LINK_TX_SIGN_RESPONSEandKEY_LINK_PROOF_OF_OWNERSHIP_RESPONSE, matching the request. - Pending requests:
messagesToSigncan returnPENDING_SIGNand finish later. The Agent callsmessagesStatuseveryCUSTOMER_SERVER_PULL_CADENCE_MSwith therequestIdof every request still pending, and the call is made even when that list is empty. - Idempotency: de-duplicate on
requestId. See What your Customer Server must do.
An example Customer Server, backed by the SoftHSM software HSM, is in examples/server. It is for evaluation only; do not use it to protect production keys. To scale it across CPU cores, see the cluster setup guide.
The Agent writes JSON logs to standard output and to daily files named info-<date>.log in LOG_DIR, by default its working directory (/app/logs in the image). Files rotate at 20 MB and are kept for 30 days.
| Log line | Meaning |
|---|---|
WS: connected - MAG will push messages (no polling) |
WebSocket connected. Healthy. |
WS: closed (code=...) - reconnecting in ~...ms |
Socket closed; the Agent is reconnecting. Expected at each 15-minute refresh. Investigate if it repeats without a following WS: connected. |
WS: keep-alive timeout, WS: open watchdog fired, WS: connect watchdog fired |
The connection stalled and the Agent replaced it. Investigate if frequent. |
Error on getAccessToken request |
The Agent could not authenticate to Fireblocks. Check connectivity and pairing. |
Error on customer server api request /messagesToSign or /messagesStatus |
Your Customer Server failed or timed out. The request is retried through redelivery. |
Found cached message. requestId: ... |
Fireblocks redelivered a request the Agent already holds. Normal under at-least-once delivery. |
Error decoding message followed by Got from Fireblocks invalid message |
A request failed signature verification and was discarded. Contact Fireblocks support if you see this. |
The Agent has no health endpoint. Monitor it through these log lines and your container runtime. For an automatic restart when the connection loop stops, set HEARTBEAT_FILE and check the file's age, as the Helm chart's liveness probe does.
- Pin a release tag. Build each image from a tag (see Production deployment) and tag the image with the same version. Never build from
main. - Read the CHANGELOG before upgrading. Each release lists its fixes and any required actions.
- Plan for at least one release a quarter. Fireblocks releases the Agent at least once a quarter; stay on a recent release.
- Do not run 2.4.0. With WebSocket delivery, 2.4.0 does not return signed responses to Fireblocks. Use 2.4.1 or later.
- From an image before 3.0.0, set a restart policy. Earlier images ran the Agent under
pm2, which restarted it inside the container after a crash. From 3.0.0 the Agent is the container's main process, so when it exits the container stops. Without a restart policy (docker run --restart unless-stopped,restart: unless-stoppedin Docker Compose, orrestartPolicy: Alwaysin Kubernetes) it stays stopped. Check yourdocker runcommand or Compose file before you upgrade. Commands you run in the container (docker exec) needsh: the image has nobashand nopm2. - Expect redelivery during the restart. Requests in flight during an upgrade are delivered again afterwards. Your pairing (
FB_DEVICE_DATA) does not change.
My Customer Server receives the same request twice.
This is expected. Delivery is at-least-once: redelivery happens after a socket reconnect, after an Agent restart, or when the Agent's cache is full. De-duplicate on transportMetadata.requestId and return the existing status. See Message delivery and reliability.
After a restart, pending requests are not picked up for a long time.
You are probably running HTTP long-poll (Starting in HTTP long-poll mode in the log). In that mode Fireblocks redelivers unacknowledged requests only after the 90-minute acknowledgement timeout, and restarting does not shorten it. Use the WebSocket transport (unset WEBSOCKET_ENABLED), where unacknowledged requests return to the queue as soon as the socket closes.
Requests stay in PENDING_SIGN.
Check that messagesStatus returns the final status for each requestId the Agent sends, and look for Error on customer server api request /messagesStatus in the log. The Agent acknowledges a request only after it sees SIGNED or FAILED.
The Agent exits at startup with Not paired and no interactive terminal available - set FB_DEVICE_DATA. Exiting.
The Agent has no credentials and cannot prompt for a pairing token. Set FB_DEVICE_DATA, or pair once interactively. See Pair the Agent once.
In an image built from the provided Dockerfile, the container stops after this exit (exit code 1). With a restart policy it starts again and the message repeats in the container log, while the restart count rises.
The log shows FB_DEVICE_DATA is set but ... or FB_DEVICE_DATA has a ... that is not a GUID.
The value is malformed and the Agent ignored it. Supply the whole credentials file as JSON with userId, deviceId and refreshToken, not the refresh token alone.
Pairing fails.
Please enter a valid pairing token in JWT format.: paste the whole pairing token exactly as issued.Couldn't pair device, got error: ...: Fireblocks rejected the token, or the Agent cannot reachMOBILE_GATEWAY_URL. Check outbound access on port 443, then generate a new pairing token and try again.
The Agent exits at startup with CUSTOMER_SERVER_URL is http://.
The Agent sends signing requests only over HTTPS. Point CUSTOMER_SERVER_URL at the server's https:// address. For local development only, ALLOW_INSECURE_CUSTOMER_SERVER=true allows http://.
The Agent cannot reach my Customer Server over HTTPS (unable to verify the first certificate, self-signed certificate, or Hostname/IP does not match certificate's altnames).
If the server uses a self-signed certificate or a private certificate authority, set CUSTOMER_SERVER_CA_FILE to that CA's certificate. If the host name does not match, use a name the server's certificate covers in CUSTOMER_SERVER_URL, or have the certificate reissued with it. The startup log shows how the connection is checked, for example Customer server TLS: HTTPS, verified against the default CA certificates and 1 from CUSTOMER_SERVER_CA_FILE.
The Agent exits with CUSTOMER_SERVER_CA_FILE could not be read.
The file is missing or not readable by UID 1000. Fix the mount or its permissions.
The Agent exits with EACCES: permission denied.
The image runs as UID 1000, so a mounted file that only root can read fails to load and the Agent exits with code 1.
Agent failed to start: EACCES: permission denied, open '/app/data/.fireblocks-refresh-token'. Exiting.: the credentials file.chownit to UID 1000, or pass the credentials inFB_DEVICE_DATAinstead.CUSTOMER_SERVER_CA_FILE could not be read (<path>): EACCES: the CA certificate. Make it readable, for example mode 644.
Use this setup to evaluate the Agent with the example Customer Server. For production, see Production deployment.
nvm. On macOS runbrew install nvm; on Linux follow the nvm instructions.
git clone https://github.com/fireblocks/fireblocks-agent.git
cd fireblocks-agent
nvm use
npm i-
Build and start the example Customer Server:
cd examples/server npm run build:docker npm run start:dockerTo scale signing across CPU cores, run it in cluster mode instead.
-
Copy
.env.prodto.env.<env-name>(for example.env.test) and set your configuration in it. The example Customer Server serves plain HTTP unless you set up its certificate (Support for self signed certificate); for a quick local run against it over HTTP, setCUSTOMER_SERVER_URL="http://localhost:5000/api"andALLOW_INSECURE_CUSTOMER_SERVER=true. -
Build and start the Agent:
npm run build npm run start --env=<env-name>
The example Customer Server's entry point is examples/server/src/server.ts.
If you believe you have found a security vulnerability in the Agent, report it privately to security@fireblocks.com. Don't open a public GitHub issue for it.
Copyright (c) 2023-2026 Fireblocks Ltd. All rights reserved.
The Fireblocks Agent is source-available, not open source. It is licensed under the Fireblocks Key Link Agent Licence, which is a proprietary licence, not an OSI-approved open source licence, and it grants none of the freedoms one implies.
In outline, and subject in every case to the licence text itself, which prevails:
- You may install, run and copy the agent on your own infrastructure, solely to connect your key management system or HSM to the Fireblocks Platform under your agreement with Fireblocks.
- You may read and audit the source, and share it with your professional advisers, auditors and competent regulators for security review and regulatory examination, subject to the professional or statutory secrecy obligations that apply to them.
- You must treat the source and non-public information about it, including the results of any security review or audit of it, as Fireblocks' confidential information (Section 5.3).
- You may not modify it, redistribute it, publish it, offer it as a service, or use it with any platform other than the Fireblocks Platform. Third-party components keep their own licences, and may be patched for security vulnerabilities under the narrow terms of Section 3.2.
- Nothing in the licence restricts acts you are permitted to perform under mandatory law that cannot be excluded by agreement (Section 4.2).
Read LICENSE.md before use. Questions about licence scope should go to your Fireblocks representative.




