Chapter 4. Configuring the Data Grid CLI


Define configuration properties for the Data Grid CLI.

Configure Data Grid CLI startup operations and customize the location for persistent storage.

Prerequisites

Create at least one Data Grid user.

Procedure

  1. Optionally set a custom path to the Data Grid CLI storage directory in one of the following ways:

    • Using the cli.dir system property:

      $ bin/cli.sh -Dcli.dir=/path/to/cli/storage ...
    • Using the ISPN_CLI_DIR environment variable:

      export ISPN_CLI_DIR=/path/to/cli/storage
      $ bin/cli.sh ...
  2. Set values for configuration properties with the config set command.
  3. Verify configuration properties with the config get command.

    Tip

    Run help config to review available configuration properties and get example usage.

4.2. Creating Command Aliases

Create aliases for Data Grid CLI commands to define custom shortcuts.

Procedure

  1. Create aliases with the alias <alias>=<command> command.

    For example, set q as an alias for the quit command:

    [//containers/default]> alias q=quit
  2. Run the alias command to check the defined aliases.

    [//containers/default]> alias
    alias q='quit'
  3. Delete aliases with the unalias command, for example:

    [//containers/default]> unalias q

4.3. Trusting Data Grid Server Connections

Secure Data Grid CLI connections to Data Grid Server with SSL/TLS certificates. If you create a key store as an SSL identity for Data Grid Server, the CLI can validate server certificates to verify the identity.

Prerequisites

  • Set up an SSL identity for Data Grid Server.
  • Create at least one Data Grid user.

Procedure

  1. Specify the location of the server key store, as in the following example:

    $ bin/cli.sh config set truststore /home/user/my-trust-store.jks
  2. Define the key store password, if necessary, as follows:

    $ bin/cli.sh config set truststore-password secret
  3. Verify your CLI configuration.

    $ bin/cli.sh config get truststore
    truststore=/home/user/my-trust-store.jks
    
    $ bin/cli.sh config get truststore-password
    truststore-password=secret

4.4. Data Grid CLI Storage Directory

Data Grid CLI stores configuration in the following default directory:

Operating SystemDefault Path

Linux/Unix

$HOME/.config/red_hat_data_grid

Microsoft Windows

%APPDATA%/Sun/Java/red_hat_data_grid

Mac OS

$HOME/Library/Java/red_hat_data_grid

This directory contains the following files:

cli.properties
Stores values for CLI configuration properties.
aliases
Stores command aliases.
history
Stores CLI history.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top