sudo apt update && sudo apt upgrade -y
wget -O - https://raw.githubusercontent.com/zunxbt/installation/main/rust.sh | bash
sudo apt update
sudo apt install git -y
rm -rf "$HOME/network-api"
git clone https://github.com/nexus-xyz/network-api.git "$HOME/network-api"
sudo apt install pkg-config libssl-dev -y
sudo bash -c "cat > /etc/systemd/system/nexus.service <<EOF
[Unit]
Description=Nexus XYZ Prover Service
After=network.target
[Service]
User=$USER
WorkingDirectory=$HOME/network-api/clients/cli
Environment=NONINTERACTIVE=1
ExecStart=$HOME/.cargo/bin/cargo run --release --bin prover -- beta.orchestrator.nexus.xyz
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF"
sudo systemctl daemon-reload
sudo systemctl start nexus.service
sudo systemctl enable nexus.service
sudo systemctl status nexus.service
Ctrl+C
Logs:
journalctl -u nexus.service -f -n 50
