This guide provides instructions for setting up and running Linea services locally, with a specific focus on the coordinator service.
Before you start, make sure you have the following installed:
- Node.js >= 24.18.0 (see
.nvmrc) - Docker v24 or higher
- Docker should have ~16 GB of Memory and 4+ CPUs to run the entire stack
- Docker Compose version v2.19+
- Make v3.81+
- Pnpm >= 11.9.0 (https://pnpm.io/installation)
- Java Development Kit (JDK) 25 (required for building the coordinator)
- Gradle 9.4+ (for building Java-based services)
The coordinator is a Java-based service that orchestrates the Lineth protocol's operations. You can build it locally using the following steps:
If you haven't already, clone the repository and navigate to the project directory:
git clone https://github.com/LFDT-Lineth/lineth-monorepo.git
cd lineth-monorepoInstall the Node.js dependencies:
make pnpm-installThe coordinator can be built using Gradle:
./gradlew :coordinator:app:buildThis will generate the coordinator JAR file in the coordinator/app/build/libs directory.
To build a local Docker image of the coordinator:
# First build the coordinator JAR
./gradlew coordinator:app:installDist
# Then build the Docker image
docker buildx build --file coordinator/Dockerfile --build-context libs=./coordinator/app/build/install/coordinator/lib --tag consensys/linea-coordinator:local .There are two main ways to run the coordinator:
The recommended way to run the coordinator is as part of the complete Lineth stack:
# Start the entire stack with tracing v2 using your local coordinator image
LINEA_COORDINATOR_TAG=local make start-env-with-tracing-v2This command:
- Starts all necessary services (L1 node, L2 node, sequencer, etc.)
- Deploys the required smart contracts
- Starts the coordinator service with your locally built image
If you want to run just the coordinator for development purposes, you can use:
# Set necessary environment variables
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=postgres
# Run only PostgreSQL database (required by coordinator)
docker compose -f docker/compose-tracing-v2.yml up -d postgres
# Run the coordinator with your local build
java -Dvertx.configurationFile=docker/config/coordinator/vertx-options.json \
-Dlog4j2.configurationFile=docker/config/coordinator/log4j2-dev.xml \
-jar coordinator/app/build/libs/coordinator.jar \
--traces-limits-v4 docker/config/common/traces-limits-v4.4.toml \
--smart-contract-errors docker/config/common/smart-contract-errors.toml \
--gas-price-cap-time-of-day-multipliers docker/config/common/gas-price-cap-time-of-day-multipliers.toml \
docker/config/coordinator/coordinator-config-v2.tomlNote: When running the coordinator standalone, you'll need to ensure that all its dependencies (such as L1 and L2 nodes) are properly configured and running.
The coordinator uses several configuration files:
docker/config/coordinator/coordinator-config-v2.toml: Main configuration filedocker/config/common/traces-limits-v4.4.toml: Traces limits configurationdocker/config/common/smart-contract-errors.toml: Smart contract errors configurationdocker/config/common/gas-price-cap-time-of-day-multipliers.toml: Gas price cap multipliers
For development, you may want to modify the following parameters in the coordinator configuration:
conflation.conflation-deadline: Controls how long the coordinator waits before conflating blocks (default is 6 seconds)l1-submission.blob.l1-endpoint: Configure the connection to the L1 node for submitting blob tx (defaults to default.l1-endpoint)l1-submission.aggregation.l1-endpoint: Configure the connection to the L1 node for submitting aggregation tx (defaults to default.l1-endpoint)conflation.l2-endpoint: Configure the connection to the L2 node for conflation (defaults to default.l2-endpoint)l1-finalization-monitor.l2-endpoint: Configure the connection to the L2 node for retrieving L2 block data (defaults to default.l2-endpoint)message-anchoring.l2-endpoint: Configure the connection to the L2 node for submitting message anchoring tx (defaults to default.l2-endpoint)proversection: Configure the paths for prover requests and responses
If you encounter issues with the Docker setup:
# Clean the environment and remove Docker volumes
make clean-environment
docker system prune --volumesIf the coordinator has trouble connecting to other services:
-
Check that all required services are running:
docker compose -f docker/compose-tracing-v2.yml ps
-
Verify network connectivity between containers:
docker run --rm -it --network=docker_linea weibeld/ubuntu-networking bash ping coordinator ping postgres ping l1-el-node
-
Check the coordinator logs:
docker logs coordinator
When developing the coordinator:
- Make your code changes
- Run tests:
./gradlew :coordinator:app:test - Build the coordinator:
./gradlew :coordinator:app:build - Build a local Docker image (as shown above)
- Start the environment with your local image
- Test your changes
- Coordinator API: http://localhost:9545
- Sequencer RPC: http://localhost:8545
- Traces Node: http://localhost:8745
- PostgreSQL: localhost:5432