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.
info
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:
Create a default
config.jsonfileecho $(pocket util print-configs) | jq . > ~/.pocket/config/config.jsontipYou can use the
--datadirflag 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".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.jsonVerify the
config.jsonfilecat ~/.pocket/config/config.json