API Reference

How to run SnarkOS node in client mode

Minimum system requirements:

  • Ubuntu 20.04+
  • 64-bit OS architectures
  • 16 GB of RAM
  • 16 cores CPU
  • 64 GB of disk space
  • 100Mbps of upload and download bandwidth

Installation

Download & install the latest SnarkOS binary:

wget https://github.com/AleoHQ/snarkOS/releases/download/v2.2.5/aleo-testnet1-v2.2.5-x86_64-unknown-linux-gnu.zip
unzip aleo-testnet1-v2.2.5-x86_64-unknown-linux-gnu.zip
sudo mv snarkos /usr/local/bin
sudo chmod +x /usr/local/bin/snarkos

When this guide was written, the latest SnarkOS version was: 2.25
Install unzip if it is not installed: apt install unzip

Generate Aleo key set:

snarkos account new

Create snarkosd systemd service file:

sudo tee /etc/systemd/system/snarkosd.service << END
[Unit]
Description=Aleo snarkOS
After=network-online.target

[Service]
User=root
ExecStart=/usr/local/bin/snarkos start --client --nodisplay --peers "211.171.42.232:4133,42.193.20.124:4133,159.65.172.226:4133,47.243.96.237:4133,210.106.251.155:4133,210.106.251.161:4133" --private-key YOUR_PRIVATE_KEY_HERE --cdn https://s3.us-west-1.amazonaws.com/testnet3.blocks/phase3  --logfile /var/log/snarkos.log
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
END

Enable & start snarkosd service:

systemctl enable snarkosd.service
systemctl start snarkosd.service

It may take up to one hour to start and synchronize with the blockchain.

Disable the Ubuntu firewall service or add the following ports to firewall:

# Rest API port
sudo ufw allow 3033
# SnarkOS peering port
sudo ufw allow 4133