Giter Site home page Giter Site logo

chadsr / ethereum-node Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 57 KB

A dockerized Ethereum related node setup (Geth + Swarm + InfluxDB + Grafana)

License: MIT License

ethereum ethereum-node ethereum-swarm docker-compose armv8 armv7 geth-node go-ethereum ethersphere ens

ethereum-node's Introduction

Dockerized Ethereum / Swarm Node

A dockerized Ethereum related node setup, using docker-compose.

Warning(s):

  • The docker-compose setup builds images locally, since official docker images are only built for x86_64 and I wanted this to compile onto ARM variants as well. Make sure the system has enough resources to do the compilation (1GB of RAM should do).
  • This setup was designed for running on locally networked hardware. I take no responsibility if services are exposed to the Internet and you are not adequately firewalled.

Config

Secrets are handled through environment variables, which can be set by renaming .config.env.example to .config.env and changing account values to your own.

Grafana default credentials are admin:admin. Change them as soon as Grafana is up and running.

Requirements

  • Adequate storage space (Ideally >300Gb. This is a full-node setup, but could be tweaked otherwise)
  • Minimum of 4GB RAM (If you have 4GB, enable a swap partition to avoid issues!)
  • systemd (or some equivalent such as supervisord)
  • docker (With systemd daemon, or equivalent running)
  • docker-compose
  • An Ethereum account

Installing

  1. Clone this repository:
git clone https://github.com/Chadsr/ethereum_node.git
  1. Init and update Git submodules
git submodule init
git submodule update
  1. Copy the example config to .config.env:
cp .config.env.example .config.env
  1. Edit the values in .config.env to your preference.

Note: An Ethereum account will NOT automatically be generated. It is assumed that you have already created one.

systemd installation

An example systemd unit file:

[Unit]
Description=Ethereum Dockerized Services
Requires=docker.service
After=docker.service

[Service]
EnvironmentFile=/path/to/ethereum_node/.config.env
WorkingDirectory=/path/to/ethereum_node
Restart=always

ExecStart=/usr/bin/docker-compose -f compose_files/geth.yml -f compose_files/swarm.yml -f compose_files/metrics.yml up --build

ExecStop=/usr/bin/docker-compose down

[Install]
WantedBy=multi-user.target
  1. Write the above to a file named /etc/systemd/system/ethereum.service and update the working directory to point to the cloned repository.

  2. Enable the systemd service:

sudo systemctl enable ethereum.service
  1. Start the systemd service:
sudo systemctl start ethereum.service
  1. (Optionally) monitor the output of your newly running service:
sudo journalctl -f -u ethereum.service

Notes

Architecture Support

Since this setup is designed to build the docker images locally, it should work on any common CPU architecture. I am personally running it on aarch64 (ARMv8).

Geth

Current version: v1.9.25

Swarm

Current version: v0.5.7

ethereum-node's People

Contributors

chadsr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.