Skip to main content

How to build Nitro locally (Docker, Debian)


This document is currently in public preview and may change significantly as feedback is captured from readers like you. Click the Request an update button at the top of this document or join the Arbitrum Discord to share your feedback.

This how-to is based on debian-11.6.0-arm64.

1. Configure prerequisites

apt install git curl build-essential cmake npm golang clang make gotestsum wabt lld-13
npm install --global yarn
ln -s /usr/bin/wasm-ld-13 /usr/local/bin/wasm-ld

2. Configure Nitro

git clone
cd nitro
git submodule update --init --recursive --force

3. Configure Node 16.19

curl -o- | bash
source "$HOME/.bashrc"
nvm install 16.19
nvm use 16.19

4. Configure Rust 1.66.1

curl --proto '=https' --tlsv1.2 -sSf | sh
source "$HOME/.cargo/env"
rustup install 1.66.1
rustup default 1.66.1
rustup target add wasm32-unknown-unknown --toolchain 1.66.1
rustup target add wasm32-wasi --toolchain 1.66.1
cargo install cbindgen

5. Configure Docker

apt-get remove docker docker-engine containerd runc
apt-get update
apt-get install ca-certificates curl gnupg
mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin
service docker start

6. Configure Go 1.19.5

bash < <(curl -s -S -L
source "$HOME/.gvm/scripts/gvm"
apt-get install bison
gvm install go1.19.5
gvm use 1.19.5 --default
curl -sSfL | sh -s -- -b $(go env GOPATH)/bin v1.52.2

7. Start build