---
title: Deployment
slug: solutions/u1PV-deployment
docTags: 
createdAt: 2024-11-05T15:27:46.100Z
---

The Topic Registry is distributed as a Docker image, making it easy to deploy on any system that supports Docker. Follow these steps to deploy the solution and configure it to work with Litmus Edge.

### Prerequisites

- **Litmus Edge version +3.16.8**
- **Litmus Edge IP Address or Hostname**
  The IP address or hostname of the Litmus Edge instance to connect to.
- **Litmus Edge REST API Token**
  A valid REST API token generated from the Litmus Edge instance. Refer to the [Litmus Edge documentation](https://docs.litmus.io/litmusedge/product-features/system/access-control/tokens/create-api-token) for instructions on generating an API token.
- **Litmus Edge Access Token**
  A valid access token is required to connect to the Litmus Edge Message Broker. This token authenticates the Topic Registry to receive real-time updates. See the [Litmus Edge documentation](https://docs.litmus.io/litmusedge/product-features/system/access-control/tokens/create-api-account) for details on generating an access token.
  - **Note**: Ensure the [NATS Proxy](https://docs.litmus.io/litmusedge/product-features/system/access-control/tokens#Nr3_T) is enabled and that the account token has permission to subscribe to all topics by including `>` in the Read Topics configuration.
- **Docker**
  Docker must be installed on the machine where the Topic Registry will be deployed. For installation instructions, refer to the [Docker documentation](https://docs.docker.com/get-docker/).

### Downloading The Image

The docker image is available on [Litmus Portal](https://portal.litmus.io/accelerators/topic-registry). Download the appropriate version and load the image into your Docker environment using the following command:

```bash
docker load -i le-topic-registry-<version>.tar
```

***Example:***

```bash
docker load -i le-topic-registry-001.tar
```

### Basic Deployment

To deploy the solution without configuring environment variables in advance, run the following command. This will expose the solution on port 3000:

```bash
docker run -itd -p 3000:3000 -e X_LITMUS_KEY=super-secret-key us-docker.pkg.dev/litmus-customer-facing/litmus-solutions/le-topic-registry:<version>
```

***Example:***

```bash
docker run -itd -p 3000:3000 -e X_LITMUS_KEY=super-secret-key us-docker.pkg.dev/litmus-customer-facing/litmus-solutions/le-topic-registry:1.0.1
```

:::hint{type="info"}
Create a [volume](https://docs.docker.com/engine/storage/volumes/) to ensure data is persisted if the container is deleted.
:::

:::hint{type="warning"}
If you are deploying the image in Litmus Edge, please add the option `--network host` to the above command, or deploy the solution from the Marketplace. Also, a [firewall rule](https://docs.litmus.io/litmusedge/product-features/system/network/manage-firewall-rules) should be added to the solution port to allow inbound traffic. This requirement only applies when deploying in Litmus Edge.
:::

### Pre-configured Deployment

You can pre-configure the solution using environment variables:

- **EDGE\_HOSTNAME**: The IP address or hostname of the Litmus Edge instance.
- **EDGE\_NATS\_TOKEN**: The access token for connecting to the Litmus Edge Message Broker.
- **EDGE\_API\_TOKEN**: The API token for accessing Litmus Edge API endpoints.
- **X\_LITMUS\_KEY**: (Solution) A secret key for authenticating REST API requests.
- **SHOW\_LOGGER**: Set to `true` to enable verbose logging for debugging.

:::hint{type="info"}
You can provide these environment variables during deployment or configure them later via the solution's web UI.
:::

For a pre-configured deployment, include the necessary environment variables in the Docker run command as follows:

```bash
docker run -itd -p 3000:3000 -e EDGE_HOSTNAME=<edge-hostname> -e EDGE_NATS_TOKEN=<edge-nats-token> -e EDGE_API_TOKEN=<edge-api-token> -e X_LITMUS_KEY=<tr-solution-api-key> us-docker.pkg.dev/litmus-customer-facing/litmus-solutions/le-topic-registry:<version>
```

Replace `<edge-hostname>`, `<edge-nats-token>`, `<edge-api-token>`, and `<tr-solution-api-key>` with your appropriate values.

### Accessing the Solution

Once the container is running, access the solution in your web browser at `http://localhost:3000` or use the IP address of the host machine.

:::hint{type="warning"}
This Solution might be removed in the future if a valid license is not installed
:::

