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

# Deploy the Blnk Production License

> Learn how to configure and deploy the Blnk production license in your environment.

The Production License lets you run the full Blnk stack, including Core, Cloud Dashboard, and Watch, in a dedicated environment. You can deploy it in your own infrastructure or run it in a dedicated cloud environment managed by Blnk.

Built for teams that need stronger security controls, data residency support, custom tooling, or a closer operational partnership with Blnk.

**Want a dedicated Production setup?**

Get a Production License tailored to your deployment needs.

This doc provides a step-by-step guide for deploying the Production License in your own infrastructure. Let's get started!

***

## Deployment guide

Use this guide to deploy Blnk Production License on AWS, GCP, Azure, or any cloud provider.

<Steps>
  <Step title="Get your Production License">
    After purchasing a Production License, you'll receive an email with your license details.

    Your license details will include a base64-encoded license string, which is the recommended way to activate your license. You may also receive a license file named `blnk-enterprise.lic`. Both contain the same license information and enabled features.
  </Step>

  <Step title="Prepare your databases">
    Set up a managed Postgres instance and a managed Redis instance in your cloud provider before continuing.

    <Tabs>
      <Tab title="Postgres">
        Create a managed Postgres instance in your environment, such as Amazon RDS, Google Cloud SQL, or Azure Database for PostgreSQL. Use a recent supported Postgres version and enable TLS for production.

        Once the instance is ready, create two databases: one for Blnk Core and one for Blnk Cloud.

        Keeping these databases separate isolates ledger data from Cloud management data.

        ```sql theme={"system"}
        CREATE DATABASE blnk;
        CREATE DATABASE "blnk-cloud";
        ```

        <Tip>Save the connection URL for the instance. You will use it as `ENTERPRISE_POSTGRES_URL` in a later step.</Tip>
      </Tab>

      <Tab title="Redis">
        Create a managed Redis instance in your environment, such as Amazon ElastiCache, Google Cloud Memorystore, or Azure Cache for Redis.

        Use a version compatible with your provider's managed offering and enable TLS if your provider supports it.

        <Tip>Save the connection URL for the instance. You will use it as `ENTERPRISE_REDIS_URL` in a later step.</Tip>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Pull the Docker image">
    Pull the enterprise image from GitHub Container Registry:

    ```bash Docker theme={"system"}
    docker pull ghcr.io/blnkfinance/blnk-enterprise:latest
    ```

    <Note>
      Using a custom image? Use the image name provided in your license email or onboarding instructions.
    </Note>
  </Step>

  <Step title="Add primary environment variables">
    Create an environment file, such as `.env` or `enterprise.env`.

    Add the following variables and replace the placeholder values with your Postgres URL, Redis URL, and license string.

    ```dotenv .env wrap theme={"system"}
    HOSTNAME=127.0.0.1
    ENTERPRISE_POSTGRES_URL=postgres://user:password@host:5432/postgres?sslmode=require
    ENTERPRISE_REDIS_URL=redis://host:6379/0
    ENTERPRISE_LICENSE_B64=your_base64_license_string
    ```

    | Environment variable      | Description                                                                                                                                                                       |
    | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `HOSTNAME`                | Use `127.0.0.1` so health checks and internal services communicate through the container loopback interface.                                                                      |
    | `ENTERPRISE_POSTGRES_URL` | Connection string for your Postgres instance.                                                                                                                                     |
    | `ENTERPRISE_REDIS_URL`    | Connection string for your Redis instance.                                                                                                                                        |
    | `ENTERPRISE_LICENSE_B64`  | Base64-encoded license string from Step 1. Takes precedence over `ENTERPRISE_LICENSE_FILE`. To use a file instead, set `ENTERPRISE_LICENSE_FILE` to the path of your `.lic` file. |
  </Step>

  <Step title="Set up public app config">
    Add these variables to the same environment file. They configure how users access the Cloud Dashboard.

    ```dotenv .env wrap theme={"system"}
    ENTERPRISE_PUBLIC_PORT=8080
    ENTERPRISE_PUBLIC_URL=https://ledger.yourdomain.com
    ```

    | Environment variable     | Description                                                                                                                               |
    | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
    | `ENTERPRISE_PUBLIC_PORT` | Port exposed by the enterprise launcher for the Cloud Dashboard.                                                                          |
    | `ENTERPRISE_PUBLIC_URL`  | Public URL where users access the Cloud Dashboard, including `https://`. Use this value when configuring `CORS_ORIGINS` in the next step. |
  </Step>

  <Step title="Set up Plane Environment variables">
    Plane powers the Cloud Dashboard and stores its data in the `blnk-cloud` database.

    Add these variables to the same environment file you created in the previous step.

    ```dotenv .env wrap theme={"system"}
    CORS_ORIGINS=http://localhost:8080,http://localhost:3001,https://ledger.yourdomain.com
    BLNK_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef
    JWT_SECRET=your_long_random_secret_here
    ```

    | Environment variable  | Description                                                                                                                                                                                |
    | :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `CORS_ORIGINS`        | Comma-separated list of browser origins allowed to access the Plane API. Do not include spaces. Make sure `ENTERPRISE_PUBLIC_URL` is included.                                             |
    | `BLNK_ENCRYPTION_KEY` | A unique 32-character key used to encrypt sensitive data, such as instance connection keys. Do not change this value after deployment, or previously encrypted data may become unreadable. |
    | `JWT_SECRET`          | A strong random secret used to sign and verify authentication tokens.                                                                                                                      |
  </Step>

  <Step title="Run the enterprise image">
    Start the stack with the image you pulled earlier. Map the host port to `ENTERPRISE_PUBLIC_PORT`, e.g. `8080` if you used the value from the public app config step.

    ```bash Docker theme={"system"}
    docker run -d \
      --name blnk-enterprise \
      -p 8080:8080 \
      --env-file ./enterprise.env \
      ghcr.io/blnkfinance/blnk-enterprise:latest
    ```

    <Note>
      If you use a license file instead of `ENTERPRISE_LICENSE_B64`, mount `blnk-enterprise.lic` into the container and set `ENTERPRISE_LICENSE_FILE` to its path in your env file.
    </Note>

    Confirm that your deployment is live:

    ```bash Check deployment status theme={"system"}
    docker ps
    ```
  </Step>

  <Step title="Access the Cloud Dashboard">
    You are ready to use Cloud in your environment. Open `ENTERPRISE_PUBLIC_URL` in your browser.

    1. Sign up and create your account.
    2. Sign in and set up your workspace.
    3. Start working with the auto-provisioned Core instance, or [connect additional instances](/cloud/instances/create) to manage more environments.
  </Step>
</Steps>

***

## What's next

<CardGroup cols={2}>
  <Card title="Connect instance" icon="cable" href="/cloud/instances/create">
    Multiple Core instances via Query Agent.
  </Card>

  <Card title="Working with Blnk Core" icon="book-open" href="/home/install">
    Quick start and first transaction.
  </Card>

  <Card title="Navigating Cloud" icon="sparkles" href="/cloud/start/guide">
    Dashboard tour and daily operations.
  </Card>
</CardGroup>

***

## Need help?

This guide covers a standard Production License deployment. If you need custom configuration beyond these steps, [send us an email](mailto:support@blnkfinance.com?subject=Want%20custom%20configuration%20for%20my%20Production%20License).
