Why should I deploy my miner agent server?
Due to a huge number of miners in large mining farms, if miners directly connect to the Stratum URL, the rejection rate can be high because of network or other reasons. Take the task switching as an example. With a less stable network, miners might keep working on the previous task which has been changed already, resulting in a waste of hashrate. However, if a miner agent server is installed in the mining farm, the mining pool will first deliver the task to the miner agent server, and miners get the task from such server. When submitting the result, the miner agent server will receive the result from miners first and pass it to the mining pool server, thus improving the mining stability and reducing the rejection rate to a large extent.
If you are running a high hashrate mining farm with many miners, you might as well deploy your miner agent server.
What I can benefit from it?
1. Miners can focus on mining without distractions with a miner agent server dedicated to deliver and submit tasks.
2. Reduce the bandwidth consumption and free the network resources of mining pools and mining farms.
Note: Currently, only BTC and BCH is available for the miner agent server.
What should I do before installation?
Before deploying the miner agent server, you should make the following preparations:
1. A networked computer that acts as the miner agent server.
2. The Linux operating system of ubuntu 14.04 or above needs to be installed on the computer.
Note: After completing the configuration of the server, this computer will play a role as your long-running miner agent server.
Deploy your miner agent server according to the following steps.
Step 1: Install mineragent
Open the Terminal command line and enter the following command to switch to the root user:
If you haven’t set the root user, enter the following command to activate it:
sudo passwd su
After setting the root password, you can re-run the following command to switch to the root user:
Next, type the first line of command to enter /root/ directory. Type the second line of command to download mineragent:
git clone https://github.com/viabtc/mineragent.git
You can see a directory called “mineragent-master” is downloaded. Enter the directory, choose to configure a BTC agent or BCH agent according to your own needs. If you favor the BTC agent, enter the following command:
If you’re going to configure the BCH agent, enter the following command:
The "mineragent-master" directory contains the applications, logs, gadgets, etc. of the mineragent. If you have a VIP Stratum URL, you can also edit the "config/config.json" file to change the default Stratum URL "stratum.viabtc.com" to your VIP URL.
Step 2: Start mineragent
By entering the following command to run the restart script, you can start the mineragent:
If you want the mineragent to run automatically after the computer is turned on or restarted, you can edit the scheduled task table to run the keep-alive script.
Add a line below the scheduled task list:
*/1 * * * * /root/btc_mineragent/shell/check_alive.sh >/dev/null 2>&1
By completing the above steps, the mineragent can start running and successfully be set to run on startup.
Step 3: Set a fixed IP (optional)
If you want the mineragent to run with a fixed IP, you can achieve this by setting the network of the server. Back to the ubuntu desktop:
1. Click the network icon in the upper right corner (wired connection).
2. Click Edit Connection, select wired connection to edit.
3. Select IPv4 and fixed IP to set the LAN IP, subnet mask, etc. (Please consult a professional network administrator of the mining farm for configuration here)
4. Disconnect the wired network and reconnect.
By completing the above steps, a fixed IP of the mineragent is configured. Run the following command to view the mineragent IP:
Since the mineragent and network have been configured, you can use one or two miners to verify the settings. Enter the Configuration page or batch settings software provided by the miner for configuration. Assuming that the LAN IP of the miner agent server is 192.168.1.5 and the mining coin is BTC, the miner should connect to the following Stratum URL (the specific address is determined by your actual IP):
Stratum URL 1:192.168.1.5:3333
Stratum URL 2: 192.168.1.5:443
Stratum URL 3: btc.viabtc.com:3333
(If the mining coin is BCH, then the Stratum URL 3 is bch.viabtc.com:3333 )
As shown in the figure:
The first two Stratum URLs shown in the figure connect to the miner agent server, and the last Stratum URL directly connects to the mining pool. In this way, even when a failure occurred in the miner agent server, the miner can continue mining by connecting to the mining pool server.
After the configuration, if the miner starts to run and the status of the connected Stratum URL is Alive, then the miner agent server is operating normally, and the miner can start mining. You can also log in to ViaBTC, view the hashrate of miner at Workers page for further verification.
If everything goes well during the above verification, you’ve successfully completed the configuration of your miner agent server! You can connect more miners to the miner agent server, and enjoy a more stable mining experience with a lower rejection rate.