AnyNodes
TwitterTelegram
  • Instruction
    • VPS
    • Dedicated Server
  • Bitcoin
    • Atomicals
      • atomicals-electrumx
      • electrumx-proxy
      • Use custom proxy
  • Mainnet
    • Massa
      • Run massa node as a service
      • AutoBuyRolls
      • Terms
    • Fusion
    • Nym
      • Setup nym-node
      • Run nym-node as a service
      • Bonding
    • HOPR
      • Node upgrade
      • Node migration
  • Testnet
    • SwanChain
    • EthStorage
      • Hardware Recommendations for Optimal Mining Power
      • Know your disk
      • Monitoring bot
    • SHDW
    • Dusk
    • Shardeum
    • HOPR
    • Massa
    • Nibiru
    • 0G.ai
  • Continuous Integration
    • GitHub Actions
  • Arbitrage
    • CEX/DEX
Powered by GitBook
On this page
  • Implement
  • Upgrade
  • AutoBuyRolls
  1. Mainnet
  2. Massa

Run massa node as a service

Running massa node as a service increase the robust of node stability.

Implement

// download binary
cd ~
mkdir -p massa
cd massa
wget https://github.com/massalabs/massa/releases/download/MAIN.2.4/massa_MAIN.2.4_release_linux.tar.gz
tar -xvf massa_MAIN.2.4_release_linux.tar.gz
cd ./massa/massa-node/config
echo "[protocol]" > config.toml
echo "routable_ip = \"$(curl -s ifconfig.me)\"" >> config.toml

// create service
sudo tee /etc/systemd/system/massad.service > /dev/null <<EOL
[Unit]
Description=Massa Node
After=network-online.target

[Service]
User=$USER
WorkingDirectory=$HOME/massa/massa/massa-node
ExecStart=$HOME/massa/massa/massa-node/massa-node -p <>
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOL

// start massad service
sudo systemctl daemon-reload
sudo systemctl enable massad
sudo systemctl restart massad

// check node log
sudo journalctl -f -n 100 -u massad

// if the node is started, then buy rolls and start stake
cd ../massa-client/
screen -S massa-client
./massa-client -p <>
get_status
wallet_info
 
// buy rolls
buy_rolls <node_address> <rolls_amount> 0.01

// start staking
node_start_staking <node_address>

// wait 1 hour 40 minutes

// check staking status
get_addresses <node_address>

Upgrade

  1. Backup your node wallet folders (massa-node/staking_wallets and massa-client/wallets)

cd ~/massa
cd ..
wget https://github.com/massalabs/massa/releases/download/MAIN.2.4/massa_MAIN.2.4_release_linux.tar.gz

tar zxvf massa_MAIN.2.4_release_linux.tar.gz

sudo systemctl stop massad && sudo systemctl start massad

sudo journalctl -f -n 100 -u massad

After upgrade, needs over 2 hours (more than 3 epochs) to wait for the rolls back to balance as MAS. Then need to buy rolls again:

buy_rolls <node_address> <rolls_amount> 0.01

No need to run stake command again. The rolls will become active after 3 epochs (about 1hour 40minutes).

AutoBuyRolls

The AutoBuyRolls bot will monitor your balance and automatically purchase rolls when necessary, eliminating the need for manual intervention.

PreviousMassaNextAutoBuyRolls

Last updated 3 months ago

Check the latest node version on

https://github.com/massalabs/massa/releases
AutoBuyRolls