Get the IP address of the host machine, you can use the following command in a terminal or command prompt
curlifconfig.me
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.
mkdirarbitrumcdarbitrum
Create .env file
sudonano.env
Paste the following into the file.
EMAIL={YOUR_EMAIL}#Your email to receive SSL renewal emailsDOMAIN={YOUR_DOMAIN}#Domain of your reth node you set earlier, reth.indexerdao.comWHITELIST={YOUR_REMOTE_MACHINE_IP}# Remote IP's allowed to connect to RPCARBITRUM_L1_URL={YOUR_L1_RPC}#RPC endpoint of Ethereum L1 RPC
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.
sudonanoarbitrum-classic-entrypoint.sh
Paste the following into the file.
#!/bin/bash
if [ -f /root/.arbitrum/mainnet/INITIALIZED ]; then
echo "The data directory has already been initialized."
else
echo "lemme download the database quickly"
rm -rf /root/.arbitrum/mainnet/db
curl https://snapshot.arbitrum.foundation/arb1/classic-archive.tar | tar -xv -C /root/.arbitrum/mainnet/ && touch /root/.arbitrum/mainnet/INITIALIZED
fi
echo "LFG!!!"
/home/user/go/bin/arb-node $@
Run Arbitrum Node
docker-composeup-d
Monitor Logs
Use docker logs to monitor your nitro and classic nodes. The -f flag ensures you are following the log output
docker logs nitro -f
docker logs classic -f
Test Arbitrum RPC 🧪
curl --data '{"method":"eth_syncing","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST https://{DOMAIN}