---
title: "Install calicoq"
description: "Install the calicoq command-line tool as a binary or container on any host with network access to the Calico Enterprise datastore."
product: "Calico Enterprise"
version: "3.23 (latest)"
section: "Operations"
canonical_url: "https://docs.tigera.io/calico-enterprise/latest/operations/clis/calicoq/installing"
---

# Install calicoq

## About installing calicoq

You can run `calicoq` on any host with network access to the Calico Enterprise datastore as either a binary or a container.

> **SECONDARY:** Ensure that you install the binary on a Linux machine. The binary does not work on other machines.

For step-by-step instructions, refer to the section that corresponds to your desired deployment.

- [As a binary on a single host](#install-calicoq-as-a-binary-on-a-single-host)
- [As a container on a single host](#install-calicoq-as-a-container-on-a-single-host)

## Install calicoq as a binary on a single host

1. Log into the host, open a terminal prompt, and navigate to the location where you want to install the binary.

   > **SUCCESS:** Consider navigating to a location that's in your `PATH`. For example, `/usr/local/bin/`.

2. Use the following command to download the `calicoq` binary.

   ```text
   curl -o calicoq -O -L https://downloads.tigera.io/ee/binaries/v3.23.2/calicoq
   ```

3. Set the file to be executable.

   ```text
   chmod +x calicoq
   ```

   > **SECONDARY:** If the location of `calicoq` is not already in your `PATH`, move the file to one that is or add its location to your `PATH`. This will allow you to invoke it without having to prepend its location.

**Next step**:

[Configure `calicoq` to connect to your datastore](https://docs.tigera.io/calico-enterprise/latest/operations/clis/calicoq/configure.md).

## Install calicoq as a container on a single host

1. Ensure that you have the [`config.json` file with the private Tigera registry credentials](https://docs.tigera.io/calico-enterprise/latest/getting-started/install-on-clusters/calico-enterprise.md#get-private-registry-credentials-and-license-key).

2. From a terminal prompt, use the following command to either create or open the `~/.docker/config.json` file.

   ```bash
   vi ~/.docker/config.json
   ```

3. Depending on the existing contents of the file, edit it in one of the following ways.

   - **New file**: Paste in the entire contents of the `config.json` file from Tigera.

   - **Existing file without quay.io object**: Add the following lines from the `config.json` inside the `"auth"` object.

     ```json
     "quay.io": {
       "auth": "<ROBOT-TOKEN-VALUE>",
       "email": ""
     }
     ```

   - **Existing file with quay.io object**: Add the following lines from the `config.json` inside the `"quay.io"` object.

     ```json
     "auth": "<ROBOT-TOKEN-VALUE>",
     "email": ""
     ```

4. Save and close the file.

5. Use the following commands to pull the `calicoq` image from the Tigera registry.

   ```bash
   docker pull quay.io/tigera/calicoq:v3.23.2
   ```

6. Confirm that the image has loaded by typing `docker images`.

   ```bash
   REPOSITORY                TAG               IMAGE ID       CREATED         SIZE
   tigera/calicoq    v3.23.2            e07d59b0eb8a   2 minutes ago   42MB
   ```

**Next step**:

[Configure `calicoq` to connect to your datastore](https://docs.tigera.io/calico-enterprise/latest/operations/clis/calicoq/configure.md).
