While npm v7 is not officially supported, you may still be able to get it to work. You will need to install the
node-pre-gyp package globally. This is required until
node-webrtc which IPFS depends on is upgraded.
npm install -g node-pre-gyp
1. Install the CLI¶
Open your console and install the CLI using npm.
npm install -g @ceramicnetwork/cli
2. Start the Ceramic node¶
$ ceramic daemon
localhost setup allows you to read streams from other nodes connected on the same network, but writes to your local node will only be available on your local node and on other nodes found on the
peerlist. They will not be available to every node on the network. For greater connectivity, you might want to connect your CLI to a remote long-lived Ceramic node.
3. Configure a network¶
(Optional) By default, the JS CLI starts a node on the Clay Testnet. If you would like to use a different network, you can specify this using the
--network option. View available networks. Note, the CLI can not yet be used with Mainnet.
4. Configure a node URL¶
(Optional) It is possible to use the CLI with a remote Ceramic node over HTTP, instead of a local node. To do this, use the
config set command to set the
ceramicHost variable to the URL of the node you wish to use.
$ ceramic config set ceramicHost 'https://yourceramicnode.com'
When using the CLI with a remote node, you have a few options:
By default, the CLI is authenticated using the Key DID Provider. The seed for this DID is stored in
~/.ceramic/config.json. If this file is not present on startup a new DID will be randomly generated. It's currently not possible to use the Ceramic CLI with other DID methods.