Launch a local Ceramic node¶
The Ceramic command line interface provides an easy way to start a JS Ceramic node in a local Node.js environment. This is a great way to get started developing with Ceramic before moving to a cloud-hosted node for production use cases.
Prerequisites¶
Installing the CLI requires a console, Node.js v16, and npm v6. Make sure to have these installed on your machine.
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
Depreciation Notice:
Interactions with Streams and TileDocuments have been moved to our Glaze CLI. If you encounter any errors with the commands below please retry using the Glaze CLI first.
Installation and usage¶
Install the Ceramic CLI¶
Open your console and install the CLI using npm:
npm install -g @ceramicnetwork/cli
Launch the Ceramic node¶
Use the ceramic daemon
command to start a local JS Ceramic node connected to the Clay Testnet at https://localhost:7007
.
ceramic daemon
Configure your 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 be used with Mainnet.
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'