Skip to main content

Run locally

Prerequisites​

The following installed:

important

These instructions runs the Linea stack using Docker containers. Ensure you set your Docker resources to use at a minimum 10 CPU cores, 8GB of memory and 1GB 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 i

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 the components in Docker Desktop.

Docker Desktop view of the Linea stack.

View network details​

Access the RPC endpoints from the following local URLs:

info

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

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

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 and docker volumes and any data saved it them.

make clean-environment
docker system prune --volumes