Deploy CICO node

YOu can deploy cico in either the ubunt, window and macOS operating systems

Run CICO fullnode with ./cicod

./cicod -daemon

This with launch a cicod daemon with the option -daemon. If user are interested in the event logs about smart contract, please add one more option -logevents.

More options can be found:

./cicod -help

To stop running:

./cico-cli stop

The default data path for different platforms:

  • Linux:~/.cico/
  • Mac OSX:~/Library/Application Support/Cico
  • Windows:%APPDATA%\Cico

You can also use -datadir to set your own data path。

Cico node will sync all the historical block data for first launch, and saves to datadir. It might take some time. Then diagnostics for the node can be found under the data path ~/.cico/debug.log

Local RPC call

When the cico node is running, we can use cico command line interface cico-cli to interact with cicod, and make local RPC calls.


[email protected]:~/cico-0.19.1/bin$ ./cico-cli getlockchaininfo
  "version": 190100,
  "protocolversion": 70016,
  "walletversion": 130000,
  "balance": 0.00000000,
  "stake": 0.00000000,
  "blocks": 12126,
  "timeoffset": 0,
  "connections": 8,
  "proxy": "",
  "difficulty": {
    "proof-of-work": 1.52587890625e-05,
    "proof-of-stake": 886731.5868738915
  "testnet": false,
  "moneysupply": 10028504,
  "keypoololdest": 1505186997,
  "keypoolsize": 100,
  "paytxfee": 0.00000000,
  "relayfee": 0.00400000,
  "errors": ""

To get all RPC command list:

./cico-cli help

To get help for specific RPC command, use ./cico-cli help <RPCcmd>,e.g.:

./cico-cli help getinfo

JsonRPC settings

You can get the jsonrpc example by using (here we use getinfo as an example): ./cico-cli help getinfo

> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;'

The example shows detailed format for jsonrpc content. However, it can only be called after setting rpcuser and rpcpassword. There are two ways to set the parameters, you can choose either.

Method 1:Create config file ~/.cico/cico.conf,which should include:

rpcuser=test  #rpc user name, (necessary)
rpcpassword=test1234  #rpc password, (necessary)
# By default, only local jsonrpc is allowed
# Remote connection is allowed only when setting rpcallowip as following:
# both ipv4 and ipv6 can be set, e.g.:

After creating the config file, please restart the node to finish settings.

Method 2:Restart CICO node with following options:

./cicod -daemon -rpcuser=test -rpcpassword=test1234 -rpcallowip=

The meaning of options rpcuser, rpcpassword and rpcallowip are all the same with the config file above.

RPC call example

You can make remote RPC calls after the settings above. Here is an example: Suppose the cico node is running on an Ubuntu machine, whose ip is, default port=38890. Now we try to make jsonrpc call in a remote macbook:

zhongwenbins-MacBook-Pro:~ zhongwenbin$ curl --user test:test1234 --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;'

The result is identical with local call

Nginx settings(optional)

As the example above, you might find that it is quite complicated to make remote jsonrpc, since you must include rpcuser, rpcpassword, as well as port in the command. If you don’t want users to provide these parameters, we recommand using Nginx. The benefits for Nginx is not only about simplification, but also a good way to hide rpcuser, rpcpassword and port number. And you can filter some RPCs for security. Here we suppose the reader have installed Nginx and have basic knowledges about how to use it.


  • Cico node is running on,
  • api proxy ip, with Nginx installed


1.Set the cico.conf of cico node, remember to add the proxy ip to rpcallowip e.g.:


2.Setup Nginx :

    server {
        listen       80;
        server_name  localhost;

        location / {
            proxy_pass;  #to port 38890
            proxy_set_header Authorization "Basic dGVzdDp0ZXN0MTIzNA==";  # its the base64 encode of test:test1234

3.Then you can make remote rpc call through proxy, without rpcuser or rpcpassword. e.g.:

zhongwenbins-MacBook-Pro:~ zhongwenbin$ curl  --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }' -H 'content-type: text/plain;'

This is only a simple example. You might have different settings or tools instead.

Useful commands and documents

If you have any questions during node deployment and RPC calls, here are some useful documents to refer to: