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 Linea directory
The first command, mkdir Linea, will create a new directory named Linea in the current location. The second command, cd Linea, will change your current working directory to the newly created base directory. Now you are inside the base directory and can start storing docker-compose and related files in it.
mkdirLineacdLinea
Create .env file
sudonano.env
Paste the following into the file.
EMAIL={YOUR_EMAIL} #Your email to receive SSL renewal emails
DOMAIN={YOUR_DOMAIN} #Domain should be something like rpc.mywebsite.com, e.g. linea.infradao.org
WHITELIST={YOUR_REMOTE_MACHINE_IP} #the server's IP itself and comma separated list of IP's allowed to connect to RPC (e.g. Indexer)
Use docker logs to monitor your Linea node. The -f flag ensures you are following the log output
dockerlogslinea-mainnet-f--tail100
Allow a few minutes for the Linea node to connect with peers. Once it starts syncing, the logs should look like this:
Feb 26 01:14:36 tiberian-infradao geth[118326]: INFO [02-26|01:14:36.231] Looking for peers peercount=0 tried=131 static=0
Feb 26 01:14:40 tiberian-infradao geth[118326]: INFO [02-26|01:14:40.661] Imported new chain segment number=1 hash=78df32..d51eac blocks=1 txs=1 mgas=0.021 elapsed=1.487ms mgasps=14.115 age=7mo3w3d snapdiffs=133.00B triedirty=0.00B
Feb 26 01:14:40 tiberian-infradao geth[118326]: INFO [02-26|01:14:40.776] Imported new chain segment number=118 hash=9d4545..f40fa6 blocks=117 txs=128 mgas=42.794 elapsed=82.126ms mgasps=521.076 age=7mo2w3d snapdiffs=26.73KiB triedirty=0.00B
Test Linea RPC
You can call the JSON-RPC API methods to confirm the node is running. For example, call eth_syncing to return the synchronization status. For example the starting, current, and highest block, or false if not synchronizing (or if the head of the chain has been reached)