Skip to content

Install dependencies

Continue with the second step of this deployment-guide where you install dependencies and download mainnet files.

Install dependencies

First, install base dependencies:

sudo apt update -y
sudo apt install -y tmux git curl unzip jq aria2 pv

curl -fsSL | CHANNEL=stable sh
sudo apt install docker-ce
sudo apt-get install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin

sudo usermod -aG docker $USER
newgrp docker && newgrp $USER

curl -o- | bash
source ~/.bashrc
nvm install 16
node -v

sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz
rm -rf go1.20.4.linux-amd64.tar.gz

Next, add these to your .profile:

echo '
 export ZKEVM_NET=mainnet
 export ZKEVM_DIR=~/zkevm/zkevm-node
 export ZKEVM_CONFIG_DIR=~/zkevm/zkevm-config

 [ -d "/usr/local/go/bin" ] && PATH="/usr/local/go/bin:$PATH"
 ' >> ~/.profile
 source ~/.profile

Lastly, confirm the installation of Golang by running this command: $ go version

Download/extract mainnet files

Next step in the process is to download the zkEVM Mainnet files. This download is over 70GB, so it’s recommended to run the download in a tmux/screen session to handle any network interruptions.

The files are located in several urls, so a script can be used as shown below:


for url in "${urls[@]}"; do
  aria2c -x6 -s6 "$url"

Once the download is finished, you should extract the files using the following command:

tar xzvf v1.1.0-rc.1-fork.4.tgz

Last update: January 9, 2024
Authors: EmpieichO (97.5%), kmurphypolygon (1.25%), Thiên Toán (1.25%)