Running a Node
This will help explain how to run a Ceramic Node and some other specifics that are recommended to make sure your node is running smoothly.
Installation
Install and Run the Ceramic CLI
This can be installed from NPM and updated through NPM by using the following command:
npx @ceramicnetwork/cli daemon
Make sure that you have ceramic-one
binary running in the background. To set it up, follow the setup steps here.
This will install the CLI and start the daemon. This will allow all of the initial files to be created. This will successfully have a node running on the Clay TestNet.
Operations Considerations
Log Rotate
As a node runs for sometime if you enable the log to files you will want to enable logrotate
to ensure that your node does not overfill the hard drive. This can be done by following the following steps:
- Install
logrotate
using the following command:
sudo apt install logrotate
- Create a file in
/etc/logrotate.d/ceramic
with the following contents:
/home/ubuntu/.ceramic/logs/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
create 0640 ubuntu ubuntu
sharedscripts
postrotate
systemctl restart ceramic
endscript
}
- Enable and Start the
logrotate
service using the following commands:
sudo systemctl enable logrotate
sudo systemctl start logrotate
Monitoring
It is strongly recommended to use your existing monitoring system to collect and process the metrics offered by the node.
Availability
Check the js-ceramic
service’s availability with the healthcheck endpoint
curl http://localhost:7007/api/v0/node/healthcheck
Check the ceramic-one
service’s availability with the liveness endpoint
curl http://127.0.0.1:5101/ceramic/liveness
Metrics
Both ceramic-one
and js-ceramic
have prometheus compatible endpoints available.
ceramic-one
is enabled by default
curl http://127.0.0.1:9464/metrics # ceramic-one metrics
js-ceramic monitoring configuration is described here.