Installing the StakePool Operator Scripts (SPOS)
As the Cardano Node management is getting more complicated I would recommend using StakePool Operator Scripts (SPOS) (also known as Martin's Scripts - ATADA Stake pool owner).
You have to install these scripts on your SECURE Server/Workstation/Virtual PC which is running Ubuntu and where you have successfully installed the Cardano Node
We will be creating keys for your pledge wallet as well as keys for your StakePool. ANYONE who has access to these keys will have FULL CONTROL over your wallets and Stake Pool. Never put these keys on your online server.
For better security SPOS scripts allow you to generate all the keys and certificates on a PC that is offline (air-gapped) as well as using Hardware Wallets (this is not covered here)
Let's start by downloading packages that are used by the scripts
1
sudo apt update -y
2
sudo apt install -y curl bc jq
Copied!
Let us now download the scripts:
1
cd
2
mkdir -p git
3
cd git
4
5
# just in case we have already an older folder there - let's remove it
6
rm -rf scripts
7
8
# cloning the code from github
9
git clone https://github.com/gitmachtl/scripts
10
11
cd scripts
12
ls -al
13
Copied!
as the result, you should see this
let's copy the scripts to our bin folder, so we can call them from anywhere:
1
cp cardano/mainnet/* ~/.local/bin/
2
cd ~/.local/bin/
Copied!
Now we have to do a simple configuration so the script knows where to find files and the socket. We will place the configuration file in our home directory, so you don't have to edit files again when next time you decide to upgrade the scripts.
1
cat <<EOF > ~/.common.inc
2
socket="/home/cardano/cnode/sockets/node.socket"
3
4
genesisfile="/home/cardano/cnode/config/mainnet-shelley-genesis.json" #Shelley-Genesis path
5
genesisfile_byron="/home/cardano/cnode/config/mainnet-byron-genesis.json" #Byron-Genesis path
6
7
cardanocli="cardano-cli" #Path to your cardano-cli you wanna use
8
cardanonode="cardano-node" #Path to your cardano-node you wanna use
9
10
magicparam="--mainnet" #choose "--mainnet" for mainnet or for example "--testnet-magic 1097911063" for a testnet
11
addrformat="--mainnet" #choose "--mainnet" for mainnet address format or like "--testnet-magic 1097911063" for testnet address format
12
13
itn_jcli="./jcli" #only needed if you wanna include your itn witness for your pool-ticker
14
15
#--------- leave this next value until you have to change it for a testnet
16
byronToShelleyEpochs=208 #208 for the mainnet, 74 for the testnet
17
EOF
Copied!
Let's check if you have succeeded:
1
00_common.sh
Copied!
if you see the following output, then you have successfully installed the scripts:
Last modified 1mo ago
Copy link