Running an MWC Node on linux Mint
Quote from Mike on December 11, 2024, 4:53 amWe will setup and install the MWC Node on Linux.
Please note, the mwc-qt-wallet available at the Wallet Download page is not for mining. If you are running qt wallet or mwc713, please do not try to use it for mining.
Preperquisited
Install ‘tree’, ‘curl’ and ‘telnet’ to validate the setup
> sudo apt-get install curl > sudo apt-get install telnet > sudo apt-get install tree
Install of MWC node and mwc-wallet
In this install we will install everything at
~/my_mwc_install
. All commands referred to assume this path.Download mwc node from [https://github.com/mwcproject/mwc-node/releases/latest]. We are assuming that the resulting file will be located at
~/Downloads/mwc-node-XXXXX-linux-amd64.tar.gz
. The latest Release as of this tutorial is 5.3.5. This Version may change over time.Download mwc-wallet from [https://github.com/mwcproject/mwc-wallet/releases/latest]. We are assuming that the resulting file will be located at
~/Downloads/mwc-wallet-XXXXX-linux-amd64.tar.gz
. or you can go to https://mwc.mw and download it from there.Now let’s install everything into
~/my_mwc_install
.to do this open the Terminal app and run the following commands:
mkdir ~/my_mwc_install cd ~/my_mwc_install tar -xvf ~/Downloads/mwc-node-*-linux-amd64.tar.gz tar -xvf ~/Downloads/mwc-wallet-*-linux-amd64.tar.gzYour output should be something like this:
kbay$ mkdir ~/my_mwc_install kbay$ cd ~/my_mwc_install my_mwc_install kbay$ tar -xvf ~/Downloads/mwc-node-*-linux-amd64.tar.gz x mwc/ x mwc/mwc my_mwc_install kbay$ tar -xvf ~/Downloads/mwc-wallet-*-linux-amd64.tar.gz x mwc-wallet/ x mwc-wallet/mwc-wallet
Now your mwc-node is located at~/my_mwc_install/mwc/mwc
and your mwc-wallet is located at~/my_mwc_install/mwc-wallet/mwc-wallet
.If you run into errors. Delete everything in the downloads folder and re-download only the Node and Wallet and try again. I’m not sure why, but having other unrelated files in the Download folder could cause the install and extraction to fail.
Start the node
Start the node for the first run. paste this or type this in to the command line.
~/my_mwc_install/mwc/mwc Let it sync before we move on to the next step. This will take time. anywhere from 30 minutes to 6 hours. It should look like this once its done. Before we go on, close the node and in the terminal run this command and make sure it matches the Following:
tree ~/.mwc ~/.mwc └── main ├── chain_data │ ├── header │ │ ├── header_head │ │ │ ├── pmmr_data.bin │ │ │ └── pmmr_hash.bin │ │ └── sync_head │ │ ├── pmmr_data.bin │ │ └── pmmr_hash.bin │ ├── lmdb │ │ ├── data.mdb │ │ └── lock.mdb │ ├── mwc.lock │ ├── peer │ │ ├── data.mdb │ │ └── lock.mdb │ └── txhashset │ ├── kernel │ │ ├── pmmr_data.bin │ │ ├── pmmr_hash.bin │ │ └── pmmr_size.bin │ ├── output │ │ ├── pmmr_data.bin │ │ ├── pmmr_hash.bin │ │ └── pmmr_leaf.bin │ └── rangeproof │ ├── pmmr_data.bin │ ├── pmmr_hash.bin │ └── pmmr_leaf.bin ├── mwc-server.log └── mwc-server.toml
Please note the location of the:
log file:
~/.mwc/mwc-server.log
config:~/.mwc/mwc-server.toml
This will become Relevant in configuring the .toml file
Make sure to down load the latest MWC wallet from https://www.mwc.mw/downloads
Make sure you download and install the linux version.
Now we will edit the .toml file. when you select the folder icon ( the GUI file manager ) you will see this.
First thing you will notice is the .MWC directory is missing. Lets make it visible.
First click view and check “show hidden files” Once this is done you will see the following:
You will now see the .mwc directory: click on it and click on the main folder.
you will see a file called: mwc-server.toml double click on that and it will open in a text editor.
you will edit the following lines:
#what port and address for the stratum server to listen on
stratum_server_addr = “192.168.1.68:3416″ <– this will be your IP on the local PC running the node.To find your local ip: open a new terminal window and type IFCONFIG this will show a lot of information. but if you scroll back up. you will see your ip like this:
np1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.68 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2600:1700:9759:890::46 prefixlen 128 scopeid 0x0<global>
inet6 2600:1700:9759:890:149d:ef4b:725a:b600 prefixlen 64 scopeid 0x0<Look for the INET part and thats the ip you will replace 127.0.0.1 with.
Next you will Edit this line:
#whether stratum server is enabled
enable_stratum_server = true ( it will show false, Set it to true.)Save the toml file. When the sync is completed, shut down the node.
Now go to the linux launch menu and type MWC and open the app. login and make sure everything on the wallet is running correctly. you should see in the bottom right side a green dot by Mainnet MWCMQS Tor and http. The status should say online.
Next lets relaunch the node. in the terminal type
~/my_mwc_install/mwc/mwc
now If everything is done. and its running correctly. you should see this on the basic status: If it shows that its still syncing, we will need to wait until its completed. Next we need to make sure the Node server is enabled. You should see true on that stat: Now we need to point the miners to the node. in your web browser login to the miner and click on the pool config option. put your ip that is hosting the node. Not the ip where the miner is. after the ip place ths “:”and then enter 3416 like in the image.
Next go to your mwc wallet and select your MWCMQS address and copy it in the “pool worker field. then add a .workername Example: q5ZtXgysgaRiZHmy2FNtTmQdCwVSpdGQ5EYiMWvuDCbtiT2fN9Ui.miner1
lastly click
and then go to the node. and watch, the miner should show up within 30- 90 seconds. once its there. your set.
last thing to look for is the logs in the node click logs and make sure all the text is in yellow. if it says any thing about a stale or rejected block it is ok. If it say it cant connect to wallet, make sure you entered the ip correctly
Thats is it. you are now mining on a local node.
We will setup and install the MWC Node on Linux.
Please note, the mwc-qt-wallet available at the Wallet Download page is not for mining. If you are running qt wallet or mwc713, please do not try to use it for mining.
Preperquisited
Install ‘tree’, ‘curl’ and ‘telnet’ to validate the setup
> sudo apt-get install curl
> sudo apt-get install telnet
> sudo apt-get install tree
Install of MWC node and mwc-wallet
In this install we will install everything at ~/my_mwc_install
. All commands referred to assume this path.
Download mwc node from [https://github.com/mwcproject/mwc-node/releases/latest]. We are assuming that the resulting file will be located at ~/Downloads/mwc-node-XXXXX-linux-amd64.tar.gz
. The latest Release as of this tutorial is 5.3.5. This Version may change over time.
Download mwc-wallet from [https://github.com/mwcproject/mwc-wallet/releases/latest]. We are assuming that the resulting file will be located at ~/Downloads/mwc-wallet-XXXXX-linux-amd64.tar.gz
. or you can go to https://mwc.mw and download it from there.
Now let’s install everything into ~/my_mwc_install
.
to do this open the Terminal app and run the following commands:
mkdir ~/my_mwc_install cd ~/my_mwc_install tar -xvf ~/Downloads/mwc-node-*-linux-amd64.tar.gz tar -xvf ~/Downloads/mwc-wallet-*-linux-amd64.tar.gz
Your output should be something like this:
kbay$ mkdir ~/my_mwc_install kbay$ cd ~/my_mwc_install my_mwc_install kbay$ tar -xvf ~/Downloads/mwc-node-*-linux-amd64.tar.gz x mwc/ x mwc/mwc my_mwc_install kbay$ tar -xvf ~/Downloads/mwc-wallet-*-linux-amd64.tar.gz x mwc-wallet/ x mwc-wallet/mwc-wallet
Now your mwc-node is located at~/my_mwc_install/mwc/mwc
and your mwc-wallet is located at~/my_mwc_install/mwc-wallet/mwc-wallet
.
If you run into errors. Delete everything in the downloads folder and re-download only the Node and Wallet and try again. I’m not sure why, but having other unrelated files in the Download folder could cause the install and extraction to fail.
Start the node
Start the node for the first run. paste this or type this in to the command line.
~/my_mwc_install/mwc/mwc
Let it sync before we move on to the next step. This will take time. anywhere from 30 minutes to 6 hours.
It should look like this once its done.
Before we go on, close the node and in the terminal run this command and make sure it matches the Following:
tree ~/.mwc
~/.mwc
└── main
├── chain_data
│ ├── header
│ │ ├── header_head
│ │ │ ├── pmmr_data.bin
│ │ │ └── pmmr_hash.bin
│ │ └── sync_head
│ │ ├── pmmr_data.bin
│ │ └── pmmr_hash.bin
│ ├── lmdb
│ │ ├── data.mdb
│ │ └── lock.mdb
│ ├── mwc.lock
│ ├── peer
│ │ ├── data.mdb
│ │ └── lock.mdb
│ └── txhashset
│ ├── kernel
│ │ ├── pmmr_data.bin
│ │ ├── pmmr_hash.bin
│ │ └── pmmr_size.bin
│ ├── output
│ │ ├── pmmr_data.bin
│ │ ├── pmmr_hash.bin
│ │ └── pmmr_leaf.bin
│ └── rangeproof
│ ├── pmmr_data.bin
│ ├── pmmr_hash.bin
│ └── pmmr_leaf.bin
├── mwc-server.log
└── mwc-server.toml
Please note the location of the:
log file: ~/.mwc/mwc-server.log
config: ~/.mwc/mwc-server.toml
This will become Relevant in configuring the .toml file
Make sure to down load the latest MWC wallet from https://www.mwc.mw/downloads
Make sure you download and install the linux version.
Now we will edit the .toml file. when you select the folder icon ( the GUI file manager ) you will see this.
First thing you will notice is the .MWC directory is missing. Lets make it visible.
First click view and check “show hidden files” Once this is done you will see the following:
You will now see the .mwc directory: click on it and click on the main folder.
you will see a file called: mwc-server.toml double click on that and it will open in a text editor.
you will edit the following lines:
#what port and address for the stratum server to listen on
stratum_server_addr = “192.168.1.68:3416″ <– this will be your IP on the local PC running the node.
To find your local ip: open a new terminal window and type IFCONFIG this will show a lot of information. but if you scroll back up. you will see your ip like this:
np1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.68 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2600:1700:9759:890::46 prefixlen 128 scopeid 0x0<global>
inet6 2600:1700:9759:890:149d:ef4b:725a:b600 prefixlen 64 scopeid 0x0<
Look for the INET part and thats the ip you will replace 127.0.0.1 with.
Next you will Edit this line:
#whether stratum server is enabled
enable_stratum_server = true ( it will show false, Set it to true.)
Save the toml file. When the sync is completed, shut down the node.
Now go to the linux launch menu and type MWC and open the app. login and make sure everything on the wallet is running correctly. you should see in the bottom right side a green dot by Mainnet MWCMQS Tor and http. The status should say online.
Next lets relaunch the node. in the terminal type
~/my_mwc_install/mwc/mwc
now If everything is done. and its running correctly. you should see this on the basic status: If it shows that its still syncing, we will need to wait until its completed. Next we need to make sure the Node server is enabled. You should see true on that stat: Now we need to point the miners to the node. in your web browser login to the miner and click on the pool config option. put your ip that is hosting the node. Not the ip where the miner is. after the ip place ths “:”
and then enter 3416 like in the image.
Next go to your mwc wallet and select your MWCMQS address and copy it in the “pool worker field. then add a .workername Example: q5ZtXgysgaRiZHmy2FNtTmQdCwVSpdGQ5EYiMWvuDCbtiT2fN9Ui.miner1
lastly click
and then go to the node. and watch, the miner should show up within 30- 90 seconds. once its there. your set.
last thing to look for is the logs in the node click logs and make sure all the text is in yellow. if it says any thing about a stale or rejected block it is ok. If it say it cant connect to wallet, make sure you entered the ip correctly
Thats is it. you are now mining on a local node.