Skip to main content
You must have root privileges on the Co-signer machine to perform maintenance operations. Ensure you are logged in as a root user or use sudo to execute the commands.

View the logs

You can export the logs to a file in the local directory, tagged with the current date and time, by running the following command:
Append a number to the command to retrieve the specified most recent amount of lines. By default, the Co-signer uses the Docker logging container. However, for better monitoring, the logs can be streamed to an external log delivery service, such as ELK, Splunk, or Datadog. The SGX Co-signer generates two different types of logs for troubleshooting and auditing:
  • run.log is an automatically generated log containing all of your Co-signer setup and configuration history.
  • customer_cosigner.log contains workspace operation data, such as the workspace’s transaction approving and signing history and new connection approvals. These log files are separated into 10 files limited to 4.1MB each. They are automatically overwritten in chronological order.
Your API Co-signer logs are structured using the following Regular Expression (RegEx):
These logs are collected by the Docker container’s STDOUT stream and written into a log file on the container’s host machine at the location specified below. These log files are rotated with a max file size of 4MB for each log file.
The Co-signer is Docker-based and uses the Docker JSON file driver for logging. By default, the driver uses a standard logging output but can be configured to support other logging mechanisms. Refer to the official Docker documentation for more detailed information.

Verify SGX is enabled on the machine

After completing your server creation or installation, verify that SGX is enabled on the server. The Fireblocks API Co-Signers can only run on SGX-enabled servers with the latest patches, and verifying your configuration helps ensure you do not run into any potential issues later on.
  1. Run the following commands on the server:
  1. Verify the following:
    1. SGX: Software Guard Extensions supported is true.
    2. SGX_LC: SGX launch config supported is true.
Azure Standard_DC*_v2 instances do not support SGX2, but it is not necessary to run the signer.

List the paired API users

You can list all API users paired with the Co-signer across the connected workspaces by running the following command:
The output will display a list of all API users paired with your Co-Signer, including the workspace name they are connected to, the API user’s ID (its API key), and the associated Callback Handler server URL (if applicable).

Retrieve the public key

You can retrieve the Co-signer’s public key, used by your optional Callback Handler server to authenticate requests from the Co-signer, by running the following command:

Stop the Co-signer

You can stop the Co-signer by running the following command:

Start the Co-signer

You can Start the Co-signer by running the following command:

Restart the Co-Signer

You can restart the Co-signer by running the following command:

Retrieve the running image version

You can retrieve your running Co-Signer version by running the following command:

Retrieve the script version

You can retrieve your current Co-Signer script version by running the following command:

Update the Co-signer

Keep signing available during the upgrade: This upgrade stops your Co-signer container, so the Co-signer can’t sign until it starts again with the new version. To avoid interrupting signing, see Upgrading an API Co-signer Without Interrupting Signing.
In the Fireblocks Console, go to Settings > General > API co-signer and copy the download link of the Intel SGX installation script. The link is valid for seven days. Use the curl command to download the script to the path where the existing Co-Signer script is present. Paste the copied URL into the following command:
If you have any issues with finding the installation script URL, please contact Fireblocks Support.
After downloading the installation script, navigate to the directory containing the script and modify the script’s permissions to make it executable:
Stop the Co-signer container by running the following command:
Run docker ps -a and check the output. There should be no Co-signer container running. Backup the Co-signer’s database by running the following command:
Remove the current revision file:
You can now update the Co-signer to the latest version by running the following command:
You can update to a specific image version by replacing the <image_version> :
Run docker ps -a and check the output. You should see the Co-signer container running. If the update process did not succeed, try re-installing the Co-signer using the same version, but first remove the current version of the Co-Signer by running the following commands:
and then run:
If that still doesn’t work, refer to API Co-signer Troubleshooting.

Migrate to a new machine

Use these steps to move an SGX Co-signer to a new machine. The new machine takes over the existing Co-signer, so you don’t need to pair new API users.
Never run the old and the new Co-signer at the same time. Stop the old one before you start the new one.

On the old machine

  1. Stop the Co-signer:
  1. Back up these files:
    • /databases/cosigner/db/secrets.db: the Co-signer’s secrets database, encrypted with a key generated in the SGX enclave.
    • /databases/cosigner/enclave/ra_loader_enclave.signed.so: the enclave loader.
    • From the folder of the install script, if they exist:
      • .proxy: your proxy setting.
      • .slow_callback_handler_configured: set when your callback handler returns RETRY.
    Don’t copy the .revision file, so the new machine runs the latest version.

On the new machine

  1. Set up an SGX-capable machine that meets the installation prerequisites for your environment.
  2. Download the latest install script and make it executable.
  3. Prepare the machine: run sudo ./cosigner setup and stop it with Ctrl+C when it asks for the pairing token. By then the script has installed the SGX driver, Docker and docker-compose, logged in to the Fireblocks registry, written the Docker configuration and created the /databases/cosigner folders.
  4. Copy the backed-up files to the same locations:
    • secrets.db to /databases/cosigner/db/
    • ra_loader_enclave.signed.so to /databases/cosigner/enclave/
    • .proxy and .slow_callback_handler_configured, if you have them, to the folder of the install script
  5. Give the Co-signer user ownership of the files:
  1. Start the Co-signer:
  1. Check that it works: docker ps shows the Co-signer container running, docker logs shows it connected, and a test transaction is signed.
  2. Decommission the old machine only after the new one works.
If you don’t have backups of secrets.db or ra_loader_enclave.signed.so, unpair (re-enroll) the API users that are associated with the Co-signer and set up a new Co-signer on the new machine. Install the replacement on Azure, Azure Marketplace, IBM Cloud, Alibaba Cloud, or on-premises.