Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing ethrex (docker)

Run Ethrex easily using Docker containers. This guide covers pulling and running official images.

Prerequisites

  • Docker installed and running

Pulling the Docker Image

Latest stable release:

docker pull ghcr.io/lambdaclass/ethrex:latest

Latest development build:

docker pull ghcr.io/lambdaclass/ethrex:main

Specific version:

docker pull ghcr.io/lambdaclass/ethrex:<version-tag>

Find available tags in the GitHub repo.


Running the Docker Image

Check the Image

Verify the image is working:

docker run --rm ghcr.io/lambdaclass/ethrex --version

Start an ethrex Node

Run the following command to start a node in the background:

docker run \
    --rm \
    -d \
    -v ethrex:/root/.local/share/ethrex \
    -p 8545:8545 \
    -p 8551:8551 \
    -p 30303:30303 \
    -p 30303:30303/udp \
    -p 9090:9090 \
    --name ethrex \
    ghcr.io/lambdaclass/ethrex \
    --http.addr 0.0.0.0 \
    --authrpc.addr 0.0.0.0

What this does:

  • Starts a container named ethrex
  • Publishes ports:
    • 8545: JSON-RPC server (TCP)
    • 8551: Auth JSON-RPC server (TCP)
    • 30303: P2P networking (TCP/UDP)
    • 9090: Metrics (TCP)
  • Mounts the Docker volume ethrex to persist blockchain data

--http.addr 0.0.0.0 is required inside the container so the published port 8545 is reachable from the host. The flag only changes the container-internal bind; whether the RPC port is exposed beyond the host is still controlled by the -p 8545:8545 mapping (and any firewall in front of the host). Only enable additional JSON-RPC namespaces with --http.api eth,net,web3,... when you actually need them; admin_*, debug_*, and txpool_* are unauthenticated.

Tip: You can add more Ethrex CLI arguments at the end of the command as needed.


Managing the Container

View logs:

docker logs -f ethrex

Stop the node:

docker stop ethrex