Skip to main content

Pocket Config

The Pocket CLI uses a conf file to store configuration details for the Pocket Core software. By default the config file is located at ~/.pocket/config/config.json. In this document we'll look at how to create a new config file.


This process requires that you have jq installed. To install jq run the following command:

sudo apt  install jq

To create a new config file, do the following:

  1. Create a default config.json file

    echo $(pocket util print-configs) | jq . > ~/.pocket/config/config.json

    You can use the --datadir flag to specify the data directory. This will also update the config file to use the new data directory. For example: pocket util print-configs --datadir "/mnt/data/.pocket".

  2. Change the port 8081 references to 8082

    Note: This step is only necessary if you're planning to run a validator node.

    echo $(pocket util print-configs) | jq '.pocket_config.rpc_port = "8082"' | jq '.pocket_config.remote_cli_url = "http://localhost:8082"' > ~/.pocket/config/config.json
  3. Verify the config.json file

    cat ~/.pocket/config/config.json