🐳Docker

Authors: [Vince | Nodeify]

System Requirements

CPU
OS
RAM
DISK

4+ core CPU

Ubuntu 22.04

16GB+ for Nitro and 32GB+ for Classic

>= 8TB SSD/NVME

Offchain Labs ⛓️

Official Docs https://docs.arbitrum.io/node-running/how-tos/running-an-archive-node

Pre-requisites

Update, upgrade, and clean the system, and then firewall management (ufw), Docker, and the Git version control system.

sudo apt update -y && sudo apt upgrade -y && sudo apt auto-remove -y
sudo apt install docker.io docker-compose git ufw -y

Set explicit default UFW rules

sudo ufw default deny incoming
sudo ufw default allow outgoing

Allow SSH, HTTP and HTTPS

sudo ufw allow 22/tcp
sudo ufw allow 80
sudo ufw allow 443

Get the IP address of the host machine, you can use the following command in a terminal or command prompt

Set an A record for a domain, you need to access the domain's DNS settings and create an A record that points to the IP address of the host machine. This configuration allows users to reach your domain by resolving the domain name to the specific IP address associated with your host machine.

Create Arbitrum directory

The first command, mkdir arbitrum, will create a new directory named arbitrum in the current location. The second command, cd arbitrum, will change your current working directory to the newly created arbitrum directory. Now you are inside the arbitrum directory and can start storing docker-compose and related files in it.

Create .env file

Paste the following into the file.

ctrl + x and y to save file

Create docker-compose.yml

Paste the following into the docker-compose.yml

ctrl + x and y to save file

In this step, we will create a helpful script named arbitrum-classic-entrypoint.sh to automatically download the initial snapshot for your Arbitrum Classic node when it starts for the first time.

Paste the following into the file.

Run Arbitrum Node

Monitor Logs

Use docker logs to monitor your nitro and classic nodes. The -f flag ensures you are following the log output

Test Arbitrum RPC 🧪

Last updated

Was this helpful?