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.
This is extremely useful if you want to mint 24/7 without having your Desktop PC running at all times.
Register an account with Vultr (referral link, you get $100 credits): https://www.vultr.com/?ref=8976898-8H)
- Under "Choose Server" select
Cloud compute
- Under "CPU & Storage Technology" select
Regular Performance
. - Under "Server Type" select
Ubuntu 22.04
. - At the bottom, Turn Off auto backups.
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)
-
Connect to the server from your local machine:
local@home:~$ ssh root@123.45.67.89
(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-4.1.3.jar
(might be different version)
Press CTRL + B
, then D
to exit tmux.
Node is now running.
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
Generate API Key:
root@vultr:~# curl -X POST "localhost:12391/admin/apikey/generate"
Assign minting account:
root@vultr:~# ./qort admin/mintingaccounts YOUR_MINTING_KEY
(optional) Confirm that minting keys are added:
root@vultr:~# ./qort -p admin/mintingaccounts
If it's a private node (i.e. port 12391 isn't forwarded or accessible to anyone outside of the network) then the simplest way is to add this to settings.json:
"apiWhitelistEnabled": false
This will allow all connections to the node, and therefore will allow your UI to talk to it directly.
Alternatively, if you'd like more control over the node's security, you can set a manual whitelist with this setting:
"apiWhitelist": [
"::1",
"127.0.0.1",
"192.168.0.0/24"
]
(the third value "192.168.0.0/24" would need to be modified to allow a certain IP or range)