How to Send Ether on an Ethereum Private Network Using Geth

·

Setting up and interacting with a private Ethereum blockchain offers developers a powerful environment for testing, learning, and building decentralized applications without relying on the public mainnet. In this guide, we’ll walk through how to send Ether—Ethereum’s native cryptocurrency—on a private network using Geth, the Go implementation of the Ethereum protocol.

This tutorial assumes you’ve already set up a private Ethereum network with Geth. If not, you can follow prerequisite guides to initialize a custom genesis block and launch your node. Here, we focus on account creation, mining Ether, and executing transactions in a controlled environment.


Core Keywords

These keywords naturally align with search intent around blockchain development, Ethereum testing environments, and hands-on Geth usage.


Creating Accounts for Transactions

Before sending Ether, you need at least two accounts: one to send funds (sender) and one to receive them (recipient). On Ethereum, these are known as Externally Owned Accounts (EOAs)—wallets controlled by private keys.

Start by launching your Geth console:

geth --networkid "10" --nodiscover --datadir "/root/eth_private_net" console 2>> /root/eth_private_net/geth.log

Once inside the JavaScript console, create two accounts:

personal.newAccount("password123")
// Returns: "0xb0490eae092b1a3e44bb313d52bacc49f6678efc"

personal.newAccount("password456")
// Returns: "0x6b8fc0fdb66f7d17f8b9dbfefcbbc12eab0c6eb3"

The returned strings are Ethereum addresses. Store them securely—though this is a test network, good habits start early.

You can list all accounts with:

eth.accounts

By default, the first account (eth.accounts[0]) is set as the Etherbase—the address that receives mining rewards. You can verify it with:

eth.coinbase

Or change it using:

miner.setEtherbase(eth.accounts[1])

👉 Learn how real-world wallets manage Ether securely on OKX.


Mining Ether on a Private Network

Since your private network starts with zero balances, you must mine Ether to fund transactions. Unlike the public Ethereum network—which uses proof-of-stake after The Merge—this example assumes a legacy proof-of-work setup for educational purposes.

Start mining with:

miner.start()

This command begins generating new blocks. To confirm mining is active:

eth.mining // Returns: true

Check block progression over time:

eth.blockNumber
// Initially 0 → After mining: 101 (for example)

Let the miner run for a few minutes. Once enough blocks are created, stop mining:

miner.stop()

Now check your balance:

eth.getBalance(eth.accounts[0])
// Output: 820000000000000000000 (in wei)

Note: Ethereum uses wei as its smallest unit (1 Ether = 10¹⁸ wei). Convert to human-readable Ether:

web3.fromWei(eth.getBalance(eth.accounts[0]), "ether")
// Output: 820

Congratulations—you’ve earned 820 Ether via mining! This ease is only possible in private networks where difficulty is low and competition nonexistent.


Sending Ether Between Accounts

With funds available, let’s transfer 10 Ether from the first account (A) to the second (B).

Step 1: Unlock the Sender Account

Transactions require signing, so unlock the sender’s account:

personal.unlockAccount(eth.accounts[0], "password123")
// Default unlock duration: 300 seconds

For longer sessions, specify duration:

personal.unlockAccount(eth.accounts[0], "password123", 3600) // 1 hour

Step 2: Initiate the Transaction

Use eth.sendTransaction to send funds:

eth.sendTransaction({
  from: eth.accounts[0],
  to: eth.accounts[1],
  value: web3.toWei(10, "ether")
})
// Returns transaction hash: "0x03afd66b3..."

This creates a transaction and broadcasts it to the network—but it hasn’t been confirmed yet.

Step 3: Confirm Transaction Inclusion

At this point, the transaction sits in the pending pool, not yet part of the blockchain. Verify this:

eth.pendingTransactions
// Shows your transaction object with blockNumber: null

To finalize the transfer, restart mining:

miner.start()

Wait a moment, then check again:

eth.pendingTransactions // Should return []

An empty array means the transaction was included in a new block.

Verify success by checking the recipient’s balance:

web3.fromWei(eth.getBalance(eth.accounts[1]), "ether")
// Output: 10

Success! The recipient now holds 10 Ether.

You can also inspect the transaction details:

eth.getTransaction("0x03afd66b3...")

Now you’ll see blockNumber populated—proof of confirmation.

👉 Explore secure ways to store and manage digital assets with OKX Wallet.


Frequently Asked Questions (FAQ)

Q: Why does eth.getBalance() return such a large number?

A: Ethereum natively uses wei, not Ether. One Ether equals 1,000,000,000,000,000,000 wei (10¹⁸). Always use web3.fromWei() to convert balances into readable units.

Q: Do I need to mine after every transaction?

A: Yes—in proof-of-work networks, transactions require block inclusion to be finalized. Mining processes pending transactions into new blocks. In production PoS networks, validators perform this role instead.

Q: What happens if I don’t mine after sending a transaction?

A: The transaction remains in the mempool (pending queue) indefinitely until included in a block. Without mining or validation, no state changes occur on-chain.

Q: Can I send Ether without unlocking the account?

A: No. Signing a transaction requires access to the private key, which is protected by the account password. Unlocking grants temporary access for signing.

Q: Is mining profitable on a private network?

A: Not financially—but extremely valuable for learning. Private networks allow full control over consensus mechanics, ideal for testing dApps or teaching blockchain fundamentals.


Final Thoughts

Walking through each step—from account creation to mining and transaction execution—gives deep insight into how Ethereum operates under the hood. While public networks involve complex economics and security considerations, private blockchains offer a sandbox for experimentation.

Remember:

As next steps, consider deploying smart contracts or exploring token standards like ERC-20 on your private chain.

👉 Get started with Ethereum development tools trusted by professionals.