Run locally
Prerequisites​
Install the following:
- Node.js v18 or later
- Docker v24 or later
- Docker Compose v2.19 or later
- Make v3.81 or later
- Pnpm v9.0.6 or later
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.
View network details​
Access the RPC endpoints from the following local URLs:
- Linea (L2)
- Base layer (L1)
- Endpoints:
- HTTPS:
http://localhost:8545
- WebSockets:
ws://localhost:8546
- HTTPS:
- Chain ID:
1337
- Message service address:
0xe537D669CA013d86EBeF1D64e40fC74CADC91987
- Deployment account private key:
0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae
- Endpoints:
- HTTPS:
http://localhost:8445
- WebSockets:
ws://localhost:8446
- HTTPS:
- Chain ID:
31648428
- Linea rollup contract address:
0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9
- Deployment account private key:
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
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:
This will permanently remove all Docker images, containers, volumes, and any data saved in them.
make clean-environment
docker system prune --volumes