XMR Node Proxy - The-GNTL-Project/Documentation GitHub Wiki

Table of Contents

Description

Here is our simple setup guide for XMR Node Proxy, using the Moneroocean maintained repository.

We recommend using XMR Node Proxy, when you are mining using more than 15 workers. The proxy gains a massive boost over a basic pool by accepting that the majority of the hashes submitted will not be valid (does not exceed the required difficulty of the pool). Due to this, the proxy doesn't bother with attempting to validate the hash state nor value until the share difficulty exceeds the pool difficulty.

The proxy is extremely light weight. Installation has been tested on Debian 11 (minimal install), but can also work on other versions.

Installation

Pre-requisites

These are all required before you proceed:

  • Minimum specification of 1 CPU Core, 512MB RAM, and at least 5GB Disk Space (the installation may struggle during compile due to low RAM). Recommended minimum specifications are 2 CPU Cores and 2GB RAM. * Higher loads of workers may require a higher specification.
  • Debian 11 installed, with OpenSSH Server.
  • TCP Port 7000 is open inbound on your firewall
  • An SSH Client, such as puTTY.

Create a User

If you do not have a user created, create one. Change and to your desired username and password:

sudo adduser <USERNAME>
sudo passwd <USERNAME>
<USER PASSWORD>

Add your new/existing user to sudoers

This must be done so the script can sudo up and do it's job.

sudo usermod -aG sudo <USERNAME>
echo "<USERNAME> ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/<USERNAME>

If you see an access denied message, do the following:

sudo su
echo "<USERNAME> ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/<USERNAME>
exit

Login as your user

If not already logged in, login as your user.

Create Swap File

A swap file will help, when RAM is running low. Adjust the size, depending on how much disk space you have free.

Create Swap File:

sudo swapoff -a
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Open File System Table:

sudo nano /etc/fstab

Add line at the end:

/swapfile swap swap defaults 0 0

Save and Exit: CTRL S CTRL X

Show Swap File Usage and switch on

sudo swapon --show
sudo free -h
sudo swapon -a

Start a Screen Session

Screen will retain the session on disconnect, which we can re-connect to:

screen -S Install

Install XMR-Node-Proxy

Lets now install XMR-Node-Proxy:

sudo apt install curl -y
curl -L https://raw.githubusercontent.com/MoneroOcean/xmr-node-proxy/master/install.sh | bash
cd ~/xmr-node-proxy
wget -O config.json https://raw.githubusercontent.com/The-GNTL-Project/Configs/master/XNP_config.json
source ~/.bashrc
pm2 start proxy.js --name=proxy --log-date-format="YYYY-MM-DD HH:mm:ss:SSS Z"
pm2 save
pm2 set pm2-logrotate:retain 14

Exit Screen Session

Install is now complete, so we can exit the Screen session:

exit

Configuration

We will now configure the proxy for our needs.

Edit the installed Config File

Edit ~/xmr-node-proxy/config.json using your preferred editor, and set the Pool Configuration details, for the pool you are mining on:

"hostname": "POOL_URL",
"port": POOL_PORT,
"username": "YOUR_WALLET_ADDRESS",
"password": "YOUR_WORKER_NAME:YOUR_EMAIL_ADDRESS or just WORKER_NAME",

Run the Proxy

We will now start the proxy so it loads our configuration:

cd ~/xmr-node-proxy/
pm2 start proxy.js --name=proxy --log-date-format="YYYY-MM-DD HH:mm:ss:SSS Z"
pm2 save

Force PM2 to spawn proxy

PM2 may not always resurrect the proxy start-up, so let's force it by running the following, which will output a command line, which we must run:

pm2 startup

Example Output from the pm2 startup command:

sudo env PATH=$PATH:/home/USERNAME/.nvm/versions/node/v14.17.3/bin /home/USERNAME/.nvm/versions/node/v14.17.3/lib/node_modules/pm2/bin/pm2 startup systemd -u USERNAME --hp /home/USERNAME

Run the output you see in your installation.

Start Mining to the Proxy

Configure your miners to mine to the proxy IP/HOSTNAME:7000, and start the miners. In the pools section, you only need to configure the following. NOTE The pass field is the worker name field, and must be unique for each of your miners:

            "url": "IP/HOSTNAME:7000",
            "pass": "UNIQUE_WORKER_NAME",

Monitoring the Proxy

The proxy has a live log monitor, accessible via the console, and it also has a web stats page showing connected miner stats.

  • Continuing in the SSH session, to opening up log monitor:
    • pm2 log - This will show you a live auto-scrolling log. Use CTRL-C to exit out of log monitor.
  • Web stats are available at http://PROXYHOSTNAME_OR_IPDDRESS:8081/.
⚠️ **GitHub.com Fallback** ⚠️