How to install your own instance of uCoin to either:
- Participate to the writing of the blockchain
- Just have a local passive node for mirroring
- A GNU/Linux distribution
- node.js + npm installed
sudo [package manager] (apt-get) install mongodb
1. Installing uCoin
$ sudo npm install -g ucoin
You can check installed version by using:
$ ucoind --version 0.10.x
2. Configure and synchronize your node
ucoind bootstrap metab.ucoin.io 9201
Good! We have downloaded & applied an existing blockchain on our node.
As a first installation, you only need to make a basic configuration. Here is how:
$ ucoind wizard basic
This command is an helper to configure your node without making too much errors. My configuration looks like:
[?] Key's salt: *********** [?] Key's password: ********* [?] IPv4 interface: eth0 192.168.1.18 [?] IPv6 interface: None [?] Port: 9101 [?] Remote IPv4 22.214.171.124 [?] Remote IPv6 None [?] Remote port: 9101 [2014-11-21 19:08:55.694] [DEBUG] ucoind - Configuration saved.
Where salt & password are the values I use for my personal key of member. If what you want is to write into the blockchain, you should do this too. Otherwise, you can put whatever values for salt & password.
On above config, you can see 3 special parameters:
[?] Remote IPv4 126.96.36.199 [?] Remote IPv6 None [?] Remote port: 9101
These are the network configuration for others to reach your node outside your private network, for example from the Internet.
This data will be publicly available, since your node will send it to ucoin network so your node can be forwarded new data (blocks, peers, …).
This is where you might need to access your Internet box and open a port, and redirect it to your local ucoin instance whose parameters are (for example):
[?] IPv4 interface: eth0 192.168.1.18 [?] IPv6 interface: None [?] Port: 9101
You will also need to configure Proof-of-Work parameters:
$ ucoind wizard pow [?] Participate writing the blockchain (when member) Yes [?] Start computation of a new block if none received since (seconds) 1200 [2014-11-21 19:15:53.635] [DEBUG] ucoind - Configuration saved.
Here, if you do not want to participate to the writing of the blockchain, just answer “No” to the first question. Otherwise, you will be asked for a delay to wait before computing next block. I suggest value 1200 here. You can put whatever value you want, this is for computation (CPU) saving purposes. This value is in seconds.
3. Start your node
There we are! You should have your node either computing next block, or just waiting for new data.
You can limit CPU use with the command:
ucoind --cpu 0.8
uCoin will use 80% of CPU.