Install your own node uCoin

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

Let’s go!

Requirement

  • A GNU/Linux distribution
  • node.js + npm installed
  • MongoDB:
sudo [package manager] (apt-get) install mongodb

1. Installing uCoin

Simply run:

$ 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 88.163.127.43
[?] 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.
Remote parameters

On above config, you can see 3 special parameters:

[?] Remote IPv4 88.163.127.43
[?] 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

Proof-of-Work parameters

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

ucoind start

4. Enjoy!

There we are! You should have your node either computing next block, or just waiting for new data.

CPU use

You can limit CPU use with the command:

ucoind --cpu 0.8

uCoin will use 80% of CPU.

1 Like

I’ve copied your tutorial to the Wiki: https://github.com/ucoin-io/ucoin/wiki

We should edit it there (on the Wiki) from now, since we need a central place for documentation.

Anyway, thanks for your work :slight_smile:

I’ve updated your tutorial with my latest try on a raw Ubuntu 14.04 LTS.

One may now follow official wiki tutorial to install its node.

Some problems on my ububtu 14.04 LTS 32 bits
http://paste.yunohost.org/dicilecusa.coffee
Do you need my npm-debug.log?

Well, can you first try to:

sudo npm uninstall -g node-gyp

And then retry:

sudo npm install -g ucoin

If it still fails, yes, please past us your logs + npm-debug.log.

root@toto:/home/olivier# sudo npm uninstall -g node-gyp
npm WARN uninstall not installed in /usr/lib/node_modules: “node-gyp”

npm-debug.log is to big for pastebin
where should I send it?

Maybe just paste the last 3000 lines with tail -n 3000 of your npm-debug.log.

last 3000 lines:
http://paste.yunohost.org/hisojetaxe.tex

Problem identified & reproduced: you are running a 32 bits Ubuntu, which seems to make the compilation fail! I have to investigate how to overcome this :slight_smile:

Je suis de retour via l’appli android (chouette!!!). Mais est que qqun doit me recertifier (poiete) pour je rerentre dans jeu ?our je rerentre dans jeu ? ??