> ## Documentation Index
> Fetch the complete documentation index at: https://developer.bron.org/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Authenticate every request with `Authorization: ApiKey {jwt}`: an ES256 JWT signed with the user's private API key, whose header carries `kid` (the API key ID) and whose payload carries `iat` (Unix time in seconds) and `message`, the hex SHA-256 of `{iat}\n{METHOD}\n{PATH}\n{BODY}`. METHOD is uppercase, PATH includes the query string, BODY is the exact JSON sent or an empty string. Full steps: https://developer.bron.org/api-reference/authentication
> Prefer the official SDKs or the CLI, which sign every request: TypeScript `npm install @bronlabs/bron-sdk`, Go `go get github.com/bronlabs/bron-sdk-go`, Python `pip install git+https://github.com/bronlabs/bron-sdk-python.git`, CLI `brew install bronlabs/apps/bron`. Hand-write JWT signing only for a language without an SDK.
> The base URL is https://api.bron.org. Workspace data lives under `/workspaces/{workspaceId}/...`, and `/dictionary/...` serves reference data such as assets, networks and prices. Timestamps are milliseconds since the Unix epoch. Numeric values, amounts included, are strings: never parse them as floats.
> Never ask the user to paste their API key (the private JWK) into a chat and never hard-code it: read it from an environment variable or a secret store.

# MPC Hot Signer

> Automated transaction signing with enterprise-grade security

The MPC Hot Signer is a containerized solution that enables automated transaction signing in your infrastructure. Built as an alternative to the Bron desktop application, it provides enterprise-grade security with flexible deployment options.

> [!WARNING]
>
> The MPC Hot Signer is currently in **beta**. Features and configurations may change in future releases. Monitor updates closely to ensure continued operation of your shards.

## Prerequisites

Before deploying the MPC Hot Signer, ensure you have:

1. **API Key Setup**: Create dedicated API keys following the [API Key creation guide](https://developer.bron.org/api-reference/create-api-key.md)
   * Role: **MPC Hot Signer**
2. **PostgreSQL Database**: A running PostgreSQL instance for shard storage
3. **Container Runtime**: Docker or Kubernetes environment

> [!NOTE]
>
> All shard secret material are stored encrypted in the database, but metadata like public keys and account IDs rely on PostgreSQL's authentication mechanisms.

## Quick Start

**1. Prepare Your Environment**

Create the necessary API keys for your MPC Hot Signer instance.

**2. Deploy with Docker Compose**

Use this Docker Compose configuration as a starting point for testing environments:

```yaml theme={"system"}
services:
  hot-signer:
    image: bronlabs/mpc-server:latest
    depends_on:
      postgres:
        condition: service_healthy
    environment:
      # Instance identification that will appear in the Bron platform
      NAME: "HotSigner-01"

      PROMETHEUS_PORT: 9091

      # Bron API credentials
      API_KEY_ID: "your-api-key-id"
      API_KEY: "your-api-key-secret"

      # Database configuration
      POSTGRES_HOST: "postgres"
      POSTGRES_PORT: 5432
      POSTGRES_USER: "hot_signer"
      POSTGRES_PASSWORD: "secure-password-here"
      POSTGRES_DBNAME: "hot_signer"

      # Shard encryption options (check security configurations below)
      MASTER_PASSWORD: "YourSecureMasterPassword"
    restart: always
    healthcheck:
      test: ["CMD", "nc", "-z", "-v", "127.0.0.1", "9091"]
      interval: 30s
      timeout: 10s
      retries: 10
      start_period: 10s

  postgres:
    image: postgres:17.5
    environment:
      POSTGRES_USER: "hot_signer"
      POSTGRES_PASSWORD: "secure-password-here"
      POSTGRES_DB: "hot_signer"
    restart: always
    volumes:
      - ./postgresql-data:/var/lib/postgresql/data
    healthcheck:
      interval: 10s
      retries: 300
      test: pg_isready -U hot_signer -d hot_signer
      timeout: 3s
```

> [!WARNING]
>
> This example is for testing purposes only. Production deployments should use external PostgreSQL instances and enterprise-grade encryption options.

**3. Start the Services**

```bash theme={"system"}
docker-compose up -d
```

The hot signer will automatically register with the Bron platform once successfully deployed.

## Security Configuration

The MPC Hot Signer supports four encryption methods for protecting shard materials. Choose the option that best fits your security requirements:

> [!WARNING]
>
> **Important Security Notes:**
>
> * Encryption configuration cannot be changed after initialization without data loss
> * Each API key requires a separate database and encryption setup
> * Cloud KMS key deletion will permanently disable shard access

> [tab] AWS KMS
>
> **Amazon Key Management Service**
>
> ```yaml theme={"system"}
> environment:
>   KMS_ENCRYPTION_KEY_ID: "arn:aws:kms:eu-west-1:000000000000:key/mrk-c6157253996d5a424c3a3c4a5b7b18ee"
>   KMS_SIGNING_KEY_ID: "arn:aws:kms:eu-west-1:000000000000:key/mrk-9d4d9cffc2e4acaf1b38b6e595b07415"
>   AWS_REGION: "eu-west-1"
>   AWS_API_KEY: "AKIAIOSFODNN7EXAMPLE" # optional - not recommended
>   AWS_API_SECRET: "JalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" # optional - not recommended
>   AWS_API_SESSION: "AQoDYXdzEEQaD//////////wEaDD///////wBhAP//////////wA=" # optional - not recommended
> ```
>
> **Setup Instructions:**
>
> * [Creating AWS KMS Keys](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html)
>
> **Required AWS Resources:**
>
> * RSA\_4096 asymmetric encryption key
>
> * P256 asymmetric signing key
>
> > [!NOTE]
> >
> > It's recommended to create Multi-Region keys to allow replicate keys across regions.
>
> **Authentication (Recommended):**
> Instead of using credential environment variables, configure your container environment with an IAM role or service account that has the following permissions:
>
> * `kms:Encrypt`
>
> * `kms:Decrypt`
>
> * `kms:Sign`
>
> * `kms:Verify`
>
> * `kms:GetPublicKey`
>
> > [!WARNING]
> >
> > Deleting AWS KMS keys will make Hot Signer not operable. If that happens, you will need to reinitialize the hot signer with fresh Postgres instance and new AWS KMS keys.

> [tab] Google Cloud KMS
>
> **Google Cloud Key Management**
>
> ```yaml theme={"system"}
> environment:
>   GCP_ENCRYPTION_KEY_ID: "projects/my-project/locations/global/keyRings/hot-signer/cryptoKeys/encryption-key/cryptoKeyVersions/1"
>   GCP_SIGNING_KEY_ID: "projects/my-project/locations/global/keyRings/hot-signer/cryptoKeys/signing-key/cryptoKeyVersions/1"
>   GCP_CREDENTIALS_JSON: '{"type": "service_account", "project_id": "my-project", ...}' # optional - not recommended
> ```
>
> **Setup Instructions:**
>
> * [Creating Google Cloud KMS Keys](https://cloud.google.com/kms/docs/create-key)
>
> **Required GCP Resources:**
>
> * RSA\_4096 asymmetric encryption key
>
> * EC\_P256 asymmetric signing key
>
> > [!NOTE]
> >
> > It's recommended to create Key ring in Global region. Also created keys must have HSM Protection level
>
> **Authentication (Recommended):**
> Instead of using credential environment variables, configure your container environment with a service account that has the following permissions:
>
> * `roles/cloudkms.publicKeyViewer (Cloud KMS CryptoKey Public Key Viewer)`
>
> * `roles/cloudkms.signer (Cloud KMS CryptoKey Signer)`
>
> * `roles/cloudkms.cryptoKeyDecrypter (Cloud KMS CryptoKey Decrypter)`
>
> > [!WARNING]
> >
> > Deleting Google Cloud KMS keys will make Hot Signer not operable. If that happens, you will need to reinitialize the hot signer with fresh Postgres instance and new Google Cloud KMS keys.

> [tab] Azure Key Vault
>
> **Microsoft Azure Key Vault**
>
> ```yaml theme={"system"}
> environment:
>   AZURE_VAULT_URL: "https://my-vault.vault.azure.net/"
>   AZURE_ENCRYPTION_KEY_ID: "encryption-key"
>   AZURE_SIGNING_KEY_ID: "signing-key"
>   AZURE_TENANT_ID: "00000000-0000-0000-0000-000000000000" # optional - not recommended
>   AZURE_CLIENT_ID: "11111111-1111-1111-1111-111111111111" # optional - not recommended
>   AZURE_CLIENT_SECRET: "Ta11A~7R.D85.xmKfkgPT3cauFJbCVLATve2kUwP" # optional - not recommended
> ```
>
> **Setup Instructions:**
>
> * [Creating Azure Key Vault Keys](https://docs.microsoft.com/en-us/azure/key-vault/keys/quick-create-portal)
>
> **Required Azure Resources:**
>
> * RSA\_4096 asymmetric encryption key (HSM-backed required)
>
> * EC\_P256 asymmetric signing key (HSM-backed required)
>
> > [!NOTE]
> >
> > Azure Key Vault keys must be HSM-backed (key types RSA-HSM and EC-HSM).
>
> **Authentication (Recommended):**
> Instead of using credential environment variables, configure your container environment with a managed identity or service principal that has the following Key Vault permissions:
>
> * `Key Vault Reader`
>
> * `Key Vault Crypto User`
>
> > [!WARNING]
> >
> > Deleting Azure Key Vault keys will make Hot Signer not operable. If that happens, you will need to reinitialize the hot signer with fresh Postgres instance and new Azure Key Vault keys.

> [tab] Soft HSM
>
> **Master Password Encryption**
>
> Generates encryption keys locally from a master password. Security depends entirely on the strength and protection of your master password.
>
> ```yaml theme={"system"}
> environment:
>   MASTER_PASSWORD: "YourSecureMasterPassword"
> ```
>
> > [!WARNING]
> >
> > Less secure than cloud-based HSM solutions (AWS KMS, GCP Cloud HSM, Azure Key Vault). Use at your own risk in production environments.

## Operational Management

### Enabling Shard Access

After successful deployment, configure shard access through the Bron platform:

> [!NOTE]
>
> Only workspace owners can configure shard access permissions.

**1. Access API Key Settings**

In **Settings › API keys**, locate the API key used by your MPC Hot Signer instance.

**2. Configure Device Access**

Open the **Devices with signing access** menu for your API key.

**3. Enable Signing Permissions**

Select **Enable Signing Access** for your hot signer instance.

**4. Assign Account Access**

Choose which accounts the hot signer should have access to for transaction signing.

### Monitoring and Maintenance

**Prometheus metrics**
The hot signer includes built-in prometheus metrics on port 9091.

**Rejected API key**
Starting with hot signer 1.2, if the Bron platform rejects the hot signer's API key at startup (the key was deleted or expired, the server's IP address is not allowed for the key, or the server clock is out of sync), or limits its requests, the hot signer logs the error, waits 10 minutes and exits. With `restart: always` it tries again about every 10 minutes until the key is fixed. Port 9091 opens only after a successful start, so an orchestrator that restarts the container on a failed liveness check on this port skips that wait: allow at least 10 minutes before the first check. A running hot signer that gets its key rejected pauses its API calls and retries at a growing interval of up to 10 minutes. Restart the hot signer after fixing the key to retry at once.

**Database Backups**
Implement regular PostgreSQL backups to prevent shard data loss. Consider:

* Automated daily backups
* Point-in-time recovery capabilities
* Backup encryption and secure storage
* Recovery testing procedures

**Updates and Upgrades**
Monitor the `bronlabs/mpc-server` image for updates. Test new versions in staging environments before production deployment.

## Production Considerations

### Infrastructure Requirements

* **High Availability**: Deploy multiple instances with load balancing
* **Network Security**: Implement proper firewall rules and VPC configuration
* **Monitoring**: Set up logging and alerting for the hot signer services
* **Secrets Management**: Use secure secret management solutions for sensitive environment variables

> [card] Need Help?
>
> If you encounter issues during deployment or operation, reach out to our support team with your configuration details and error logs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.