How to run the Nimiq Rust node on Android

How to run the Nimiq Rust node on Android


I tried it with Android 9, can't guarantee it will work with previous versions.

To make things easier I'd recommend running the SSH server from Termux and doing the rest remotely from your desktop. Follow the instructions to setup the server:

  • Ensure everything is up-to-date
pkg upgrade
  • Install necessary packages
pkg install -y pkg-config openssl-tool git wget nano
  • Install Rust
pkg install -y rust
  • Add Rust nightly
pkg install -y unstable-repo
pkg install -y rustc-nightly
  • Clone the Nimiq repo
git clone nimiq-rs/
cd nimiq-rs/
  • Prepare the environment
# use Rust nightly
export RUSTC=$PREFIX/opt/rust-nightly/bin/rustc
# Android lacks robust mutex support
  • Apply ARM patch
sed -i s/opt\.c/ref\.c/ libargon2-sys/
wget -O libargon2-sys/native/ref.c
  • Build and install the client
cargo build --release
cargo install --path client/
  • Add Cargo binaries to your path (put to .profile to make changes permanent)
export PATH="$HOME/.cargo/bin:$PATH"
  • Prepare the configuration
cd ~
mkdir .nimiq
cp nimiq-rs/client/client.example.toml .nimiq/client.toml
nano .nimiq/client.toml

Change the host parameter to match your IP address (or a domain name if you have one), save and exit.

  • Run the client

It will start synchronizing, the process will take several hours or more depending on your network speed.