Default RPC Ports Exposed by Base Node Services: Complete Configuration Guide

The Base node exposes JSON-RPC on port 8545 for the execution client and port 7545 for the op-node service, as defined in the repository's Docker Compose configuration.

The base/node repository provides the Docker infrastructure for running a Base L2 node. Understanding the default RPC ports exposed by Base node services is essential for connecting wallets, indexers, and developer tools to both the execution layer and the rollup node.

Base Node Service Architecture

The Base node stack consists of two primary services orchestrated via docker-compose.yml: the execution client (Geth or Reth) handling EVM state transitions, and the node service (op-node) managing the OP Stack rollup logic. Each service exposes distinct JSON-RPC endpoints for different operational purposes.

Default RPC Port Configuration

The default RPC ports are hardcoded in the Docker Compose port mappings and entrypoint scripts.

Execution Client RPC Port (8545)

The execution client exposes its JSON-RPC API on port 8545. In docker-compose.yml, the host port 8545 maps directly to container port 8545. The geth-entrypoint script confirms this default with the environment variable declaration RPC_PORT="${RPC_PORT:-8545}", ensuring the Geth instance listens on this port unless explicitly overridden.

Base Node (op-node) RPC Port (7545)

The op-node service exposes its JSON-RPC API on port 7545 on the host machine. While the op-node listens on port 8545 inside its container, the Docker Compose configuration maps host port 7545 to container port 8545 to avoid conflicts with the execution client. This port serves as the primary endpoint for rollup-specific operations and L2 block queries.

How to Query Base Node RPC Endpoints

You can interact with both services using standard JSON-RPC requests.

To query the execution client:

curl -X POST http://localhost:8545 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

To query the op-node:

curl -X POST http://localhost:7545 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Both endpoints return the latest block number, confirming the services are accessible on their respective default RPC ports.

Additional Network Ports

While 8545 and 7545 handle primary JSON-RPC traffic, the Base node stack exposes several other ports defined in docker-compose.yml:

  • 8546: WebSocket RPC for the execution client (real-time subscriptions)
  • 9222: P2P networking port for op-node peer discovery
  • 7300: Prometheus metrics endpoint for monitoring
  • 6060: pprof profiling endpoint for performance analysis

These ports support production deployments requiring monitoring, peer connectivity, and WebSocket subscriptions.

Summary

  • The base/node repository defines two primary JSON-RPC endpoints for Base L2 operations.
  • Port 8545 serves the execution client (Geth/Reth) RPC, mapped directly from host to container.
  • Port 7545 serves the op-node RPC, mapped to container port 8545 to prevent conflicts.
  • Configuration originates in docker-compose.yml with defaults set in geth-entrypoint for the execution layer.

Frequently Asked Questions

What is the difference between port 8545 and 7545 on a Base node?

Port 8545 connects to the execution client (Geth or Reth) for standard Ethereum JSON-RPC methods like eth_sendTransaction and eth_call. Port 7545 connects to the op-node, which handles rollup-specific logic including L2 block derivation, sequencer communication, and OP Stack administrative methods. Both are required for full Base node functionality.

Can I change the default RPC ports for Base node services?

Yes. You can modify the port mappings in docker-compose.yml by changing the host-side port numbers (the left side of the colon). For the execution client, you can also override the RPC_PORT environment variable in the geth-entrypoint script or via Docker environment variables. Ensure the op-node host port does not conflict with the execution client if you change the defaults.

Why does the op-node use port 7545 instead of 8545 on the host?

The op-node internally listens on port 8545, but the Docker Compose configuration maps this to host port 7545 to avoid a port conflict with the execution client, which also uses 8545 internally and maps it to host port 8545. This separation allows both services to run simultaneously on the same host machine without network collisions.

Are the Base node RPC ports secure for public exposure?

No. The default configuration assumes these ports run in a trusted environment or behind a firewall. Exposing ports 8545 and 7545 directly to the public internet without authentication, rate limiting, or TLS termination creates significant security risks including unauthorized transaction submission and node manipulation. Always secure RPC endpoints with reverse proxies, VPNs, or firewall rules in production deployments.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →