Set up the Conjur CLI (Docker-based)

The Conjur CLI implements the Conjur REST API, providing an alternate interface for managing Conjur resources, including roles, privileges, policy, and secrets.

Start the Conjur CLI

You can run the Conjur CLI in a container or start it as a Ruby gem.


The following command starts a highly secure ephemeral container for the CLI based on the latest pulled DockerHub image.

$ docker run --rm -it --name conjur-client --network container:<container-name> cyberark/conjur-cli:5




If local, use the name of the Conjur Server.

If you are running the Conjur CLI on a separate machine the --network argument is not required.

To understand how to persist identity data so that subsequent sessions are quicker to start up, see the CLI readme.

Ruby Gem

If you have a Ruby environment, you can install the Ruby gem. See the CLI readme.

Initialize the Conjur CLI

Enter the following command at the bash prompt:

conjur init --url <conjur-appliance-hostname> --account <organizational-account>




The URL of the Conjur Server in the following format https://<host-name>.


The organizational account assigned to this Conjur Server during configuration.

Authenticate to the client

  1. Enter the following command at the bash prompt:

    conjur authn login <user-name>




    A valid Conjur username. You can use the built-in admin user.

  2. Enter the user password when prompted.

  3. For a list of valid commands, enter

    conjur --help

    or, see the Conjur CLI (Docker-based).

Set up the CyberArk Vault Synchronizer. For more information, see Install CyberArk Vault Synchronizer.