- A machine/instance with a publicly exposed IP address (E.g. from a cloud service provider).
- 100GB of hard drive space is recommended (this should be enough for several years of data).
- Port 8001 needs to be open for inbound TCP traffic.
- All ports should be open for outbound TCP traffic.
2.1 Installing using
- Follow https://github.com/nvm-sh/nvm to install nvm:
- To install nvm on windows, follow https://github.com/coreybutler/nvm-windows
- Full instructions can be found here: https://github.com/git-guides/install-git
- Clone the Git repo to your host:
- Change directory to the project root:
- Install Node.js dependencies:
- Note that if you provided a custom password in step 3 instead of the default one (
'password'), you will need to update the database details inside your main
capitalisk-core/config.jsonfile to match (so that the node is able to connect to your database).
- As of now, following databases are supported
- SQLite - Ready to use out of the box.
- Postgres - Need to install and configure separate postgres service.
- SQLite binaries are automatically installed as a part of
- Just make sure, no warning or error is thrown while installing npm packages for
Follow https://www.postgresql.org/download/ to install Postgres on linux/windows/mac.
Steps for Linux Ubuntu/Debian are:
- Log into postgres:
- Set the password for the
- Create a new database to hold all the blockchain data:
- Exit the Postgres prompt:
- Restart the Postgres service
- You can start the node in multiple ways but the simplest way is to use
- You can install
- Launch the node with PM2:
- Make sure log size doesn't exceed storage capacity of the machine.
- PM2 doesn't have a native check for maximum log file size, so it can terminate node due to log size exceeding storage capacity
- Install PM2 log rotation module, to limit log size and allow log file rotations.
- Default max log file size limit is 10MB after module is installed, follow official README to change the limit.
- You can add an entry to
systemd, that way the system easily restarts the process both on failure and reboot.
Adding an entry to
Let's enable and restart the daemons:
Capitalisk will need a directory to write logs to. Using
systemd it uses
And now you are all set!
- To restart the node, the command is:
- Note that if you make any changes to the
config.jsonfile, you will need to restart the node for the changes to take effect.
- If you want to shut down the code, you can use the command:
- Log level can be changed under the
capitalisk_chainmodule entry - Possible values include:
- To easily track the logs you can use
tail -f <path>/<to>/<logs>
- Get specific information about a delegate
cat /logs/mainnet/clsk.log | grep "<address>"
- Install ldpos commander using
- Run below command to get node block height, since node is syncing, height should keep changing. i.e. Should keep increasing
PS. Please change port, if changed in the config.
- By default, CLSK node should work without any issues.
pm2 lsshows red status for any of the spawned process, it means we need to check logs for exact error.
- Edit either
config.json(in case of postgres) or
config.sqlite.json(in case of SQLite) using nano, and replace
infofor logging, save file.
pm2 logs, one of the statements should contain
Received valid block ..., it means node is syncing and working just fine.