How to compile an 8BIT Masternode on an Ubuntu Linux VPS - A Guide

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@robertharrison·
0.000 HBD
How to compile an 8BIT Masternode on an Ubuntu Linux VPS - A Guide
![8bit.png](https://steemitimages.com/DQmQpXPqKDKVd3kq647G4JVjUFjYjUTgZ7coBVxb27xKHeG/8bit.png)

This guide will show you how to compile an 8BIT Masternode on an Ubuntu Linux VPS. I will assume that you already have a local wallet and your VPS. I have used this exact process to set up several 8BIT masternodes myself.

We will be compiling the daemon for use in setting up a hot/cold system. Meaning, your coins will be stored on a local machine, like your laptop, and the masternode will be on the VPS.

It should be noted, that 8BIT currently doesn't run well (or sometimes at all) on a Windows machine, so I recommend that your local machine is Linux as well, but that's up to you. Personally, I don't use Windows for 8BIT at all, so I won't be able to help you if you go that route.

Ok, lets get started!

Log into your VPS. I recommend you have a user account and that you don't do this as root.

Once logged in, follow these steps (these are the exact commands you will type in and anything incased in <> characters need to be filled in with your specific information).

```
mkdir <directory you want this to live in>
cd <that directory>
sudo apt-get update
sudo apt-get install software-properties-common python-software-properties ufw
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev
sudo apt-get install libdb4.8++-dev
sudo apt-get install build-essential libssl-dev libboost-all-dev libqrencode-dev libminiupnpc-dev autoconf git-core
git clone https://github.com/8bit-dev/8bit
cd 8bit
git clone https://github.com/bitcoin/secp256k1.git
cd secp256k1
git checkout a1d5ae1
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
cd ../src
mkdir obj/crypto
sed -i 's/<const\ CScriptID\&/<CScriptID/' rpcrawtransaction.cpp
cd ..
```
<br>
Now, before we actually make the headless daemon for 8bit, we need to do some editing. Type the below into a text file and save it in the 8bit directory with a file name of: 8bit.patch

```
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 733eb2e..ce70263 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -6,6 +6,7 @@
 #include "rpcserver.h"
 #include "rpcclient.h"
 #include "init.h"
+#include "masternodeconfig.h"
 #include <boost/algorithm/string/predicate.hpp>
 
 void WaitForShutdown(boost::thread_group* threadGroup)
@@ -63,6 +64,13 @@ bool AppInit(int argc, char* argv[])
             return false;
         }
 
+        // parse masternode.conf
+        std::string strErr;
+        if(!masternodeConfig.read(strErr)) {
+            fprintf(stderr,"Error reading masternode configuration file: %s\n", strErr.c_str());
+            return false;
+        }
+
         // Command-line RPC
         for (int i = 1; i < argc; i++)
             if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "8bit:"))
```
<br>
Be sure that you use a basic text editor and that there are now erroneous characters from the copy/paste. If it doesn't work, the best solution is to manually type everything in (yes a pain, but the best way to make it work if you're having problems).

Now, let's apply the patch. Type in the following command:

```
patch src/bitcoind.cpp 8bit.patch
```
<br>
Now, lets continue our process. Type in the following commands:

```
cd src
make -f makefile.unix
strip -s 8bitd
mv 8bitd <where ever you want it to live>
```
<br>
That's it! You now have built the 8BIT deamon and are set to run it.

If there are enough people having trouble getting things to run with the hot / cold setup, I'll follow up this guide with one that creates the local wallet and has all of the configuration files needed. That's pretty basic, as far as masternodes go, so you shouldn't really need any help.

Please feel free to reach out to me with any questions.

Donations are, of course, appreciated.

8BIT: 8WKAHPobbEyaEg4joAwAW4LfbUSDXvhqtV
BTC: 1HjKtUMPnjXck3rHejU5G6zyHAZo8RkEZ1
LTC: LiLY5krGmEFJjx7Qh3FxiUXSBaJYX7X44V
👍 , , , , ,