Skip to main content

Use a binary distribution

You can install the Hyperledger Besu or Geth client to run a Linea node from a binary distribution.

Prerequisites​

Set up the required and recommended hardware and all the utilities. You can find the recommendations for the clients from the official documentation:

Run the Besu client​

Step 1. Install Besu​

Download and install Besu using the instructions in the official documentation.

Step 2. Download the genesis file and Besu configuration file​

Download the genesis file and Besu configuration file.

Mainnet genesis-mainnet.json file and Besu config-mainnet.toml file.

enodes

You can choose from a range of edge nodes (enodes) for Linea Mainnet. The Besu config-mainnet.toml file uses all enodes by default.

See our enodes page for a full list of available enodes.

Step 3. Define disk space volume (optional)​

Define a volume size appropriate to your expected usage. As of March 20 2024, Besu nodes use:

  • Full nodes: 120GB, growing ~1.5GB per day.
  • Archive nodes: 740GB, growing ~9.5GB per day.

Use these figures as a basis to determine the extent to which you want to future-proof your node.

To limit disk space required, we recommend you configure Besu to use the Bonsai data storage format, which prunes orphaned nodes and old branches.

Ensure you mount the Besu data-path to the custom volume when you start the node.

note

Blockchain clients like Hyperledger Besu or Geth can take up a lot of disk space. By defining the amount of disk space you're willing to dedicate to your client (and the block data that it will be syncing), you can ensure that you still have enough room on your disk for whatever else you need.

Select the relevant operating system for the steps on how to create a custom volume.

Ubuntu
  • Open Terminal
  • Use the df -h command to check the available disk space
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use fallocate to create a file of the desired size, e.g. fallocate -l 100G myfile.img
  • Use mkfs.ext4 to format the file as an ext4 filesystem. e.g. mkfs.ext4 myfile.img
  • Mount the file using mount, e.g. mount -o loop myfile.img /mnt/myvolume
  • The contents will now be available in /mnt/myvolume, up to a maximum of 100GB
MacOS
  • Open Terminal
  • Use the df -h command to check the available disk space
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use hdiutil to create a sparse image of the desired size, e.g. hdiutil create -size 100g -type SPARSE -fs HFS+X myfile.dmg
  • Mount the image using hdiutil, e.g. hdiutil attach myfile.dmg
  • The contents will now be available mounted under /Volumes, up to a maximum of 100GB
Windows
Without Windows Subsystem Linux
  • Open Command Prompt as Administrator
  • Use the dir command to check available disk space on the volume you want to create the disk image
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use the fsutil command to create a sparse file of the desired size, e.g. fsutil file createnew myfile.img 107374182400 (for a 100GB file)
  • Initialize the disk image using diskpart:
    • diskpart
    • select vdisk file="myfile.img"
    • create vdisk maximum=100000
    • attach vdisk
    • exit
  • Format the volume using format, e.g. format F: /FS:NTFS /A:64K /Q
  • The new volume will now be available as drive letter F:, up to the maximum 100GB size

To mount an existing disk image:

  • Open Command Prompt as Administrator
  • Use diskpart
    • select vdisk file="myfile.img"
    • attach vdisk
  • The disk image will be mounted and accessible under the assigned drive letter
With Windows Subsystem Linux
  • Open WSL
  • Use the df -h command to check the available disk space
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use fallocate to create a file of the desired size, e.g. fallocate -l 100G myfile.img
  • Use mkfs.ext4 to format the file as an ext4 filesystem. e.g. mkfs.ext4 myfile.img
  • Mount the file using mount, e.g. mount -o loop myfile.img /mnt/myvolume
  • The contents will now be available in /mnt/myvolume, up to a maximum of 100GB

Step 4. Configure the Besu configuration file.​

In your Besu configuration file (config-mainnet.toml, config-goerli.toml, or config-sepolia.toml), configure the following options:

  • Set data-path to the location you want to store your data.
  • Set genesis-file to the path of your downloaded genesis file.

Step 5. Start the Besu client​

Run the Besu client with the location of your configuration file. For example:

besu --config-file=/Users/myuser/mainnet/config-mainnet.toml

The Besu node will attempt to find peers to begin synchronizing and to download the world state.

Run the Geth client​

Step 1. Install Geth​

Download Geth and install using the instructions provided here.

warning

Linea only supports Geth up to v1.13.15 or lower. v1.14.0 and subsequent versions are not supported.

Step 2. Download the genesis file​

Download the genesis file for the relevant network.

Mainnet genesis.json file.

Step 3. Define disk space volume (optional)​

Define a volume size appropriate to your expected usage. As of March 20 2024, Geth nodes use:

  • Full nodes: 170GB, growing ~2.6GB per day.
  • Archive nodes: 760GB, growing ~10GB per day.

Use these figures as a basis to determine the extent to which you want to future-proof your node.

Ensure you mount the Geth datadir to the custom volume.

If you run out of space, or need to actively maintain how much space is being used, consider pruning.

note

Blockchain clients like Hyperledger Besu or Geth can take up a lot of disk space. By defining the amount of disk space you're willing to dedicate to your client (and the block data that it will be syncing), you can ensure that you still have enough room on your disk for whatever else you need.

Select the relevant operating system for the steps on how to create a custom volume.

Ubuntu
  • Open Terminal
  • Use the df -h command to check the available disk space
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use fallocate to create a file of the desired size, e.g. fallocate -l 100G myfile.img
  • Use mkfs.ext4 to format the file as an ext4 filesystem. e.g. mkfs.ext4 myfile.img
  • Mount the file using mount, e.g. mount -o loop myfile.img /mnt/myvolume
  • The contents will now be available in /mnt/myvolume, up to a maximum of 100GB
MacOS
  • Open Terminal
  • Use the df -h command to check the available disk space
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use hdiutil to create a sparse image of the desired size, e.g. hdiutil create -size 100g -type SPARSE -fs HFS+X myfile.dmg
  • Mount the image using hdiutil, e.g. hdiutil attach myfile.dmg
  • The contents will now be available mounted under /Volumes, up to a maximum of 100GB
Windows
Without Windows Subsystem Linux
  • Open Command Prompt as Administrator
  • Use the dir command to check available disk space on the volume you want to create the disk image
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use the fsutil command to create a sparse file of the desired size, e.g. fsutil file createnew myfile.img 107374182400 (for a 100GB file)
  • Initialize the disk image using diskpart:
    • diskpart
    • select vdisk file="myfile.img"
    • create vdisk maximum=100000
    • attach vdisk
    • exit
  • Format the volume using format, e.g. format F: /FS:NTFS /A:64K /Q
  • The new volume will now be available as drive letter F:, up to the maximum 100GB size

To mount an existing disk image:

  • Open Command Prompt as Administrator
  • Use diskpart
    • select vdisk file="myfile.img"
    • attach vdisk
  • The disk image will be mounted and accessible under the assigned drive letter
With Windows Subsystem Linux
  • Open WSL
  • Use the df -h command to check the available disk space
  • Choose a maximum size for the volume. We'll use 100GB for this example, but refer to the Geth or Besu explanation to help determine the value.
  • Use fallocate to create a file of the desired size, e.g. fallocate -l 100G myfile.img
  • Use mkfs.ext4 to format the file as an ext4 filesystem. e.g. mkfs.ext4 myfile.img
  • Mount the file using mount, e.g. mount -o loop myfile.img /mnt/myvolume
  • The contents will now be available in /mnt/myvolume, up to a maximum of 100GB

Step 4. Bootstrap your node​

Bootstrap the node using the following command:

geth --datadir ./geth-linea-data init ./genesis.json

Step 5. Start the Geth client​

Start the node using the following command:

geth \
--datadir $HOME/geth-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://069800db9e6e0ec9cadca670994ef1aea2cfd3d88133e63ecadbc1cdbd1a5847b09838ee08d8b5f02a9c32ee13abeb4d4104bb5514e5322c9d7ee19f41ff3e51@3.132.73.210:31002,enode://a8e03a71eab12ec4b47bb6e19169d8e4dc7a58373a2476969bbe463f2dded6003037fa4dd5f71e15027f7fc8d7340956fbbefed67ddd116ac19a7f74da034b61@3.132.73.210:31003,enode://97706526cf79df9d930003644f9156805f6c8bd964fc79e083444f7014ce10c9bdd2c5049e63b58040dca1d4c82ebef970822198cf0714de830cff4111534ff1@18.223.198.165:31004,enode://24e1c654a801975a96b7f54ebd7452ab15777fc635c1db25bdbd4425fdb04e7f4768e9e838a87ab724320a765e41631d5d37758c933ad0e8668693558125c8aa@18.223.198.165:31000,enode://27010891d960f73d272a553f72b6336c6698db3ade98d631f09c764e57674a797be5ebc6829ddbb65ab564f439ebc75215d20aa98b6f351d12ea623e7d139ac3@3.132.73.210:31001,enode://228e1b8a4931e46f383e30721dac21fb8fb4e5e1b32c870e13b25478c82db3dc1cd9e7ceb93d302a766466b55638cc9c5cbfc43aa48fa41ced19baf365951f76@3.1.142.64:31002,enode://c22eb0d40fc3ad5ea710aeddea906567778166bfe18c157955e8c39b23a46c45db18a0fa2ba07f2b64c81178a8c796aec2a29151533920ead06fcdfc6d8d03c6@47.128.192.57:31004,enode://8ce733abe39fd7ae0a278b9893f85c1193c611a3886168690dd843435460f22cc4d61f9e8d0ace7f5905836a665319a31cccdaacdada2acc69972c382ecce7db@3.1.142.64:31003,enode://b7c1b2bed65a855f7a2104aac9a14674dfdf018fdac763415b373b29ce18cdb81d36328ba4e5c9f12629f3a50c3e8f9ee048f22dbdbe93a82813da89c6b81334@51.20.235.126:31004,enode://95270e0550848a72fb141cf27f1c4ea10714edde365b411dc0fa06c81c0f282ce155eb9fa472b6b8bb9ee98395eeaf4c5a7b02a01fe58b37ea98ba152eda4c37@13.50.94.193:31000,enode://72013391755f24f08567b932feeeec4c893c06e0b1fb480890c83bf87fd277ad86a5ab9cb586db9ae9970371a2f8cb0c96f6c9f69045abca0fb801db7f047138@51.20.235.126:31001" \
--syncmode full \
--metrics \
--verbosity 3
enodes

You can choose from a range of edge nodes (enodes) for Linea Mainnet. The above command uses US-based enodes by default, but you may experience better performance if you choose enodes based in a closer region (Europe or Asia-Pacific).

See our enodes page for a full list of available enodes.

The Linea network only produces blocks if there is currently at least 1 pending transaction. If you see no incoming blocks to your node, that does not mean that the node is not syncing.

If you don't see any incoming blocks, check and make sure that you have at least one peer from the bootnodes; otherwise, you might not be connected to the Linea network.


Confirm the node is running​

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).


curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'

You should get a result similar to:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"startingBlock": "0x0",
"currentBlock": "0x5d228",
"highestBlock": "0x3cedec"
}
}