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, you get $100 credits): https://www.vultr.com/?ref=8976898-8H)
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
Connect to the server from your local machine:
local@home:~$ ssh [email protected]
(use your VPS ip)Download core, install dependencies and core:
root@vultr:~# git clone https://github.com/Qortal/qortal.git
root@vultr:~# sudo apt install maven
root@vultr:~# cd qortal/
root@vultr:~/qortal# echo '{}' > settings.json
root@vultr:~/qortal# mvn clean package
- run the core:
root@vultr:~/qortal# tmux
in tmux screen:
root@vultr:~/qortal# java -jar target/qortal-2.1.0.jar
(might be different version)
PressCTRL + B
, thenD
to exit tmux.
Node is now running (should be downloading and extracting bootstrap automatically).
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):
root@vultr:~# wget https://raw.githubusercontent.com/Qortal/qortal/master/tools/qort
make the script executable
root@vultr:~# chmod +x qort
Add minting key
root@vultr:~# ./qort admin/mintingaccounts YOUR_MINTING_KEY
(optional) Check for added minting keys:
root@vultr:~# ./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:
root@vultr:~/qortal# java -Xmx1500M -jar qortal.jar