Start Masternode

Table of Contents

Create Linux Service to Start Qwertycoind

On this page you will find description how to run Qwertycoind with JSON PRC as linux service. I use Ubuntu server 16.03 x64, but this description you can be applied to any of the linux versions with small changes.
    1.
    Compile the latest Version from Sourcecode
Use this compilation guides: https://github.com/qwertycoin-org/qwertycoin#how-to-compile For example under Ubuntu:
1
git clone --recurse-submodules https://github.com/qwertycoin-org/qwertycoin
2
cd ./qwertycoin
3
mkdir ./build
4
cd ./build
5
cmake -DBUILD_ALL:BOOL=TRUE ..
6
cmake --build . --config Release
Copied!
    Copy all the compiled files in ./build/src/ to directory /opt/qwertycoin/:
1
sudo mkdir -p /opt/qwertycoin/.Qwertycoin
2
sudo cp ./src/* /opt/qwertycoin/
Copied!
    To start service we will use user qwertycoin, so let's create it and manage permissions:
1
sudo useradd qwertycoin
2
sudo groupadd qwertycoin
3
sudo usermod -a -G qwertycoin qwertycoin
4
sudo chgrp -R qwertycoin /opt/qwertycoin/
5
sudo chmod -R 770 /opt/qwertycoin/
Copied!
    Create log file and add permissions to write it:
1
sudo mkdir -p /var/log/qwertycoin
2
sudo touch /var/log/qwertycoin/qwertycoind
3
sudo chgrp -R qwertycoin /var/log/qwertycoin/qwertycoind
4
sudo chmod -R 770 /var/log/qwertycoin/qwertycoind
Copied!
    Let's check if everything is ok. Try to run daemon with qwertycoin user permission:
1
sudo -u qwertycoin /opt/qwertycoin/qwertycoind --data-dir=/opt/qwertycoin/.Qwertycoin --log-file=/var/log/qwertycoin/qwertycoind --restricted-rpc --enable-cors=* --enable-blockchain-indexes --rpc-bind-ip=0.0.0.0 --rpc-bind-port=8197 --fee-address=QWC1L4aAh5i7cbB813RQpsKP6pHXT2ymrbQCwQnQ3DC4QiyuhBUZw8dhAaFp8wH1Do6J9Lmim6ePv1SYFYs97yNV2xvSbTGc7s
Copied!
Stop it via entering exit inside daemon session.
    You could pre-download blockchain bootstrap to speed-up process:
1
cd /opt/qwertycoin/.Qwertycoin
2
wget https://blockchain.qwertycoin.org/snapshot_$(date "+%Y-%m-%d").tar.gz
3
tar -xvzf snapshot_$(date "+%Y-%m-%d").tar.gz
4
rm -f snapshot_$(date "+%Y-%m-%d").tar.gz
5
sudo chgrp -R qwertycoin /opt/qwertycoin/
6
sudo chmod -R 770 /opt/qwertycoin/
Copied!
    To start Qwertycoind , we need to create service file in /etc/systemd/system:
1
nano /etc/systemd/system/qwertycoind.service
Copied!
1
[Unit]
2
Description=Qwertycoind
3
Documentation=https://qwertycoin.org
4
After=syslog.target
5
​
6
[Service]
7
User=qwertycoin
8
ExecStart=/opt/qwertycoin/qwertycoind --data-dir=/opt/qwertycoin/.Qwertycoin \
9
--log-file=/var/log/qwertycoin/qwertycoind \
10
--restricted-rpc \
11
--enable-cors=* \
12
--enable-blockchain-indexes \
13
--rpc-bind-ip=0.0.0.0 \
14
--rpc-bind-port=8197 \
15
--fee-address=QWC1L4aAh5i7cbB813RQpsKP6pHXT2ymrbQCwQnQ3DC4QiyuhBUZw8dhAaFp8wH1Do6J9Lmim6ePv1SYFYs97yNV2xvSbTGc7s \
16
17
SuccessExitStatus=143
18
​
19
[Install]
20
WantedBy=multi-user.target
Copied!
Do not forget to change address to your wallet!
    Run service:
1
sudo systemctl daemon-reload
2
sudo systemctl enable qwertycoind.service
3
sudo systemctl start qwertycoind.service
Copied!
    To check service status:
1
systemctl status qwertycoind.service
Copied!
1
● qwertycoind.service - Qwertycoind
2
Loaded: loaded (/etc/systemd/system/qwertycoind.service; enabled; vendor preset: enabled)
3
Active: active (running) since Sat 2018-06-08 04:11:30 EDT; 37s ago
4
Docs: https://qwertycoin.org
5
Main PID: 1882 (Qwertycoind)
6
CGroup: /system.slice/qwertycoind.service
7
└─1882 /opt/qwertycoin/qwertycoind --data-dir=/opt/qwertycoin/.Qwertycoin
8
lines 1-7/7 (END)
Copied!

Create a Masternode on Windows using qwertycoind.exe

On this page you will find description how to run Qwertycoind I use Windowx x64 Enterprise, but this description you can be applied to any Windows Version (> Windows 7).
For example under Windows:
1
git clone https://github.com/qwertycoin-org/qwertycoin
2
cd qwertycoin
3
md build
4
cd build
5
cmake -G "Visual Studio 15 2017 Win64" -DBUILD_ALL:BOOL=TRUE ..
6
cmake --build . --config Release
Copied!
If you use a prebuilt Version, download it, install it and forward to Step 3
    Self compiled Versions: If all went well, it will complete successfully, and you will find all your binaries in the .\build\src\Release directory
Open a CMD on Windows and navigate to this folder. For example: (the folder structure could be different.)
cd C:\Github\qwertycoin\build\src\Release
    Prebuilt Versions:
After installation you will find the binaries in:
C:\Program Files\qwertycoin\bin
    Start the Masternode in a CMD
Copy and paste the following (that's one single line!):
qwertycoind.exe --restricted-rpc --enable-cors=* --enable-blockchain-indexes --rpc-bind-ip=0.0.0.0 --rpc-bind-port=8197 --fee-address=QWC1L4aAh5i7cbB813RQpsKP6pHXT2ymrbQCwQnQ3DC4QiyuhBUZw8dhAaFp8wH1Do6J9Lmim6ePv1SYFYs97yNV2xvSbTGc7s
If you want you can replace the developers fee address with your own QWC Wallet address (Not necessary)
    Done
Last modified 1yr ago