Cover photo

[Node] Run your LINEA node

Linea, formerly ConsenSys zkEVM, is a Layer 2 Ethereum solution enhancing scalability and cost-efficiency with zero-knowledge proofs. It's designed for easy dapp development within MetaMask, offering a developer-friendly platform with seamless tool integration. Linea invites users to its testnet, supporting Ethereum's expansion with comprehensive resources and community support.


Welcome to Node Science! Here, you will learn and understand how to set up your node easily and quickly, without any prior technical knowledge.

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!

Reminder : Setting up a node does not guarantee receiving an airdrop. It's primarily a way to support the project's growth while promoting its decentralization.


I) VPS configuration

To run a node you’ll need a VPS (Virtual Private Server) and one of the most reliable and cheapest solutions is Contabo. It’s a cost-effective German VPS solution built in 2003, known for its robust performance and reliability, catering to a wide range of computing needs and budgets. You can choose the CLOUD VPS 2 by clicking here. Note that you can opt for a more powerful server (VPS 3 or 4) to run multiple different nodes on it more economically.

Don’t forget to choose a password.
Don’t forget to choose a password.

Once payment is complete, you’ll receive an e-mail with your IP address entitled “Your login data!”. To connect to your VPS and securely run your node, you must download and install the Putty software, which enables a secure connection.

Just connect to your VPS with your IP adress.
Just connect to your VPS with your IP adress.

I) Node deployement

Make sure you copy (Ctrl+C) — paste (right-click your mouse) each command line, one by one, into your terminal. The italic text under each command is just extra info to help you get what the command does.

Ensure you copy each command line using (Ctrl+C), and then paste it into your terminal by right-clicking your mouse. Execute them sequentially, pressing Enter after each, if required.

Start by refreshing the local package index with the latest changes made in the repositories.

sudo apt-get update && sudo apt-get upgrade -y

Install software-properties-common, a tool that manages the software sources, and screen, a program that allows you to use multiple terminal sessions within one window, both ensuring your system has the necessary tools for managing software and multitasking.

sudo apt-get install software-properties-common screen -y

Add the official Ethereum software repository to your system, refresh your system's package list to include the new repository's packages, and then install the Ethereum software, setting up your system for Ethereum node operations.

sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum -y

Downloads the genesis.json file from the Linea documentation website, which contains the initial configuration for setting up your node.

wget https://docs.linea.build/files/genesis.json

Creates a file named linea.img with a size of 100 gigabytes, reserving disk space to be used by the Linea node for blockchain data storage.

fallocate -l 100G linea.img

Formats the linea.img file with the ext4 filesystem, making it ready to store data in a structured and efficient manner for the Linea node operations.

mkfs.ext4 linea.img

Create a new directory named linea_data and then mount the linea.img file as a loop device to linea_data, effectively using the image file as a virtual disk for storing Linea node data.

mkdir linea_data
sudo mount -o loop linea.img linea_data

Uses Geth, the Ethereum Go client, to initialize your node, specifying ./linea_data as the data directory where the blockchain data will be stored, and using ./genesis.json to configure the initial state of the blockchain.

sudo geth --datadir ./linea_data init ./genesis.json

Starts a new screen session named linea, allowing you to run the Linea node inside this session and detach from it without interrupting the node's operation, so you can return to it later.

screen -S linea

Runs Geth to start your node with the Linea data directory, setting it with specific parameters.

sudo geth \
--datadir linea_data \
--networkid 59144 \
--rpc.allow-unprotected-txs \
--txpool.accountqueue 50000 \
--txpool.globalqueue 50000 \
--txpool.globalslots 50000 \
--txpool.pricelimit 1000000 \
--txpool.pricebump 1 \
--txpool.nolocals \
--http --http.addr '127.0.0.1' --http.port 8545 --http.corsdomain '*' --http.api 'web3,eth,txpool,net' --http.vhosts='*' \
--ws --ws.addr '127.0.0.1' --ws.port 8546 --ws.origins '*' --ws.api 'web3,eth,txpool,net' \
--bootnodes "enode://ca2f06aa93728e2883ff02b0c2076329e475fe667a48035b4f77711ea41a73cf6cb2ff232804c49538ad77794185d83295b57ddd2be79eefc50a9dd5c48bbb2e@3.23.106.165:30303,enode://eef91d714494a1ceb6e06e5ce96fe5d7d25d3701b2d2e68c042b33d5fa0e4bf134116e06947b3f40b0f22db08f104504dd2e5c790d8bcbb6bfb1b7f4f85313ec@3.133.179.213:30303,enode://cfd472842582c422c7c98b0f2d04c6bf21d1afb2c767f72b032f7ea89c03a7abdaf4855b7cb2dc9ae7509836064ba8d817572cf7421ba106ac87857836fa1d1b@3.145.12.13:30303" \
--syncmode full \
--metrics \
--verbosity 3

Congratulations, you’ve just deployed your first node on Linea! Simply press CTRL+A+D to detach from the screen session; your node will keep running. And if you to reattach to the existing screen session, just type screen -r linea.

Feel free to follow us on Twitter to stay updated on everything related to nodes and join our Discord for further discussion or any questions with our community!