How to setup headless Qortal node with minting on Vultr VPS - Ubuntu 18.04

in #qortal5 months ago


Qortal


Vultr

Alternate link for this blog with better formatting:
https://gist.github.com/Traxo7/5016efd0deec1af7ef52efcee27ad74b


This article goes through the process of setting up a headless Qortal node using Vultr VPS, and setting up a minting account for the node.

Setup VPS

Register Vultr account and create a server

Register an account with Vultr
(referral link: https://www.vultr.com/?ref=6889632)

Deploy a new server, under Server Type select Ubuntu 18.04.
Rest of the form should be filled, change what you need and submit the form to finish deployment.
(Wait a while until installation is completed, usually up to few minutes)

Install Qortal Core on the server

[email protected]:~# git clone https://github.com/Qortal/qortal.git
[email protected]:~# sudo apt install maven

[email protected]:~# cd qortal/
[email protected]:~/qortal# echo '{}' > settings.json
[email protected]:~/qortal# mvn clean package

  • run the core (not needed now if we are going to download the bootstrap):
    [email protected]:~/qortal# tmux
    in tmux screen:
    [email protected]:~/qortal# java -jar target/qortal-1.4.1.jar (might be different version)
    Press CTRL + B, then D to exit tmux.
    Node is now running.

(optional) Download and extract Bootstrap (blockchain data files)

Install 7z (we need it to extract the bootstrap archive):
[email protected]:~# sudo apt-get install p7zip-full

Download the bootstrap (use other bootstrap source if needed):
[email protected]:~/qortal# wget https://cloud.crowetic.com/s/6rDwKQji3tARNcx/download && mv download db-crowetic-2.1.2021.zip

Extract the downloaded file:
[email protected]:~/qortal# 7z x db-crowetic-2.1.2021.zip

Add minting key

Make sure Qortal Core is running.
Navigate to home directory
cd

download the Qort tool script (source https://github.com/Qortal/qortal/blob/master/tools/qort):
[email protected]:~# wget https://raw.githubusercontent.com/Qortal/qortal/master/tools/qort

make the script executable
[email protected]:~# chmod +x qort

Add minting key
[email protected]:~# ./qort admin/mintingaccounts YOUR_MINTING_KEY

(optional) Check for added minting keys:
[email protected]:~# ./qort -p admin/mintingaccounts

More info

If running a VPS with less than 2GB RAM, you might need to allocate some swap space.
https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04

If running a VPS with 2GB RAM or less, your core might run out of RAM ocassionally, so limit the RAM which Java process can use when running the core:

[email protected]:~/qortal# java -Xmx1500M -jar qortal.jar