Author

Topic: [Tutorial] Install a mining pool [NOMP] on Ubuntu Server 18.04 (Read 649 times)

legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
You are going to have to jump thought a bunch of hoops to get there but you can get old / unsafe / you should not be running them versions of nodejs here:

https://nodejs.org/dist/

You are then going to have to go through and install any dependency it needs one at a time.
archive.org is your friend for this it may not get you everything but it should get you a lot.

The other way to go is Yiimp there are a few installer scrips for that out there.

-Dave
newbie
Activity: 28
Merit: 0
I no longer have a node running, nor do i have an ubuntu machine to test things out... But looking at your output, there are a couple of things i see:

I see a lot of deprecation warnings. The developer of nomp should probably update his dependency list. I also see a timeout when a git fetch is executed. Was your network ok?
All in all, i guess you'll have to double check your network, and if it works fine open an issue on the nomp git repository.

When this guide was written 2,5 years ago, this walktrough worked fine... But in tech 2,5 years is forever... Things change really fast...

Thanks for your response, indeed, I had nomp working fine in the past (3 years ago) now the packages are outdated, if you look at their repository, you will notice nothing was updated for 6/8/10 years, I don't see a recent update,  I don't know if I can get any help from the maintainers.

By the way, the network is fine, I tried this several times, on several machines, VMs etc.. nothing works, all the issues are coming from Node.
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
I no longer have a node running, nor do i have an ubuntu machine to test things out... But looking at your output, there are a couple of things i see:

I see a lot of deprecation warnings. The developer of nomp should probably update his dependency list. I also see a timeout when a git fetch is executed. Was your network ok?
All in all, i guess you'll have to double check your network, and if it works fine open an issue on the nomp git repository.

When this guide was written 2,5 years ago, this walktrough worked fine... But in tech 2,5 years is forever... Things change really fast...
newbie
Activity: 28
Merit: 0
Why 18.04? Will it break on anything newer?

Because you're answering to a thread that was initially created 2,5 years ago...
https://wiki.ubuntu.com/Releases
At that time, 18.04 was the most recent LTS release.

If you want to know if it works on a more recent release, just try it out and report back if you succeeded.


this it the output of installing it:

npm update
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN addRemoteGit Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:275:12)
npm WARN addRemoteGit     at emitTwo (events.js:126:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:214:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:925:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
npm WARN addRemoteGit  git://github.com/zone117x/node-multi-hashing.git resetting remote /home/ubuntu/.npm/_git-remotes/git-github-com-zone117x-node-multi-hashing-git-98b61ec3 because of error: { Error: Command failed: git config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:275:12)
npm WARN addRemoteGit     at emitTwo (events.js:126:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:214:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:925:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git config --get remote.origin.url' }
npm ERR! git clone --template=/home/ubuntu/.npm/_git-remotes/_templates --mirror git://github.com/zone117x/node-multi-hashing.git /home/ubuntu/.npm/_git-remotes/git-github-com-zone117x-node-multi-hashing-git-98b61ec3: Cloning into bare repository '/home/ubuntu/.npm/_git-remotes/git-github-com-zone117x-node-multi-hashing-git-98b61ec3'...
npm ERR! git clone --template=/home/ubuntu/.npm/_git-remotes/_templates --mirror git://github.com/zone117x/node-multi-hashing.git /home/ubuntu/.npm/_git-remotes/git-github-com-zone117x-node-multi-hashing-git-98b61ec3: fatal: unable to connect to github.com:
npm ERR! git clone --template=/home/ubuntu/.npm/_git-remotes/_templates --mirror git://github.com/zone117x/node-multi-hashing.git /home/ubuntu/.npm/_git-remotes/git-github-com-zone117x-node-multi-hashing-git-98b61ec3: github.com[0: 140.82.114.3]: errno=Connection timed out
npm ERR! Linux 5.4.0-1073-azure
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "update"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code 128

npm ERR! Command failed: git clone --template=/home/ubuntu/.npm/_git-remotes/_templates --mirror git://github.com/zone117x/node-multi-hashing.git /home/ubuntu/.npm/_git-remotes/git-github-com-zone117x-node-multi-hashing-git-98b61ec3
npm ERR! Cloning into bare repository '/home/ubuntu/.npm/_git-remotes/git-github-com-zone117x-node-multi-hashing-git-98b61ec3'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 140.82.114.3]: errno=Connection timed out
npm ERR!
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/nomp/npm-debug.log


I tried on Ubuntu 18.04 and ubuntu 20.04
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
Why 18.04? Will it break on anything newer?

Because you're answering to a thread that was initially created 2,5 years ago...
https://wiki.ubuntu.com/Releases
At that time, 18.04 was the most recent LTS release.

If you want to know if it works on a more recent release, just try it out and report back if you succeeded.
member
Activity: 761
Merit: 15
Why 18.04? Will it break on anything newer?
full member
Activity: 136
Merit: 100

Hi,
which node version is used
newbie
Activity: 3
Merit: 0
Hello.. I was just looking through your thread and found some information on blinkhash and I thought you would be interested.. I am going to give it a try.. https://blinkhash.com/docs/foundation... and https://github.com/blinkhash
jr. member
Activity: 57
Merit: 22
eTitanium [ETIT] www.etitanium.net
Thanks for posting this tutorial! NOMP has definitely never really been that user-friendly as a source. Not to plug, but for the past year I've actually been working on solving this exact issue through a complete rewrite of the core code itself. Came across your thread by accident, but for anyone trying to build their own mining pool, feel free to check out https://github.com/blinkhash/blinkhash-server and its documentation (https://docs.blinkhash.com/)

can you share a live preview of it?
newbie
Activity: 15
Merit: 33
Thanks for posting this tutorial! NOMP has definitely never really been that user-friendly as a source. Not to plug, but for the past year I've actually been working on solving this exact issue through a complete rewrite of the core code itself. Came across your thread by accident, but for anyone trying to build their own mining pool, feel free to check out https://github.com/blinkhash/blinkhash-server and its documentation (https://docs.blinkhash.com/)
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
Great work.

One tiny remark: i've run countless tools in a screen session myself... However, it might be a good idear to add the creation of a systemd service in order to run the pool? That way, you can make sure it's restarted if you reboot your machine, or if it would crash for some reason..
You could also run bitcoind as a service (or whatever coin you're creating a pool for)

for example (untested!!!!, will probably need to be adapted to your walktrough):


bitcoind.service => clone (and edit) https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service in /lib/systemd/system/bitcoind.service

create nomp.service in /lib/systemd/system/nomp.service
Code:
[Unit]
Description=nomp
After=network.target bitcoind.service

[Service]
Type=simple
User=root
ExecStart=/usr/bin/node /opt/nomp/init.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

then, start and enable bitcoind.service:
Code:
systemctl enable --now bitcoind.service

check the service and the debug.log and check if it's online
Code:
service bitcoind status
tail -f ~/.bitcoin/debug.log

then, start and enable nomp.service:
Code:
systemctl enable --now nomp.service

check the service to check if it's online
Code:
service nomp status

At this point, you should be able to restart your server, and the daemon and nomp should start automatically without needing to start screen sessions to run your setup
jr. member
Activity: 57
Merit: 22
eTitanium [ETIT] www.etitanium.net
Great Guide!
But my question is How to serve it with front-end? (Website). Do I need web hosting or how I put it on? Huh

sure, you will need root vps (ubuntu)
jr. member
Activity: 101
Merit: 2
Great Guide!
But my question is How to serve it with front-end? (Website). Do I need web hosting or how I put it on? Huh
jr. member
Activity: 57
Merit: 22
eTitanium [ETIT] www.etitanium.net
Install the repository ppa:bitcoin/bitcoin with the following command:
Code:
sudo add-apt-repository ppa:bitcoin/bitcoin

This PPA contain outdated Bitcoin Core. I would advice to use Luke's Jr PPA (https://launchpad.net/~luke-jr/+archive/ubuntu/bitcoincore) or Snap (https://snapcraft.io/bitcoin-core).

yes you can use it you are right

Code:
sudo add-apt-repository ppa:luke-jr/bitcoincore
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
Install the repository ppa:bitcoin/bitcoin with the following command:
Code:
sudo add-apt-repository ppa:bitcoin/bitcoin

This PPA contain outdated Bitcoin Core. I would advice to use Luke's Jr PPA (https://launchpad.net/~luke-jr/+archive/ubuntu/bitcoincore) or Snap (https://snapcraft.io/bitcoin-core).
jr. member
Activity: 57
Merit: 22
eTitanium [ETIT] www.etitanium.net
if there is a need for it I can do one. but few seem to be of interest. in the near future i will tackle that. Thank you
copper member
Activity: 2156
Merit: 983
Part of AOBT - English Translator to Indonesia
nice tutorial would be great if you add some video tutorial in here.  Grin

but is sad but is true when most new coin using smart contract not using own blockchain so mining with hardware become unpopular and big mining pool for altcoin keep decresing
jr. member
Activity: 57
Merit: 22
eTitanium [ETIT] www.etitanium.net
Install NOMP mining pool on Ubuntu Server 18.04

Info: A scalable all-in-one easy to setup cryptocurrency mining pool and portal written entirely in Node.js.

This portal is an extremely efficient, highly scalable, all-in-one, easy to setup cryptocurrency mining pool written entirely in Node.js.
It contains a stratum poolserver; reward/payment/share processor; and a (not yet completed) responsive user-friendly front-end website featuring mining instructions,
in-depth live statistics, and an admin center.

Features: For the pool server it uses the highly efficient node-stratum-pool module which supports vardiff,
POW & POS, transaction messages, anti-DDoS, IP banning, several hashing algorithms.
The portal has an MPOS compatibility mode so that the it can function as a drop-in-replacement for python-stratum-mining.
This mode can be enabled in the configuration and will insert shares into a MySQL database in the format which MPOS expects.
For a direct tutorial see the wiki page Setting up NOMP for MPOS usage.
Multi-pool ability - this software was built from the ground up to run with multiple coins simultaneously (which can have different properties and hashing algorithms).
It can be used to create a pool for a single coin or for multiple coins at once. The pools use clustering to load balance across multiple CPU cores.
For reward/payment processing, shares are inserted into Redis (a fast NoSQL key/value store).
The PROP (proportional) reward system is used with Redis Transactions for secure and super speedy payouts.
There is zero risk to the pool operator. Shares from rounds resulting in orphaned blocks will be merged into share in the current round so that each and every share will be rewarded.
This portal does not have user accounts/logins/registrations. Instead, miners simply use their coin address for stratum authentication.
A minimalistic HTML5 front-end connects to the portals statistics API to display stats from from each pool such as connected miners, network/pool difficulty/hash rate, etc.
Coin-switching ports using coin-networks and crypto-exchange APIs to detect profitability.
Miner's connect to these ports with their public key which NOMP uses to derive an address for any coin needed to be paid out.

Sourcecode: GitHub

Install:
Update your Ubuntu server with the following command:
Code:
sudo apt-get update && sudo apt-get upgrade -y

Install the required dependencies with the following command:
Code:
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libboost-all-dev libboost-program-options-dev -y

Install the additional dependencies with the following command:
Code:
sudo apt-get install libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler unzip software-properties-common redis-server npm git nano cmake screen -y
Install the repository ppa:bitcoin/bitcoin with the following command:
Code:
sudo add-apt-repository ppa:bitcoin/bitcoin

Confirm the installation of the repository by pressing on the enter key. enter

Install Berkeley DB with the following command:
Code:
sudo apt-get update && sudo apt-get install libdb4.8-dev libdb4.8++-dev -y

Type the following commands to install NOMP:
Code:
git clone https://github.com/zone117x/node-open-mining-portal.git nomp
cd nomp
npm update

Type the following command to create the file settings.json:
Code:
cp config_example.json config.json
Open nano.
Code:
nano config.json -t

Modify the following values in the file config.json.

host - Change the value “0.0.0.0” with the IPv4 address of your server.

stratumHost - Change the value “cryppit.com” with the IPv4 address of your server.

Save the file with the keyboard shortcut ctrl + x

to create the config file for your coin e.g bitcoin:

Code:
cd coins
nano bitcoin.json -t

to create the config file for your pool:
Code:
cd ../pool_configs
nano bitcoin_pool.json -t

Modify the following values in the file bitcoin.json.

enabled - “false” -> “true”.

coin - “ yourdata ” ->

address - “yourdata ” -> Enter the receiving address from the RPC command “getaccountaddress ""”.

rewardRecipients -

minimumPayment - “ yourdata” ->

"paymentProcessing" -> port - “ yourdata” ->

"paymentProcessing" -> user - “ yourdata” ->

"paymentProcessing" -> password - “ yourdata” ->

"daemons" -> port - “ yourdata” ->

"daemons" -> user - “ yourdata” ->

"daemons" -> password - “ yourdata” ->

p2p - “true” -> .?

Save the file with the keyboard shortcut ctrl + x.

Type the following command to open a screen session:
Code:
screen

Type the following commands to start your mining pool:
Code:
cd $HOME/nomp
sudo node init.js

Press the keyboard shortcut ctrl + a + d to disconnect from your screen session.

Instructions to mine with your mining pool.

Open your wallet.

Go to Window -> Console.
This is the console where you execute RPC commands.

Type the following command, to create a legacy receiving address for your miner:
Code:
getnewaddress "" "legacy"

Modify the following values in the following text for your miner software e.g cpuminer

Code:
minerd -a sha256d -o stratum+tcp://yourserverip:3008 -u walletadress -p anything
Jump to: