May 22, 2022
NYM Mixnode
Setup and maintenance NYM v1.0.2 Mixnode.
Setup Mixnode
Set your Mixnode environments:
# Replace YOUR_WALLET_ADDRESS with your NYM mainnet wallet address # Replace YOUR_NODE_ID with your Mixnode name wallet=WALLET_ADDRESS echo 'export wallet='$wallet >> $HOME/.bash_profile node_id=NODE_ID echo 'export node_id='$node_id >> $HOME/.bash_profile
sudo apt update && sudo apt upgrade -y sudo apt install pkg-config build-essential libssl-dev curl jq -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env
cd $HOME git clone https://github.com/nymtech/nym.git cd nym git reset --hard git pull git checkout tags/v1.0.2 cargo build -p nym-mixnode --release sudo mv target/release/nym-mixnode /usr/local/bin/
nym-mixnode init --id $node_id --host $(curl ifconfig.me) --wallet-address $wallet
sudo tee <<EOF >/dev/null /etc/systemd/system/nym-mixnode.service [Unit] Description=NYM Mixnode [Service] User=$USER ExecStart=/usr/local/bin/nym-mixnode run --id $node_id KillSignal=SIGINT Restart=on-failure RestartSec=30 StartLimitInterval=350 StartLimitBurst=10 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF
echo "DefaultLimitNOFILE=65535" >> /etc/systemd/system.conf
sudo systemctl daemon-reload sudo systemctl enable nym-mixnode sudo systemctl restart nym-mixnode