top of page

In collaboration with Filip Rezabek (Algorand Centre of Excellence , TU München)

Step 1 : Installing Algorand tools

➡ To run the commands, copy & paste them one by one in your Terminal application and press enter.

1. Create a folder for the install package and files :

mkdir ~/node

cd ~/node

2. Download the install file in the folder you created :

sudo apt-get update

sudo apt-get install -y gnupg2 curl software-properties-common

curl -O https://releases.algorand.com/key.pub

sudo apt-key add key.pub

sudo add-apt-repository "deb [arch=amd64] https://releases.algorand.com/deb/ stable main"

sudo apt-get update

3. Installation :

Option A - install both algorand and the devtools :

sudo apt-get install -y algorand-devtools

Option B -only install algorand :

sudo apt-get install -y algorand

algod -v

4. Check if the tools are successfully installed by running:

(it provides info about the version of goal)

goal -v

OPTIONAL : Set the default directory. Doing this spares you from adding  -d /var/lib/algorand  at the end of all future commands. (If you open a new terminal window you will need to do this again.)

export ALGORAND_DATA=/var/lib/algorand

Step 2 : starting the node

1. Start the node :

sudo systemctl start algorand

2. Check the node's status :

goal node status -d /var/lib/algorand

Step 3 : node synchronization

1. Open this link in your browser :

2. Copy the line that appears in your browser and paste it in the following command :

goal node catchup <catchup point> -d /var/lib/algorand

Example:

goal node catchup 22500000#A6Z7EYO7LSEVG63FEQGSK72OM4OQ6Y27XP523F27UI5Y4NLGMPTQ -d /var/lib/algorand

2. Check node status regularly until Sync Time goes down to 0.0 second :

goal node status -d /var/lib/algorand -w 1000

When Sync Time is down to 0.0 sec this means your node is synchronized. This process might take some time (depending on the speed of you machine).

Step 4 : create a wallet

1. Your new wallet will contain the Algorand account which will participate in consensus

goal wallet new <WalletName> -d /var/lib/algorand

Example:

goal wallet new MyWallet -d /var/lib/algorand

Then you will get the following message :

Please choose a password for wallet 'NodeWallet': 

 

The password you type will not appear on screen, that is normal.

Please confirm the password: 

 

Type your password again.


Creating wallet...
Created wallet 'MyWallet'
Your new wallet has a backup phrase that can be used for recovery.
Keeping this backup phrase safe is extremely important.
Would you like to see it now? (Y/n): 

Type   to view your wallet's mnemonic and note it on paper.

Step 5 : account setup

Important : the account must contain minimum 0.001 $ALGO

Option A : import an existing account in your newly created wallet.

goal account import -m <your mnemonic phrase> -d /var/lib/algorand

Example:

goal account import -m "secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret secret-d /var/lib/algorand

Option B : create new account.

goal account new -d /var/lib/algorand

Step 6 : participation key

Add a participation key to your account

goal account addpartkey -a <account address> --roundFirstValid <partkey-first-round> --roundLastValid <partkey-last-round> -d /var/lib/algorand

The value for <partkey-first-round> is the last committed block, which you get by checking your node's status :

goal node status -d /var/lib/algorand

Example status :

Last committed block: 24893163
Sync Time: 0.0s
Catchpoint: 22560000#2YG3TDS7ZAHOXX2LNQ5CU3AIED34HEOIVJ5N44XKSQ2QXAFHJ5BQ
Catchpoint total accounts: 14255165
Catchpoint accounts processed: 2995712
Catchpoint accounts verified: 0
Genesis ID: mainnet-v1.0
Genesis hash: wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=

The value for <partkey-last-round> is the first round value plus a number of blocks corresponding to the time you want your participation key to be active. Adding 1 million to the <partkey-first-round> value a a validity period of approximately one year.

goal account addpartkey -a V6JLSCHJKSULQBXF7BW7YMXDOVXXXCAZGJ6YSHV64RZAUYSXFGINDU7KPI --roundFirstValid 24893163 --roundLastValid 25893163 -d /var/lib/algorand

Success message :

Please stand by while generating keys. This might take a few minutes...
/

Participation key generation successful. Participation ID: RTULG52G54ZTPSYNFBS6QROVIB555ITCMWB7FG3G3MAKSF2L2X5A

Optional : list participation key(s) and additional information :

goal account listpartkeys -d /var/lib/algorand

goal account partkeyinfo -d /var/lib/algorand

Step 7 : putting your node online

1. Create a transaction that changes the node's status to online :

goal account changeonlinestatus --address=<address-of-participating-account>  --fee=2000 --firstvalid=<transaction-first-round> --lastvalid=<transaction-last-round> --online=true --txfile=online.txn -d /var/lib/algorand

The maximum difference between the first and last valid rounds is 1000. So here just use the first valid round and add 1000 to get the last valid round.

Example command :

goal account changeonlinestatus -a V6JLSCHJKSULQBXF7BW7YMXDOVXXXCAZGJ6YSHV64RZAUYSXFGINDU7KPI --firstvalid=24893163 --lastvalid=24894163 --online=true --txfile=online.txn -d /var/lib/algorand

2. Sign the transaction :

goal clerk sign --infile=online.txn --outfile=online.stxn -d /var/lib/algorand

3. Send the transaction to the network :

goal clerk rawsend --filename=online.stxn -d /var/lib/algorand

Congratulations, your account is online !

You can verify your account's status here :

https://algoexplorer.io/address/ACCOUNT

https://app.metrika.co/account/algorand/ACCOUNT

Best practices : it is important for the network that you set your node to offline every time you turn off your computer.

1. Create a transaction that changes the node's status to online :

goal account changeonlinestatus -a <account address> --online=false --txfile=offline.txn -d /var/lib/algorand

2. Sign the transaction :

goal clerk sign --infile="offline.txn" --outfile="offline.stxn" -d /var/lib/algorand

3. Send the transaction to the network :

goal clerk rawsend -f offline.stxn -d /var/lib/algorand

If you have any question, feel free to reach out to the community on Discord !

bottom of page