Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save learner-long-life/56dd4d8e1689173391bb2776392cd753 to your computer and use it in GitHub Desktop.
Save learner-long-life/56dd4d8e1689173391bb2776392cd753 to your computer and use it in GitHub Desktop.
HowToRunEthereumNode.md
How to Run an Ethereum Node
===========================
On a system with Docker installed (for example a GCP node):
```
docker run -d -p 30303:30303 -p 8545:8545 -v /opt/blockchain/ethereum:/root/.ethereum cryptogoth/geth-mainnet:33a0881 --name geth-mainnet
```
This downloads and pulls an image with geth installed and configured to start syncing.
It publishes the exposed ports of 30303 (TCP and UDP) to sync with other nodes, and also TCP port 8545 for JSON RPC calls.
It names the container `geth-mainnet` for easy referencei n later commands.
You can connect to this docker container and execute an additional shell for the purposes of attaching a geth console.
This will let you poke at and inspect the state of your node as it's syncing, and eventually use it to deploy and
interact with contracts.
```
docker exec -it geth-mainnet /bin/bash
```
You will get a prompt similar to:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment