This guide provides a clear, step-by-step walkthrough for setting up your own Ethereum full node using the Go-Ethereum (Geth) client. Whether you're a developer, an enthusiast, or running a business on the blockchain, operating a full node is a fundamental step toward greater participation in the Ethereum network.
Why Deploy a Full Node?
The Ethereum network consists of two primary types of nodes: full nodes and light nodes.
- Full Nodes: These store the entire state of the blockchain, including all transactions and smart contract data. This requires significant resources—approximately 350 GB of storage space and a minimum of 8 GB of RAM.
- Light Nodes: These only store a minimal amount of data, such as block headers. They are lightweight, requiring only a few hundred megabytes of storage and 128–512 MB of memory.
While light nodes are convenient for simple wallet functions, they have critical limitations. They cannot independently initiate transactions or deploy smart contracts; they must rely on a full node to broadcast these actions for them. During periods of high network congestion or major protocol upgrades, light nodes can struggle to find available full nodes to assist them. For any serious development or business application, the reliability and independence of a full node are essential.
Choosing Your Client
Several client implementations exist for running an Ethereum node. The most widely used are:
- Go-Ethereum (Geth): The official Go-language implementation, commanding the largest share of the network (~55%).
- OpenEthereum (formerly Parity): A Rust-based client known for its performance (~22%).
- EthereumJS: A JavaScript-based implementation (~15%).
For this guide, we will use Go-Ethereum (Geth) due to its status as the official client, its massive adoption, extensive documentation, and strong community support.
Deployment on a Linux System
Follow these steps to get your Geth full node up and running on a Linux server.
Step 1: Download and Install Geth
First, download the latest stable version of the Geth tools for Linux from the official website. It is recommended to choose the "All Tools" bundle.
After downloading, extract the archive to a directory in your system's PATH, such as /usr/local/bin/.
You can verify a successful installation by checking the version:
geth versionStep 2: Understanding Key Startup Parameters
Geth is highly configurable. Here are the critical parameters you need to know, categorized by function:
API and Console Options:
These flags control how you interact with your node.
--rpc: Enables the HTTP-RPC server.--rpcaddr: Defines the listening interface (e.g.,0.0.0.0for all interfaces).--rpcport: Sets the HTTP-RPC server port (default: 8545).--rpcapi: Specifies which APIs are available over HTTP-RPC (e.g.,"eth,net,web3,personal").--ws: Enables the WebSocket-RPC server.--wsaddr&--wsport: Configure the WebSocket interface and port (default: 8546).--wsapi: Defines APIs available over WebSocket.
Global Settings:
--datadir: Sets the path to the data directory for storing the blockchain database and keystore (e.g.,/data/eth_data).--syncmode: Chooses the blockchain synchronization mode ("full","fast", or"light"). For a true full node, use"full".
Networking Options:
--port: Sets the network listening port for peer-to-peer communication (default: 30303).
Step 3: Starting the Node
It's best practice to run Geth as a background process. First, create a dedicated directory for the blockchain data.
mkdir /data/eth_dataThen, use the nohup command to start Geth and detach it from your terminal session. The following command starts a full node with both HTTP and WebSocket APIs enabled, allowing connections from any origin (adjust --rpccorsdomain and --wsorigins for production security).
nohup geth --datadir /data/eth_data --syncmode full --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcapi eth,net,web3 --ws --wsaddr 0.0.0.0 --wsorigins "*" --wsapi eth,net,web3 &Upon startup, Geth will begin syncing with the Ethereum network. This process can take several days. A file named geth.ipc will be created in your data directory for local inter-process communication.
Step 4: Stopping the Node
To safely stop your node, you can terminate the Geth process. Find the process ID (PID) using ps aux | grep geth and then use the kill command.
kill [PID]Interacting with Your Node via Local API
Once running, you can interact directly with your node using the built-in JavaScript console.
Attaching the Console
Navigate to your data directory and attach to the running instance using the IPC file.
cd /data/eth_data
geth attach geth.ipcThis will open a console where you can execute commands.
Available API Modules
The specific API modules available in the console depend on what was enabled with the --rpcapi and --wsapi flags at startup. A typical setup may include:
admin: For node management.debug: For debugging.eth: For interacting with the Ethereum blockchain.net: For network information.personal: For account management.web3: Contains utility functions.
Checking Synchronization Status
A crucial command after starting your node is to check its sync status.
// Inside the Geth console
> eth.syncingIf the node is still syncing, this command will return an object showing the current and highest blocks. If it returns false, it means your node is either fully synchronized or has not yet started syncing. You can also check the latest block your node is aware of:
> eth.blockNumberTo manage your node's operations and explore its full potential, you need the right tools. 👉 Explore more strategies for node management.
Frequently Asked Questions
Q: What are the main benefits of running a full node over a light node?
A: Running a full node provides complete independence, enhanced privacy as you don't rely on others for data, improved network health by contributing resources, and the ability to directly validate all transactions and smart contracts without trust.
Q: My node is taking a very long time to sync. Is this normal?
A: Yes, initial synchronization for a full node can take several days, depending on your internet speed and hardware (especially your storage drive's write speed). The Ethereum blockchain is hundreds of gigabytes in size and must be downloaded and verified sequentially.
Q: Can I run a full node on a machine with less than 8 GB of RAM?
A: While it might be possible, it is not recommended. During synchronization, Geth's memory usage can spike significantly. Less than 8 GB of RAM may lead to constant swapping to disk, which will drastically slow down or even stall the sync process.
Q: What is the difference between 'full' and 'fast' sync mode?
A: A 'full' sync verifies every block and transaction from genesis, which is the most secure but slowest method. A 'fast' sync downloads all blocks and transaction receipts first, verifying only the latest state, which is much quicker but trusts the network's proof-of-work for historical data until it catches up.
Q: Is it necessary to keep the console open after starting the node?
A: No, if you started the node with nohup and & (or a service manager like systemd), it will continue to run in the background after you close your terminal. You can detach from the console and reattach later using geth attach.
Q: How can I secure the RPC and WebSocket endpoints on my node?
A: For any public-facing node, it is critical to restrict access. Avoid using 0.0.0.0 and "*" in production. Instead, bind to a specific internal IP and use a reverse proxy (like Nginx) to handle authentication, rate limiting, and TLS encryption for external connections.