This guide will help you to create, register, and host your masternode on a VPS.
*** This guide was fully tested under Debian 12 ***
You need to have some knowledges about linux and ssh connexion.
You need to have this:
- A working and sync wallet.
- The correct amount of collateral for the coin you want to make a masternode.
- Eventually, a beer or a coffee +_+
- And of course a VPS ^^Which masternode do you want to install ?
To create the masternode, we will need a few addresses.
To get a new address, open the console of your wallet and tape this:
getnewaddressOr you can, into your wallet, click on "Receive" and "Create a new address" after named it.
Do it a few time to have all addresses required here.
All addresses needs to be newly created, except the one for the fees; you can re-use an old one, it just need to have some funds on it to pay the protx fees.
To continue, we need 5 addresses.
Now we have all our addresses.
You need to send ------ coins to your collateral address:
0x0123456789abcdefOnce done, wait 2 confirmations, and double-clic on your transaction, in the "Transactions" tab.
Still in your wallet, in the console, type the command below:
bls generateYou should have something like this:
{
"secret": "5120ef8b654b7b7a459e19cc3ef3f845ba891404853fa317f348635b347e12ef",
"public": "098254992464a87643d228e69554fda8f5feb52e9605b9cef2fe73eb3a063f12c8f03a6fa4f07e26a1e9e9875e1c5c91"
}Don't worry about putting private datas here, this page is an offline page, nothing is send outside here.
You can also use this page offline if you want.
Nothing is send to any server here, you can type your secret with no restriction only if it's your personnal computer.
We will now prepare the VPS. Please connect to your VPS through SSH.
If you are not connected as root, type this command (and your password if asked):
su -Now, with root user install docker (say Yes if you are asked for Y/N):
apt install docker.ioA masternode cannot be launched as the root user.
You need to launch it under a regular user account.
Please enter a valid Linux username below.
Still connected as root, type this commande to create a new user:
----And now type this to add this user to Docker Group
----We will configure the docker container now.
A Docker container on Debian/Linux is a lightweight, standalone, and executable package that includes everything needed to run a piece of software—code, runtime, libraries, and system tools. It runs in isolation from the host system, using the same kernel, and ensures consistent behavior across environments. Containers are ideal for deploying applications quickly, reliably, and securely.
If you are under root or under other user than you want to launch the container, please type this:
su - <USERNAME>From now, don't use root or sudo command.
Now we will create the container volume for your masternode. It will contains all important file, like executables and the blockchain. Execute this:
docker volume create ???_volThe file volume is now created. Type this, now (in one text block !):
docker run -dit --name ???_tmp -p ???:??? -v ???_vol:/home/ --restart unless-stopped debian:bookwormWait for the container to start, and do this:
docker exec -ti ???_tmp bashWe are now into the container. Go to next step.
Copy-paste the entire block code below:
apt update && apt upgrade
apt install -y ???
adduser crypto --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
su - crypto
If an invite ask you to continue, say yes.
Once finished, you should see an invite like this one: crypto@*****:~$
We will now download a pack with all files inside.
This pack contains a bootstrap which will avoid the download of a big part of the blockchain.
It contains also all executable needed; so, your node will be operationnal faster.
wget ???
tar -xzvf ???Once archive is unpacked, go to next step.
We need to edit the masternode configuration file.
You can edit the conf file by sftp, scp or by typing this:
nano ???Select all text below, copy it, and if you use nano editor in putty, just right click in the window to paste it.
rpcuser=ae24bfb568e65b08u
rpcpassword=ae24bfb568e65b08p
rpcbind=0.0.0.0
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
maxconnections=125
masternode=1
masternodeblsprivkey=???
externalip=???
Once done, press {CTRL-O} to save the file and {CTRL-X} to exit the editor (or use your favorite editor).
Now, we will launch the daemon, and if you did all correctly, it should runs fine.
???You should see a message indicating the daemon is starting.
Wait ~30 seconds and go to next step.
We need to verify if the blockchain is syncing.
??? getblockchaininfo | grep -E '"blocks"|"headers"' | awk -F': ' '{print $2}' | tr -d ','You should have an output with 2 numbers. The first is the current sync block. The second is the blochain heigh. They should be the same and the last (look at explorer or in a wallet to see the last block heigh).
While it's syncing, we will register your masternode on the blockchain.
Go back to your wallet debug console, if you wallet is not password protected, go to next step, if yes, we need to unlock it:
walletpassphrase "your_walletphrase" 600 Of course, replace 'your_walletphrase' by your wallet password 😂
Wallet is now unlocked for 600 seconds, which will give us time to send the protx command to register your masternode. Go to next step.
We need to send a PROTX command to register the masternode on the blockchain. Send this command (all text block) in the wallet console:
NO COMMANDIf you have done all correctly, this will return a tx hash like this: 724b0ab086c759fc7bc664a149a7ba6b82dacd47e69799720eb3e591e096cb6c
Go back to your SSH console, with the opened container under the 'crypto' user. We will check the masternode state. Type this:
??? masternode statusYou should see a "READY" state at the end of the returned value.
If you see POSE BANNED; you need to revive the node (command available at the end of this guide).
If you see "WAITING FOR PROTX" you need to wait until your protx command get 2 blocks confirmation minium.
Keep repeating this command every one or two minutes until you see "READY" state.
The, we can go to next step.
Now, we will modify the container, to make it boot with the start.sh script.
This script will auto-launch the daemon at the container start.
It will automatically check if the daemon did not crashed every 30 seconds.
If it's the case, it will relaunch it. But for now we need to stop the daemon and exit the container.
Type this in the ssh console:
{CLI} stopAnd now:
exitAnd one more time:
exitYou should be now under your first user, out of the container:
{USER}@******:~$We need to stop the container to modify the entry point (the start.sh script):
docker container stop {CONTAINER_NAME}_tmpWait ~10 seconds for the container to stop.
Now, type this:
docker commit --change='ENTRYPOINT ["/home/crypto/start.sh"]' {CONTAINER_NAME}_tmp {CONTAINER_NAME}We have now a clone of our container, with the same disk volume, and starting with the start.sh script.
We can start this new container with command block text:
docker run -dit --name {CONTAINER_NAME} -p {PORT}:{PORT} -v {CONTAINER_NAME}_vol:/home/ --restart unless-stopped {CONTAINER_NAME}We will now enter the new container to check if all runs good.
docker exec -ti {CONTAINER_NAME} bashAnd use the correct username:
su - cryptoNow, we check if masternode is ok:
{CLI} masternode statusYou should see "READY". If not the case, you need to wait if you have "WAIT FOR PROTX" or revive it if you have "POSED BANNED"; with protx update_service command (see later).
Now, we will clean a little your disk 😉
We will exit from the container, like earlier:
exitAnd again:
exitTo clean files and container we do not use anymore, type this:
docker container rm {CONTAINER_NAME}_tmpThe temp container is now erased.
Now, you will have some command you need to keep to manage your masternode.
Command to revive a POSED BANNED masternode:
{COMMAND}Command to change reward address, the owner key of the masternode must be known to your wallet:
{COMMAND}Change masternode IP:
{COMMAND}Little text reminder:
Collateral address: {COLLADDR}
Owner address: {OWNADDR}
Voting address: {VOTADDR}
Fee address: {FEEADDR}
Reward address: {REWADDR}
PROTX Hash: {PROTXHASH}
BLS Private Key: {BLSPRVKEY}
BLS Public Key: {BLSPUBKEY}
Masternode IP: {IP}
Masternode PORT: {PORT}
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxx