Solo Mining on CLI interface
This is a tutorial on how to solo mine Sugarchain on a VPS, using a CLI interface. In this tutorial, I am using an Ubuntu 16.04 LTS Server which should be quite similar to an Ubuntu 18.04 LTS server.
Step 1: Running Wallet
Instead of running the Sugarchain GUI wallet, we will be running the Sugarchain daemon wallet
Log into your VPS server
Download and extract wallet by executing these commands:
tar -xvzf sugarchain-0.16.3.30-moonlight-x86_64-linux-gnu.tar.gz
Once downloaded and extracted, the files should be located in the
/root/ folder or your user folder. In my case, it is located in
~ is the same as
Once file is located, cd to the
/bin/ folder. E.g:
Once there, run the daemon wallet by executing this command:
It should say
Sugarchain Server is starting.
Step 2: Wallet Configuration
Once the wallet is running, we need to setup the sugarchain.conf file
- cd back to root by running
cd ~ or
cd /root/. Either one works.
- Once back at
root, a hidden file called
.sugarchain should have been created when we ran the daemon wallet.
cd to the folder by running:
- Create a new file called
sugarchain.conf by using the nano command:
- A new window should have opened, saying at the top
GNU nano (version) Copy and paste the following into the file:
rpcuser=(anything you want)
rpcpassword=(anything you want)
- Press Ctrl+O and then Ctrl+X to save file.
Step 3: Restarting wallet
It may sound simple, but it's not GUI anymore, so there are a few steps we must do
- cd back to root
- Run the
htop command (you may need to install htop, which you can do by executing
apt install htop)
- Look for a process called:
- Press F9 then enter to end the process.
- Once the process has been killed, press F10 to exit.
- Then cd back to wallet folder:
- Again, run:
- Let wallet sync. (To check, execute:
./sugarchain-cli -rpcuser=(rpcuser) -rpcpassword=(rpcpassword) getblockcount)
Step 4: Downloading Miner
This step is similar to what you would normally do in GUI, but with few more steps
- cd back to root
- Download miner and build miner by executing:
apt-get install -y \
build-essential libssl-dev libcurl4-openssl-dev libjansson-dev libgmp-dev automake zlib1g-dev && \
git clone https://github.com/cryptozeny/cpuminer-opt-sugarchain.git && \
cd cpuminer-opt-sugarchain && \
./build-yespower.sh && \
and press enter
- Let miner download and build
Step 5: Running miner
Before we start mining we need to get a wallet address. This can be simply done by doing
cd /root/sugarchain-0.16.3/bin and running
./sugarchain-cli -rpcuser=(same as rpcuser) -rpcpassword=(same as rpcpassword) getaccountaddress ""
- Once you have wallet address, cd back to
cpuminer-opt-sugarchain and run:
./cpuminer -a yespower -o http://127.0.0.1:34229/ --no-longpoll -u (rpcuser) -p (rpcpassword --coinbase-addr=(Your sugar address) -t1 (increase for more hashpower)
- Congrats, you are solo mining