How to build your own mining pool - mining pool construction tutorial

How to build your own mining pool - mining pool construction tutorial

The author translated this article for the sake of the majority of miners who want to build their own mining pools. I removed a lot of useless things from the original article and left only the essence. As long as you follow the tutorial, you can build a pool.

Now, the translation begins:

Here is a step-by-step guide on how to set up your own mining pool for Bitcoin, Litecoin, and other cryptocurrencies.

Table of contents

  • Guidelines

  • VPS Setup

    • Update Ubuntu

    • Setting up swap space

    • Install Required Packages

    • User Settings

    • Restart

  • Litecoin Daemon Setup (Electrum Wallet)

  • Mining Pool Setup

    • Download and update uNOMP

    • Main Configuration

    • Mining pool configuration

    • Start your mining pool


Require

  • Putty

  • A VPS with at least 2 cores, 4GB of RAM, 50GB of disk space, and Ubuntu server 14.04 x64 (I used Vultr for this guide )

  • WinSCP

  • Very basic Linux knowledge

VPS Setup

Start your VPS and log in as root.

Update Ubuntu

apt-get update
apt-get dist-upgrade

Setting up swap space

By default, there is no swap space on our VPS, so we need to set 4GB of swap space, which is the most commonly used swap space size for VPS, otherwise there may be insufficient memory. (Translator says: This swap space is the same as virtual memory in Windows)

dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=4000
mkswap /mnt/myswap.swap
swapon /mnt/myswap.swap

Now we will add it to fstab so that it will start at boot time.

nano /etc/fstab

Add the following content at the end of the file.

/mnt/myswap.swap none swap sw 0 0

As shown in the figure:

Press Ctrl+O to save and Ctrl+X to exit nano editor.

Now that your swap space is established, you can modify the size in the future if you need more or less space.

Install Required Packages

apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server add-apt-repository ppa:bitcoin/bitcoin apt-get update
apt-get install libdb4.8-dev libdb4.8++-dev
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh
source ~/.profile
nvm install 0.10.25
nvm use 0.10.25

User Settings

We need to create a normal account because many operations in the root account will go wrong.

adduser usernameyourwant

(Translator says: You can change usernameyourwant yourself)

Then give the user sudo privileges

adduser usernameyousetup sudo

(The usernameyousetup here corresponds to the above)

Restart

reboot

(Translator says: You don’t have to compile the wallet. We can directly download the compiled wallet, which is the Linux command line wallet. You can download it from the official website of the general currency. Compilation takes time and is prone to problems. I recommend downloading the compiled wallet directly)

Litecoin Daemon Setup (Electrum Wallet)

Now let's setup the coin daemon, I will be using Litecoin.

Start and log in to the new user we set up earlier.

cd
git clone https://github.com/litecoin-project/litecoin.git

Now let's compile litecoin.

cd litecoin
sudo ./autogen.sh
sudo ./configure
sudo make
sudo make install

The compilation process takes a long time if you have a small VPS with only 1 or 2 cores. If you execute the command "sudo make", it will take a long time to run the wallet out. You can go to the club to kill time, hehehe, because it takes a long time.

Once compiled, let's go ahead and run litecoind (the daemon), which will create the .litecoin directory in your user home directory.

cd src
./litecoind

You will get a message saying that you have no configuration file .

Now we need to set up the configuration file for litecoind.

We use WinSCP to edit/append files, you can also use nano, gedit, vim or any shell based text editor you want. However, it is easier for beginners to start editing with a graphical interface.

You can get WinSCP here : http://winscp.net/eng/download.php

Once you install WinSCP, you will be prompted with a login screen.

  • Select “New Site”

  • "File Protocol" is SFTP

  • "Host Name:" is the IP address of your VPS

  • "Port number" is the ssh port you use, usually 22

  • "Username:" is root

  • "Password:" is your root password

Fill in everything as shown (use your server information):

Click Login and make sure to accept the host key.

Now you are logged in and you are in the /root folder. Double click ".." to exit.

The file path is /home/username/.litecoin

  • Click on the "home" folder.

  • Click the folder named after your username.

  • Clicking on “.litecoin” will turn grey as shown below:

  • Right click on the white area in WinSCP and go to "New" and "File". As shown:

  • Name the file "litecoin.conf"

A white text editor window should pop up, this is WinSCP's internal editor, which we will use to edit the contents of the file. Now we are going to put some basic things into the configuration file. The username and password cannot be the same.

rpcuser = litecoinrpc
rpcpassword = wdYMsDT4E61jCv8xx6zZd6PYF3iZkjD7t3NpuiGpn6X
rpcallowip = 127.0.0.1
rpcport = 2300
daemon = 1
server = 1
gen = 0

Now that you have updated the litecoin.conf file, go ahead and click on the floppy disk icon at the top left of the WinSCP editor.

Now that we have our configuration file setup and saved, let's get back to ssh (putty) with the user we created earlier.

cd
cd litecoin/src
./litecoind

You should get a message saying “Litecoin Server Started”, if for some reason you can’t exit out of that command, just press Ctrl+C and it should fix it.

Now let's make sure it is updating.

./litecoin-cli getinfo

You should see a bunch of information that looks like this:

Run the getinfo command multiple times and you should see the "blocks" number update each time you run the getinfo command.

By the end of this guide your wallet should be fully synced. To do this you can run the getinfo command and compare the block number to http://explorer.litecoin.net/ . If the block number matches that website then your wallet is fully synced.

The last thing we need to do is get a new address for our litecoin wallet.

./litecoin-cli getnewaddress

The address will be displayed, please keep a record of this address. We will use it later in the guide.

Mining pool settings

Using unomp mining pool

Download and update uNOMP

cd git clone https://github.com/UNOMP/unified-node-open-mining-portal.git unomp
cd unomp
sudo npm update

Main Configuration

cd
cd unomp
cp config.json.example config.json

Now let's open WinSCP.

  • Go to the /home/username/unomp directory

  • Right-click on config.json and select Edit

  • Find "Website":

  • Under the website, find "host": and change "0.0.0.0" to the IP of your VPS

  • save!

Here is an example of a picture, highlighted in yellow. The author used a fake IP, but please use your actual IP.

The other defaults in config.json are fine, but I recommend that you modify things like the website title, administrator password, and so on.

Mining pool configuration

The way uNOMP works is that you can have multiple pools running from one instance. For the pool configuration portion of this guide, you will be setting up the Litecoin pool. So if you want to add one more currency in the future, you can add another currency configuration to the pool_configs folder and you will have another pool running for another currency (as long as you have the daemon set up, make sure the coin.json is in unomp/coins/ and that the settings are correct in the pool config).

cd
cd unomp/pool_configs
cp litecoin.json.example litecoin.json

Now let's open WinSCP.

  • Navigate to /home/username/unomp/pool_configs

  • Right click on litecoin.json and select Edit

  • Find "enabled" and change it to true,

  • Find "auxes": and delete everything between the [ ], if you don't understand there are pictures below.

  • Find “address:” and put the address we saved earlier from the litecoin daemon settings.

  • Find "paymentInterval": and change it to 30,

  • Find "minimumPayment": and change it to 0.01,

  • Find “daemons”: Under it find “ports”: and change it to the user from your litecoin.conf

  • Find "user": and change it to the user in litecoin.conf (see litecoin daemon settings)

  • Find "password": and change it to the password in your litecoin.conf (see litecoin daemon settings)

  • Scroll down to "daemons": after the port and configure your litecoin daemon (same information as the previous 3 steps)

  • save!

Here is an example of the picture, everything I modified is highlighted in yellow.

Start your mining pool

Now it's time to get started, fingers crossed!

cd
cd unomp
sudo node init.js

As shown in the figure:

If you see something like the image above, congratulations, you configured everything correctly. If you get an error somewhere, the first thing I recommend is to be in the unomp directory, do a "sudo npm update" and try again. If it doesn't work, read the guide again and try to figure out what step you missed. If that still doesn't work, then use a search engine to look for your error. Chances are there is a solution on github or somewhere else.

Now let's see if your web page is working, use your web browser and go to http://yourvpsip

As shown in the figure:

Now open your mining software and connect to the mining pool to mine. If you still don’t know how to connect to the mining pool, I’m sorry, you don’t even know how to connect to the mining pool, and you still want to see how to build a mining pool? ? ? Maybe you have a hole in your brain.

Open your SSH terminal (Putty) using the command "sudo node init.js". You should see the LTC address you mined, as shown:

After a while you will see the shares accepted. You can also check the statistics on the uNOMP web page.

Now that you have verified that everything is working properly, you can stop the pool by pressing “Ctrl + C”.


Original link: https://blockgen.net/setup-your-own-mining-pool/


<<:  What is the digital currency that the central bank is going to launch after a year of hard work?

>>:  Study: The impact of Bitcoin halving on price

Recommend

How is the fortune of people with lucky lines on their hands?

In palmistry, if a person has noble lines on his ...

What does cinnabar mole mean?

If you observe carefully, you will find that ever...

The facial features of those who don't like to think

In fact, many times, we need to think about some ...

Coin Zone Trends: Bitcoin Price Trends Based on Big Data This Week (2016-07-12)

Range oscillation continues, and the number of ne...

Your popularity depends on your appearance

Your popularity depends on your appearance As the...

What influence does the mole on the chest have on our life?

People with moles on their chest generally have g...

Shenma M3 Mining Settings-BTC Mining Tutorial

1. Preparation Before using the Shenma M3 mining ...

How is the fortune of a woman with a hump nose?

The appearance of the nose is often very importan...

Is it true that men have left palm and women have right palm?

Many people know the saying that men wear left pa...