How to deploy a Qtum node

This guidance includes how to deploy, run and make RPC calls.

Suppose the readers are able to use Linux,Mac or Windows command line. If you are not familiar with command line, or just interested in using GUI wallet, please refer to another document about Qtum Wallet Tutorial.

Get Qtum Node

There are at least 4 ways to get a Qtum node, you can choose any way：

1. Download the binaries

If you do not care much about Qtum's source code, the easiest way to abtain Qtum node is to download the latest binaries on the Qtum release page. Currently it supports Linux, Window, OSX. It is highly recommanded to download the latest version. In this guidance, we will use v0.14.13 version as an example。

（Note: the version number you see might be different, here is v0.14.13, but other key words except for version are the same.）

For Mac user：qtum-0.14.13-osx64.tar.gz

For Linux users： qtum-0.14.13-i686-pc-linux-gnu.tar.gz(32bit) or qtum-0.14.13-x86_64-linux-gnu.tar.gz(64bit)

For Windows users：qtum-0.14.13-win32.zip(32bit) or qtum-0.14.13-win64.zip（64bit）

For Raspberry Pi：qtum-0.14.13-arm-linux-gnueabihf.tar.gz

Decompress after downloading, then you will get qtumd and qtum-cli under the path <your path>/bin.

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 qtum node is running on an Ubuntu machine, whose ip is 192.168.77.188, default port=3889. Now we try to make jsonrpc call in a remote macbook:

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.

example:

Qtum node is running on 192.168.77.188,

api proxy ip 192.168.77.51, with Nginx installed

Instructions：

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