Connect Geth Ethereum Private Blockchain to Metamask (2024)

This tutorial will connect your local geth ethereum private blockchain to Metamask using json file or private keys and perform transactions(send and receive ethers within the network).

To create a geth ethereum private blockchain, follow the below article: https://asha-singh7558.medium.com/setup-geth-ethereum-private-network-3806ef7fbe42

Now that we have our local blockchain, it is running on “http://localhost:8545”.

Connect Geth Ethereum Private Blockchain to Metamask (3)

MetaMask is an extension for accessing Ethereum enabled distributed applications, or “Dapps” in your browser. You can refer the official documentation to setup a metamask wallet: https://metamask.io/

Connect Geth Ethereum Private Blockchain to Metamask (4)

Now that you have metamask wallet and geth blockchain running,

Step1 is to setup the network in metmask.

Click on Settings => Networks

Connect Geth Ethereum Private Blockchain to Metamask (5)
Connect Geth Ethereum Private Blockchain to Metamask (6)

Click on ‘Add a network’ and create the network with the rpc URL and chain Id.

Connect Geth Ethereum Private Blockchain to Metamask (7)

Now, the connection setup is done.

Connect Geth Ethereum Private Blockchain to Metamask (8)

Step 2 is to import the accounts from the geth network to the metamask. There are 2 ways to import accounts, 1st is to import using json file & password and 2nd is to import using private key.

We have two accounts in geth private blockchain and let’s import via both ways.

Connect Geth Ethereum Private Blockchain to Metamask (9)

You can find the details of the accounts in the keystore directory:

Connect Geth Ethereum Private Blockchain to Metamask (10)

Import Accounts in metamask:

  1. Import using json file. Click on ‘Import Account’ and select Type as ‘JSON File’ and select the keystore file and pass the password for the keystore file. And click on Import, it will import the account.
Connect Geth Ethereum Private Blockchain to Metamask (11)

2. Import using ‘private key’. For this, we need to extract the private key from keystore file and this can be achieved by installing the web3 CLI.

Command: curl -LSs https://raw.githubusercontent.com/gochain/web3/master/install.sh | sh

Connect Geth Ethereum Private Blockchain to Metamask (12)

Command to extract the private key from keystore file : web3 account extract — keyfile <file-path> — password <password>

Connect Geth Ethereum Private Blockchain to Metamask (13)

In metamask, click on ‘Import Account’ and select Type as ‘Private Key’ and pass the private key. And click on Import, it will import the account.

Connect Geth Ethereum Private Blockchain to Metamask (14)

Accounts are successfully imported in Metamask.

Connect Geth Ethereum Private Blockchain to Metamask (15)

In Account, click on send and select the other account and the ethers and confirm the transaction.

Connect Geth Ethereum Private Blockchain to Metamask (16)
Connect Geth Ethereum Private Blockchain to Metamask (17)

In the geth network, you can see the details of the transaction submitted.

Connect Geth Ethereum Private Blockchain to Metamask (18)
Connect Geth Ethereum Private Blockchain to Metamask (19)

Done!!!!!!!!!!!!!!! You have successfully completed the tutorial.

Happy Learning!!

Connect Geth Ethereum Private Blockchain to Metamask (2024)
Top Articles
The Beginner's Guide to Creating a Budget | Stepping Stones to FI
136 | How To Fund Your Child's Roth IRA And Other Tax Optimizations With The FI Tax Guy | ChooseFI
$4,500,000 - 645 Matanzas CT, Fort Myers Beach, FL, 33931, William Raveis Real Estate, Mortgage, and Insurance
This website is unavailable in your location. – WSB-TV Channel 2 - Atlanta
Lengua With A Tilde Crossword
Skamania Lodge Groupon
Explore Tarot: Your Ultimate Tarot Cheat Sheet for Beginners
Devotion Showtimes Near Mjr Universal Grand Cinema 16
Nordstrom Rack Glendale Photos
Apply A Mudpack Crossword
27 Places With The Absolute Best Pizza In NYC
Catsweb Tx State
13 The Musical Common Sense Media
Robot or human?
What Does Dwb Mean In Instagram
Winterset Rants And Raves
Readyset Ochsner.org
Darksteel Plate Deepwoken
U/Apprenhensive_You8924
Fairy Liquid Near Me
Payment and Ticket Options | Greyhound
Leader Times Obituaries Liberal Ks
Walmart stores in 6 states no longer provide single-use bags at checkout: Which states are next?
Praew Phat
E22 Ultipro Desktop Version
R Personalfinance
V-Pay: Sicherheit, Kosten und Alternativen - BankingGeek
Weepinbell Gen 3 Learnset
Ice Dodo Unblocked 76
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
The Boogeyman (Film, 2023) - MovieMeter.nl
Lindy Kendra Scott Obituary
Google Flights To Orlando
Rlcraft Toolbelt
Fbsm Greenville Sc
Craigslist Central Il
The Best Carry-On Suitcases 2024, Tested and Reviewed by Travel Editors | SmarterTravel
Truckers Report Forums
Cvb Location Code Lookup
Pawn Shop Open Now
Robeson County Mugshots 2022
Lovein Funeral Obits
2007 Peterbilt 387 Fuse Box Diagram
10 Rarest and Most Valuable Milk Glass Pieces: Value Guide
Ig Weekend Dow
Subdomain Finder
Gabrielle Abbate Obituary
Laura Houston Wbap
Electric Toothbrush Feature Crossword
Ciara Rose Scalia-Hirschman
Optimal Perks Rs3
Famous Dave's BBQ Catering, BBQ Catering Packages, Handcrafted Catering, Famous Dave's | Famous Dave's BBQ Restaurant
Latest Posts
Article information

Author: Prof. Nancy Dach

Last Updated:

Views: 5392

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Prof. Nancy Dach

Birthday: 1993-08-23

Address: 569 Waelchi Ports, South Blainebury, LA 11589

Phone: +9958996486049

Job: Sales Manager

Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.