# Install PMC CLI · Chromia Docs (concept)

> This topic contains instructions to install and update Postchain Management Console (PMC) CLI.

Source: https://docs.chromia.com/ecosystem/providers/pmc/pmccli-installation/

# Install PMC CLI

On this page

* [Install](#install)
* [Update](#update)
* [Docker](#docker)
* [Start the Docker container with PMC CLI pre-installed](#start-the-docker-container-with-pmc-cli-pre-installed)

This topic contains instructions to install and update Postchain Management Console (PMC) CLI.

## Install

You can download and install the latest PMC CLI by browsing the
[release page](https://gitlab.com/chromaway/core-tools/management-console/-/releases)
or via a package manager:

Terminal

```
brew tap chromia/core https://gitlab.com/chromaway/core-tools/homebrew-chromia.git
brew install chromia/core/pmc
```

Download the public key of apt-repo and add it to your local keyrings:

Terminal

```
curl -fsSL https://apt.chromia.com/chromia.gpg | sudo tee /usr/share/keyrings/chromia.gpg >/dev/null
```

Add the repository to your list of package sources:

Terminal

```
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/chromia.gpg] https://apt.chromia.com stable main" | sudo tee /etc/apt/sources.list.d/chromia.list
```

Update apt-get and install:

Terminal

```
sudo apt-get update
sudo apt-get install pmc
```

Using the PMC CLI in Windows Command Prompt currently requires
[Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/). With Docker installed and
running according to their documentation, you can prepend the following snippet to all commands to access the CLI:

Batch

```
docker run --rm -it -v "%cd%":/work -w /work registry.gitlab.com/chromaway/core-tools/management-console/pmc:<latest version>
```

note

You must specify `host.docker.internal` in `database:host` in your `chromia.yml` to make the CLI access the PostgreSQL
instance running on the host machine or in another Docker container.

## Update

You can download and install the latest PMC CLI from
[here](https://gitlab.com/chromaway/core-tools/management-console/-/releases), or if you have installed the PMC CLI via
a package manager, you can update it with the following:

Terminal

```
brew update
brew upgrade chromia/core/pmc
```

info

If you have added apt.chromia.com to your list of sources, you will need to add the flag `--allow-releaseinfo-change`
when running the `apt-get update` command to allow apt to update the repository.  
`sudo apt-get --allow-releaseinfo-change update`

Update apt-get and install:

Terminal

```
sudo apt-get update
sudo apt-get install pmc
```

## Docker

Docker can run a standalone Linux container with the PMC CLI pre-installed.

To use the published Docker images, you must first have Docker installed and configured on your host machine. Please
refer to the Docker documentation on how to [install Docker](https://docs.docker.com/get-docker/) on Windows, Mac, and
Linux.

### Start the Docker container with PMC CLI pre-installed

To run the latest version of the PMC CLI, use the `docker run` command and specify the CLI docker image name and any of
the `pmc` commands.

**Unix-based systems**:

Terminal

```
docker run --rm -it -v "$HOME/.chromia:/root/.chromia" -v "$(pwd):$(pwd)" -w "$(pwd)" registry.gitlab.com/chromaway/core-tools/management-console/pmc:<latest version>
```

**Windows**:

Terminal

```
docker run --rm -it -v "%cd%:/work" -w /work registry.gitlab.com/chromaway/core-tools/management-console/pmc:<latest version>
```

See the [Docker command line reference](https://docs.docker.com/engine/reference/commandline/docker/) for information
about updating or uninstalling the Docker image.

[View this page on docs.chromia.com](https://docs.chromia.com/ecosystem/providers/pmc/pmccli-installation/)Content mirrored from the live docs
