Bitcoin

Learn how to install an Ethereum node using Geth and Docker

To start the Geth installation on Ethereum, we first need to call up a Windows or GNU / Linux console to start the installation process. If you are working on Windows, You need to go to the Start menu and type in “cmd”, There you will see the following picture:

https://lh5.googleusercontent.com/1HWCS2Of_uY9OHyGs_9d6EwjhtYgLIqsOPx5VdB6lbbF7b9q_M2KH1m-KTAB3xkjfVDHHuIo_d5OGIyhq3nkrG3fOh-PQ_OWHe3od3YyJKzOVo8WvzNQ4EksyTS0ghTSaJM3eDCV

Once there click on the cmd picture (black icon) and you can type it in:

Learn how to install an Ethereum node using Geth and Docker
Learn how to install an Ethereum node using Geth and Docker

https://lh3.googleusercontent.com/VWxP52kLlOjFjT6ZNvVGuemlS3V_gNhaEsUGBnQ2yk-A1K4zKnXZDuOH9F0C_XiPxEMRVR3AlF0bjUraJO3qfbgGaqyRtiUqIqh7pjEpLJSrAmjxrUEL4tpsm_KTNtZjRXxZkcVH

Important: If you are using Windows Terminal or any other console in Windows, this is sufficient. In our case we also follow the examples using Windows Terminal.

If you are using GNU / Linux this is enough. If you are running the console of your desktop environment to be able to follow the steps outlined below.

Install Geth with Docker

In the console or in the terminal you need to enter the following command: nbsp;

Docker Pull Ethereum / Client-Go: stable

This command will start the geth installation process in addition to your current Docker installation. All of this after Process officially described by the geth developers. nbsp;

Important: Never install software from unofficial sources or execute commands that you do not know what they are doing as this could result in the theft of your cryptocurrencies or infection of your computer. Nbsp;

When you run the previous command, our console will show:

https://lh4.googleusercontent.com/0rPUmnFIuJCtG9D29ElNPvibzBO46EA64NaBdRGJ5seTX35_c2Oiub_UQZ1pycefdjnZmHGD_4v5CCnrGWqjBDEg3WrbI7kEGuBH4G_WMg8st8qX8Y4KsDkos_0VnDcV4CgbobFL

Wait for the process to complete before proceeding to the next step. Nbsp;

After the installation is complete, We will go to the Docker dashboardand we will see the following: nbsp;

https://lh3.googleusercontent.com/jT4Hr09i_riHsLZzM_Ri0SV8ANTfHUUswfPneWeHCam3R8s4z-fm_4rqlDephPBLcxzsCZ8YIRgkIpxSiViR1Xntnk3xtFK5CAh4SOTzhdj-iNIy6JjFuJfYIHjNL94qrHV90DJA

As we can see, we have our geth installation installed on Docker. Now start our node nbsp;We need to sit on it and click on the “RUN” option that appears on the right side of the screen.

https://lh6.googleusercontent.com/180b2CsckrFryYfDcv88nZ0TK-Hd2k7LlC-H4zJAotqQCqL7kOciUb42WWEsg7HbplGSGedzBt_rTuwymGAv1iNn4AyFRZnuzdllXwXr0WELIcus5cc46C4QPX-YfGMXw8wlphVT

When you click on you will see the following screen:

https://lh4.googleusercontent.com/GbrdCZVHXBY2c4QxzMU4pWrrmYKt8VE12OxOQtpbZwRt5u2RpRYFLaIPe_kKOPiOeS-HY267o4jro9Z3mhl_M9qsupmLsgpo6iKv2orDQpSgZr96ZLv1EfJSVT7egSoGtUjlNHU_

In the area “container“The Docker dashboard shows:

https://lh6.googleusercontent.com/tU9kNAV_w0RrQcqwXp-7PecZL6sWqCwKN2NlUSFnrRNS3CLjcAY-9zy7HG-FI-8bNNWgaDm0pL7v6BtRL6l6vdEokZCTi-7ZUf6FE1mijiIwWmILSHiVhsghxjErZKwQVYh2B4h3

Our geth node is running there. If we click on it, you can see everything that is going on in it.

https://lh3.googleusercontent.com/yhBtQRaPT7fdZ14wMFDrnxPNH58VOP1GJ7OGZicmp1Mvtvwcg2H7zqWyldpECbKF5sjOon6XlHNV5mAoq7PCb7-Pfhv4qt_JAER9HcaWojoQsy_U6BSNXLqpeuX_g7Qbzt7lkpZ4

All you see at this point is your personal geth node going through the syncing process. Default, When configuring this node, a full synchronization of the Ethereum blockchain is performed, which currently requires 5TB of storage. If you have the resources to manage a node with these characteristics, feel free to do so and help the Ethereum community with their decentralization. In this case, ideally, you should keep this node active at all times on a high-capacity server. nbsp;

However, since this is a lot of space for most people, The ideal is to run a lighter knot, and that’s what we’ll do next. That way, you can install a fully functional node that gives you a higher level of privacy and control over your operations. nbsp;

Setting the light node mode

The light mode configuration is slightly different, however. First, Go to the Docker Dashboard and remove your Geth installation. This will only remove the installation and not the required installation files (images) that we will need later. nbsp;

Deletion can be done by selecting the running image of Geth in the Docker dashboard and clicking the trash can icon that appears on it, as shown in the image below.

https://lh5.googleusercontent.com/IwQxHh_7HFQjV163k7GiBJtjrgRQnRcCmguzBcRRsOyKTRAQzFK8Gueosskj8efOE9gN0ul5OF8R9MFV2KxbLwhUfFNUj-uL14zeWNFD5Je2k47PXnMq1JIuFPrXBfcsZEk0-lYc

With the image removed, the next thing you should create a folder in your documents or on your desktop called “Geth-Docker”. or with the name of your choice. In this folder you save a document with the name “docker-compose.yml”. This document stores the information that is displayed in this link. You can also download the file from the link and save it in the folder that saves you work. Nbsp;

https://lh4.googleusercontent.com/bJwA5VTQA53iNszw9tPaeCn6iielv_TVA9B4G0LcEv2sHFep59wenx616RO8GSHPAaomnpRcXWe7zRrqJQGtF0z3uMnrq5fj0N38qRNHZM5aaP6KAYo2ENIoaAaZjOFDAYc4lkYQ

As far as you know, the commands in the file execute the following command string:

  1. You start a container named app-ethereum. This will be shown in the Docker dashboard once the Docker-Compose installation is complete. Nbsp;
  2. Install the stable version of Geth (Ethereum / Client-Go: Stable). This way we always have the most up-to-date stable version of Geth. Nbsp;
  3. Open ports 8545 for RPC system 30303 and 30303 / udp to connect other wallets and interact with our node. Nbsp;
  4. Using our hard drive, create information storage points for our node. So everything that happens in the node is always recorded. nbsp;
  5. Start Geth in light mode (section ldquo; Command rdquo;). Nbsp;

This way you know exactly what is happening with this Docker-Compose on your computer. Again, I invite you to be careful when performing this type of action from unknown or unreliable sources.

Important: The Docker-Compose configuration indicated is a personal use configuration and is not intended for mass production or public use. Be aware that if you want to provide a public node service for purposes other than collaborative, you must take other security measures.

Once you’ve downloaded the contents of the link and pasted them into the docker-compose.yml file, save your changes and go to the console or terminal. From there, the following will be: Using the console, navigate to your location said file. It’s easy to do, open File Explorer and go to the address where you are. the docker-compose.yml file once it’s there Copy the address shown in the bar as shown in this picture:

https://lh3.googleusercontent.com/eYNFBXiz7HGWjGk5hprkviupOOIfQRDfc42J47DqqHU5GFXNsEajs0cnZpnPSD41svhPn15GFDA_FUn_zhitHWvcsFjNBtBH9dW2ycjZBfdfnnYGcObupcJlbD7HfylDuydH-iqT

In this case the address is: ldquo;D: DOCKER GETH-ETHEREUM rdquo; but in your particular case you can just change it, make sure you copy the address and the following will go to the terminal and paste this command:

CD D: DOCKER GETH-ETHEREUM

This will change your working directory to the directory where you saved the docker-compose.yml file. Once there run the command nbsp; out

Docker-Compose -d

This starts the installation of the Docker-Compose that we did and starts our Geth node in light mode as indicated by us. Nbsp;

https://lh4.googleusercontent.com/WIDtzv7rvCetBAqr6gKanuyuZZzKH85t9JsQIoXmg06_DJN_bHJJgPAQcikh9x3n-nN7ZLzvxH1A3py3e9M2vT9CfulOq9NZA7TaTOjJBQ2x-ABk4aLTMWetembA9R6JKS4ocnev

If we check the Docker dashboard at this point, our lightweight geth node will be working fine. Nbsp;

https://lh6.googleusercontent.com/WrbfkicwK9hwYGqR6OU7L_oPtGLJYGI5SgTJQaFuyBMEYpaqd6FK6R14EZVeIwgWebK2nha6TRfAgH2vYMTlxcdO3tv2BAi1LbVexvPTsZeg1QDMzqSRq2xJ8ORu79aTeD1WOy7V

Test our knot

however How do we know Geth is really there? Working and all this is not just a joke? A quick and easy way is to configure a wallet like MetaMask to use our node to send and receive money from the network. It’s pretty easy to do. To do this, let’s open our favorite browser and go to the official MetaMask website.

https://lh3.googleusercontent.com/I81Fhr7Fdu8spKoH4cim2lmPCfzJ913uW-h5GWq82NLJUBOQCDm-OLCSz1BNdh1gWEjDmcL6RtZq2foHPgJotBOGeWLYMZcBBnxaUzvrVw2P3eolrbz8xFiFp7sAr8v-dWAXAH8d

There go to the “Downloads” or “Download” section and download the wallet for our browser. nbsp;

https://lh4.googleusercontent.com/Emkh0EaxV8_PZY1jSf37dnoXO0DD-19rXM6M0Xy8BHNMRLJF-soioi1SnJuhbpkGADOL0CC_Qyh4udWEfLBil9eAFK4fjB8gzzoD67mIzG3V-yqaMzCL3pK4oWbP97qU9YtYjWMw

When installing, we have our wallet ready to be configured. Nbsp;

https://lh6.googleusercontent.com/0EpAYEvIawNqbctANk_Als2OVd4BrOD8clUINHJ7gxI51mqHCBb2z3gQfqEiqLVR3HN2PVftoPxQKzb0IzSd9wyoAk7HnXLu3G1oAFfW8PVqyY4iXOkUdpXx9jtJw-opXrvxwWaY .

All you have to do is follow the configuration process. As soon as you have completed it, your MetaMask is installed in your browser and can be used. There we start with the configuration for using our local Geth node. Nbsp;

https://lh3.googleusercontent.com/-eCdJVKwyR9RlpnNaQfNljhpTJXHsNOf13GIQyji72o0ZuXalIybWUD1y-Zl3h6R1p7SkgMyGbtX1Dzdm8ILSvYUMMEM6yhSlYmSN93Py6QSG8X8t4yvswlUs_vrB3krz2TlOCkC

In this point, All you have to do is select the connection medium to be used for your MetaMask. It is very easy to do. Just click on the menu. Drop down menu in the top right and select “localhost: 8545”.

https://lh5.googleusercontent.com/wu8yDz1yV9zw6-OfelvBC8AMrck9T-yrdzDos1p7dnPz6SGE9819BS9WOaGJIB56Kq-EiKB5MR_0zlfErFP6C-12w9vIiEgGWOiP0qeYvcVQJf5fkhSN5jUYCUaedFF6QcPGDsWx

With that we have already connected our MetaMask wallet via our own Geth node. However, What what if we want to test our wallet in a DeFi app? If we go to Compound we can check that everything is working as it should.

https://lh6.googleusercontent.com/BZCyYLaS8lNYTCl7VtDX73ymaavggqZBn1vNtSntEIbtW4XMYgSVVkMn4-J1KQCsJBy3n0ZczKA6FLlPniBpHRbEVsWf7CgS0Qjqpy4TRIKKHNTD4viUeAbEVoCd8lIRI1cg5JQc

When we enter the DApp we can interact with it with MetaMask, and that’s it too will send all the information on the network is used through our own node so that third parties cannot manage or forward it. In the figure below, we can see that Compound DApp is actually connected to our MetaMask and that our MetaMask is there. Use our local node to do all the work … decentralize to the max.

https://lh6.googleusercontent.com/i-JMLpH33--sXUX6FxkIdgdSf0njbkF5AjcPUhilDep-7nlOOScw-IiqA6Qe56TRPnpGUATI7d3jp9IOQzEItK3aq14sT6z7mEL87pOG5P8SpteFlwoMp7k5FN3HdsSJP2v16iJP

And since then without any loss of functionality We can easily send, receive and interact with DApps.

https://lh5.googleusercontent.com/1EzTK34DSV-A720tlY-ioRy_j9TILPnqDMURAFxlVO62n3vK_ysr7Bgk21FVtduY_SrXJvC0kvluTgZs0OPPvl37qb92UDnc5uE1fyr-f0J7fwlFG5JMg9DLWyIKdjksloeayOwo

Similar Posts