Arbitrum One Node

Setup an Arbitrum One (or Nova) full Node, for direct access to the Arbitrum chain.

document last updated: 4/8/23

A connection to an Ethereum node is required. Arbitrum is an Optimistic Rollup protocol that inherits Ethereum-level security, Arbitrum chain state is forwarded to Ethereum thus requires access to Ethereum node.

Arbitrum Full Node: a full node, this is the L2 equivalent of a full node on Ethereum, which connects to other full nodes via peer-to-peer networking, stores full blockchain data and verifies all blocks and states. All states can be regenerated from a full node. Arbitrum One node is now built with nitro.

What is Nitro: Arbitrum One has now been fully migrated to the Nitro stack. This was an upgrade to the roll up architecture resulting in increased throughput and lower fees.

Hardware Requirements

Recommended Specs: RAM 8GB, CPU 4core, Storage: Minimum 1.2TB SSD (make sure it is extendable) Estimated Growth Rate: around 3 GB per day

Ubuntu 20.04 LTS installed

Access to an Ethereum Full Node

Important Ports: RPC: 8547, WebSocket: 8548, Sequencer Feed: 9642, ETH RPC: 8545

Method 1: Deployment Script (Easy)

for easy deployment, you can run this script (based of this guide), installs dependencies, select Arbitrum network and Ethereum endpoint and auto configures the node for you based on client selection

Method 2: Manual Build with Docker

1. Initial Setup

Install Prerequisite software

Update System

sudo apt update && sudo apt upgrade -y

Install Docker & Docker-compose

Remove any existing installation

sudo apt-get remove docker docker-engine docker.io containerd runc

Install Docker & Docker-compose via script

sudo apt install curl -y
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Remove the script, and add your user to the docker group, for use without sudo

sudo rm -r get-docker.sh 
sudo usermod -aG docker $USER

Requires a Restart to work, then check installed with

docker --version
docker compose version

2. Get Ethereum Endpoint

Arbitrum requires a connection to an Ethereum Node, as it is a layer 2 on top of Ethereum. There are a few ways to achieve this

Set up an Ethereum full node

If you don’t have access to a full node for Ethereum, which consists of and Execution and Consensus client, You can use an easy node deployment tool such as Nethermind Sedge.

Note: it may take a while to sync depending on hardware used (quality of SSD & RAM), from 12 hours to a few days.

Sedge: http rpc port is exposed to the docker network by default, but the default port may be different than 8545 find the port here under /<sedge-working-folder-path>/docker-compose.yml

Under `service: execution`
Under `service: execution`

Rocketpool: If you want to use a full node within the rocketpool stack, you can expose the EL endpoint in rocketpool service config default port is 8545

Host node on the same device

You shouldn’t have to do anything for ports or on firewall. The following are the arguments and changes to the docker-compose.yml file for later in Step 3.

- --l1.url= http://localhost:8545
# or
- --l1.url=http://0.0.0.0:8545

Add under nitro-node service

network_mode: host

NOTE: 8545 is the default RPC port, if Ethereum node is configured for a different port then change accordingly.

Node on a separate (local) device

Normally: Keep 8545 (or 8000-9000 for CL) closed except for the trusted machines - this is the JSON RPC port which gives admin access to the node.

You are advised to open the port to your Arbitrum node IP like so, from your Ethereum Node. were going to allow only to our own IP. What this does is exposes our Ethereum node only to a trusted device hosting the L2 node.

sudo ufw allow 8545 from <ip of destination device>
sudo ufw enable 

If you still have problems connecting, you may need to Port forward 8545 from your router. This will vary based on your ISP and router, check the manual.

RPC services such as Infura/Alchemy can provide Endpoints though the resource limits will likely be reached.

For Infura it will look something like this. Create an account and copy the Endpoint ID (make sure it is mainnet) into

--l1.url=https://mainnet.infura.io/v3/<endpoint-ID>

3. Configure Arbitrum Node

Make our working Directory

mkdir -p /home/$USER/arbitrum-node/data

Grant Permissions

chmod -fR 777 /home/$USER/arbitrum-node/data

Create docker-compose config file

nano /home/$USER/arbitrum-node/docker-compose.yml

Paste into terminal

version: '3.3'
services:
    nitro-node:
        network_mode: host
        image: 'offchainlabs/nitro-node:v2.0.11-8e786ec'
        user: 1000:1000
        restart: always
        stop_grace_period: 30s
        volumes:
            - '/home/$USER/arbitrum-node/data/:/home/user/.arbitrum'	
#            - '/home/$USER/arbitrum-node/snapdata/:/arbitrum-node/snapdata/'
        ports:
            - '0.0.0.0:8547:8547'
            - '0.0.0.0:8548:8548'
        command:
        - --init.url=https://snapshot.arbitrum.io/mainnet/nitro.tar
        - --l1.url=http://localhost:8545
        - --l2.chain-id=42161 
        - --http.api=net,web3,eth,debug 
        - --http.corsdomain=* 
        - --http.addr=0.0.0.0 
        - --http.vhosts=*
        logging:
          driver: json-file
          options:
            max-size: 10m
            max-file: "10"

Optional Configurations

Optional: download snapshot data

Arbitrum requires a snapshot of Nitro Genesis Database, this will be downloaded when your node starts (using the configuration above)

It may be quicker to manually download the data before starting the node, and host it locally. To do this

wget -P /home/$USER/arbitrum-node/snapdata/ https://snapshot.arbitrum.io/mainnet/nitro.tar

change the flag

- --init.url=file:///home/$USER/arbitrum-node/snapdata/nitro.tar

Optional: Opening RPC

should you want to access the node externally

sudo ufw allow 8547

and port forward if needed

To change the default RPC port: If you wish to change this, add the argument to docker-compose.yml under command:, the port must also be changed under ports:

--http.port=<desired-port> 

Optional: Enable watchtower Validator

anyone can run a validator in watchtower mode, this means your node will log an error if an on-chain assertion deviates from locally computed chain state. However the ability to post on-chain assertions is currently whitelisted.

Add the arguments to docker-compose.yml under command:

--node.validator.enable
--node.validator.strategy=Watchtower

More information here:

4. Run Node

cd arbitrum-node
docker compose up -d

view logs

docker compose logs -f nitro-node

If your Endpoint is Synced and Reachable you should see at the start of the logs connected to L1 chain and your Endpoint

It will start by downloading the historical Arbitrum One database from snapshot before Nitro upgrade. This part takes a while and you may not see much updated in the logs until it starts syncing

Once Synced it will look like this, you should see L2 blocks with the corresponding L1 block

Useful commands

Check running containers

docker ps -a

Stop the node

docker compose down       #from working dir
# or
docker stop <container name> && docker rm <container name>

View additional CLI options

Go into the Docker terminal, from the working directory

docker exec -it <container> sh

help command

nitro --help

this will display all additional cli options, to exit the container just enter exit

Check space

sudo du -sh /home/$USER/arbitrum-node/data

Run on Arbitrum Nova

Arbitrum Nova: a Rollup chain that aims for ultra low transaction fees. Nova differs from Arbitrum One by not posting transaction data on chain, but to Data Availability Committee. Nova is built using our AnyTrust Technology, sharing a codebase with Arbitrum Nitro.

Edit the Chain ID to Nova ID, chain IDs can be found here

- --l2.chain-id=42161 

Remove the following line from docker-compose.yml

- --init.url="https://snapshot.arbitrum.io/mainnet/nitro.tar"

no genesis db is needed as it wasn't migrated from Arbitrum one (before Nitro upgrade) chain

Subscribe to GLCstaked
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.