4-2-2. How to set up EMETH Node "Ubuntu"

This guide provides a comprehensive, step-by-step procedure for setting up an EMETH Node on a Ubuntu Linux operating system.

◇ Set up flow

  1. Initial Environment Preparation

  2. Operation with Node.js

  3. Operation with EMETH NODE

  4. (Optional) Persistence by Process-Manager

Preparation of initial environment Install Ubuntu, MetaMask, and create an account (wallet address) for Emeth Node.

1. Initial Environment Preparation

Install Ubuntu, MetaMask, create account (wallet address) for Emeth Node

Ubuntu Installation Reference

https://www.youtube.com/watch?v=wjbbl0TTMeo

◇Guide for how to prepare MATIC

Procure MATIC tokens and put them in MetaMask.

How to buy Polygon MATIC tokens easy way.

https://www.youtube.com/watch?v=n8TwB79My-I

2. operation with Node.js

(1) Install nvm stable version of Node.js

$ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash $ source ~/.profile $ nvm install v18.17.1

Check installed node and npm versions

$ node -v v18.17.1 $ npm -v 9.6.7

(2) Installing Docker

$ sudo apt update $ sudo mkdir -p /etc/apt/keyrings $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg — dearmor -o /etc/apt/keyrings/docker.gpg $ echo “deb [arch=$(dpkg — print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null $ sudo apt update $ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Check installed Docker version

$ docker -v Docker version 24.0.6, build ed223bc

(3) Setting Docker Execution Permissions

$ sudo groupadd -f docker $ sudo usermod -aG docker $USER $ newgrp docker

3. operation with EMETH NODE

(1) Installation of EMETH Node

$ mkdir emeth-node $ cd emeth-node $ wget https://github.com/alt-emeth/emeth-node/releases/download/v0.8.1/emeth-node.zip $ unzip emeth-node $ rm emeth-node.zip

(2) Editing Configuration Files

$ cp config/emeth-node.json.example config/emeth-node.json $ vi config/emeth-node.json

(3) Setting items

config/emeth-code.json:

Here are the list of items you don’t need to change from “Sample Value”. *You need to prepare and fill“endpoint” and “privateKey” by yourself.

・cacheServerUrl https://cache.emeth.ai/api/v1/jobs

・storageApiUrl https://storage.emeth.ai/api/v1/

・emethCoreContractAddress: 0x5aF9c255D6C965aAa8DB3e9C82276e59345186C8

・emethTokenContractAddress: 0xCB746131b75f30942de7C59a5Be1393Fca5Be05D

(4) Starting EMETH Node

$ node bundle.js

If you want to process only one job for testing, the following options are available

$ node bundle.js — iterations 1

4.(Optional) Persistence by Process-Manager

(1) Install pm2

$ npm install -g pm2

(2) Run Emeth Node persistently

$ pm2 start bundle.js — name emeth-node

(3) Emeth Node Process checking

$ pm2 list

or

$ pm2 monit

(4) Emeth Node log tracking

$ pm2 logs emeth-node

◇ Inquiries

If you encounter any errors or have any questions, please contact us in the Discord channel. Discord: https://discord.gg/wRAS5PhWUb

Last updated