Since The Merge, Geth is an execution layer client only. To participate in mainnet block validation you must also run a consensus client (such as Prysm, Lighthouse, Lodestar, Nimbus, or Teku) alongside Geth.
Connect to mainnet
Run Geth with no flags to connect to the Ethereum mainnet. Snap sync is used by default, which downloads more data in exchange for skipping the full historical replay — this is much faster than a full sync.Connect to a testnet
- Holesky
- Sepolia
- Hoodi
Holesky is the primary Ethereum proof-of-stake testnet, suitable for validator and infrastructure testing.Data is stored in a separate subdirectory (
~/.ethereum/holesky on Linux/macOS) so it does not conflict with mainnet data.When attaching a console to a Holesky node on Linux or macOS, you must specify the IPC endpoint explicitly:
Attach an interactive console
Once Geth is running, open the built-in JavaScript console in a separate terminal:Basic console commands
Enable the HTTP JSON-RPC API
To expose an HTTP endpoint for programmatic access:http://localhost:8545 by default. Test it with:
Docker quick start
Start a node using the official Docker image:8545 is the HTTP JSON-RPC port and 30303 is the P2P port.
Use a config file
Instead of passing many flags on every invocation, you can export your current flag set to a TOML config file:Next steps
Sync modes
Understand snap sync, full sync, and archive mode and choose the right one for your use case.
Configuration
Learn all available flags and TOML config options.
JSON-RPC API
Explore the full JSON-RPC API surface available over HTTP, WebSocket, and IPC.
Accounts & Clef
Manage keys securely with the built-in keystore or the standalone Clef signer.
