Skip to main content

Run locally

Prerequisites​

Install the following:

important

These instructions run the Linea stack using Docker containers. Set your Docker resources to use at least 10 CPU cores, 8 GB of memory, and 1 GB swap space.

Run the Linea stack​

1. Clone the repository​

Clone the Linea repository:

git clone https://github.com/Consensys/linea-monorepo.git

2. Install the dependencies​

Change to the root of the directory and install the project dependencies:

cd linea-monorepo
pnpm install

3. Start the Linea stack​

Start the network stack. This will also compile and deploy the required rollup contracts:

make fresh-start-all

You now have a local developer instance of the entire Linea network, which includes components such as the sequencer, prover, coordinator, and a local L1 settlement layer. You can view these components in Docker Desktop.

Docker Desktop view of the Linea stack.

View network details​

Access the RPC endpoints from the following local URLs:

  • Endpoints:
    • HTTPS: http://localhost:8545
    • WebSockets: ws://localhost:8546
  • Chain ID: 1337
  • Message service address: 0xe537D669CA013d86EBeF1D64e40fC74CADC91987
  • Deployment account private key: 0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae
info

You can connect your MetaMask wallet to the required chain and import the deployment account to access the test tokens.

Stop the Linea stack​

You can stop and start the the Docker containers in Docker Desktop. However, constant stopping and starting can lead to network or state issues.

Once stopped, you can clean your environment using the following commands:

note

This will permanently remove all Docker images, containers, volumes, and any data saved in them.

make clean-environment
docker system prune --volumes