Keep Network의 ECDSA & Beacon nodes Vultr에 설치하기
컨텐츠 정보
- 19,025 조회
- 0 추천
- 목록
본문
가상서버호스팅으로 유명한 Vultr에 Keep Network의 ECDSA & Beacon nodes를 설치하는 방법을 알려드리겠습니다.
Keep Network의 ECDSA & Beacon nodes 지갑 셋팅하기 ( https://www.wsgvet.com/blockchain/4 )
위 링크를 보고 지갑 및 Infura 정보를 메모장에 저장해둔 후 진행 가능합니다.
1. Vultr 가입하기

https://www.vultr.com/?ref=8691484-6G
위 추천인 링크로 가입한 후 결제 카드를 등록하면 30일 동안 $100을 무료로 쓸 수 있습니다.
4GB 상품이 $20이므로 4~5개를 1달 동안 편하게 사용할 수 있습니다.
2. 인스턴스 생성하기
가입하면 위와 같이 나오는데요. Deploy Instance 를 클릭합니다.

서버는 Cloud Compute, Location은 Tokyo를 선택합니다. Seoul은 4GB 상품이 없어서 선택할 수 없습니다.

Server Type은 Ubuntu를 클릭 후 20.04 x64를 클릭합니다.
Server Size는 80GB SSD, $20/mo, 4096MB를 선택합니다. 나중에 가격이 저렴해질 수 있습니다.
중요한 부분은 4096MB 메모리가 필수입니다.

추가 기능, 스타트업 스크립트, SSH Keys는 그대로 두고, Server Hostname & Label에 keep을 넣고 Deloy Now를 누릅니다.
3. 인스턴스 정보 찾기

위와 같이 Installing이 나오면서 설치가 됩니다. keep을 클릭합니다.

위와 같이 내용이 나올 것입니다.
이제 SSH 접속에 제일 중요한 IP 주소와 root 비번을 찾아야 합니다.
IP Address가 putty 프로그램에서 넣을 IP 주소입니다.
그리고 Password에서 눈 모양 아이콘을 누르면 root 비밀번호를 볼 수 있습니다.
IP주소와 root 비밀번호는 메모장에 저장해둡니다.
4. SSH 접속프로그램 Putty 다운받기
(1) 32bit 용 Putty 다운 받기
https://the.earth.li/~sgtatham/putty/latest/w32/putty.exe
(2) 64bit 용 Putty 다운 받기
https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe
자신의 컴퓨터에 맞는 bit를 선택해서 다운 받으면 됩니다.
5. Putty 실행 후 SSH 접속하기
다운 받은 파일을 실행하면 설치 후 실행이 됩니다.

위와 같이 Host Name (or IP address)에 Vultr에서 생성한 인스턴스의 IP 주소를 넣고 Open을 누릅니다.

위와 같이 경고표시가 나오는데요. 그냥 예(Y)를 누르면 됩니다.

login as에 root 를 넣고, password에 Vultr에서 복사한 비번을 그대로 넣고 엔터를 치면 로그인이 됩니다.
비번은 입력해도 표시가 되지 않으니 당황하지 않아도 됩니다.

정상적으로 로그인이 됐다면 위와 같이 나올 것입니다.
6. Docker 설치하기
sudo apt update -y && sudo apt -y upgrade && sudo apt -y autoremove \
&& sudo apt install nano curl -y \
&& sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \
&& sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y \
&& sudo apt update -y \
&& sudo apt install docker-ce docker-ce-cli containerd.io -y \
&& sudo sudo systemctl start docker && sudo systemctl enable docker \
&& sudo ufw allow 22 && sudo ufw allow 3919 && sudo ufw allow 3920 && sudo ufw enable \
&& sudo mkdir -p beacon/persistence ecdsa/persistence \
&& sudo docker --version;
위 내용을 복사 후 붙여넣기 합니다.
Putty에 붙여넣기 하는 방법은 검은 화면에 마우스 우클릭하면 됩니다.
그리고 엔터를 치면 알아서 설치합니다. 시간이 좀 걸립니다.
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
Docker version 19.03.13, build 4484c46d9d
위와 같이 물어보는데 y, 엔터 누르면 됩니다. 마지막에 Docker version이 나오면 성공입니다.
7. node 소스 다운받기
cd && git clone https://github.com/nikgrego/keep_nodes_template_en keep
위 명령어를 복사 후 붙여넣기해서 실행합니다.
Cloning into 'keep'...
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 41 (delta 14), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (41/41), 7.63 KiB | 781.00 KiB/s, done.
위와 같이 다운 받아질 것입니다.
8. Node 정보 입력하기
총 8개의 파일을 수정해야 합니다. 지갑정보가 저장된 메모장을 엽니다. 지금을 위해 만들어둔 것입니다.
우선 쉬운 것부터 하겠습니다.
nano keep/beacon/config/keep-beacon-operator-account-address.txt
위 내용을 복사해서 붙여넣기 후 엔터를 칩니다.
REPLACE THIS TEXT WITH YOUR WALLET ADDRESS
위 내용이 나올텐데요. 컨트롤 + k를 눌러서 지웁니다.
그리고 메모장에 있는 자신의 이더리움 지갑 주소를 넣습니다.
컨트롤 + v를 누르면 붙여넣기가 됩니다.
그리고 컨트롤 + O, 엔터, 컨트롤 + X를 눌러서 저장 후 빠져나옵니다.
앞으로 저장 후 빠져나오는 것은 컨트롤 + O, 엔터, 컨트롤 + X 라고 생각하시면 됩니다.
nano keep/beacon/config/keep-beacon-operator-account-password.txt
위 명령어를 넣으면
REPLACE THIS TEXT WITH YOUR WALLET PASSWORD
위 내용이 나올텐데요. 컨트롤 + k를 눌러서 지웁니다.
그리고 지갑 생성할 때 만든 비밀번호를 넣습니다.
메타마스크 접속 비번이 아닙니다.
keystore 파일 생성할때 넣은 비번입니다.
저장 후 빠져나옵니다.
nano keep/beacon/config/keep-beacon-operator-account-keyfile
위 명령어를 넣으면
REPLACE THIS TEXT WITH YOUR WALLET JSON CONTENT
위와 같은 내용이 나올텐데요. 컨트롤 + k를 눌러서 지웁니다.
그리고 아까 메모장에 복사해둔 {"version":3,~~ 로 시작하는 keystore 파일의 내용을 전부 붙여넣기 해줍니다.
좀 이상하게 나올 수 있는데, 한줄이므로 걱정하지 않아도 됩니다.
저장 후 빠져나옵니다.
총 3개의 파일을 수정했는데요. ecdsa 노드도 같은 내용이므로 복사해줄 것입니다.
cp keep/beacon/config/keep-beacon-operator-account-address.txt keep/ecdsa/config/keep-ecdsa-operator-account-address.txt \
&& cp keep/beacon/config/keep-beacon-operator-account-password.txt keep/ecdsa/config/keep-ecdsa-operator-account-password.txt \
&& cp keep/beacon/config/keep-beacon-operator-account-keyfile keep/ecdsa/config/keep-ecdsa-operator-account-keyfile;
위 내용을 전부 복사해서 붙여넣은 후 엔터를 칩니다. ecdsa에도 같은 내용이 복사가 되었습니다.
이제 파일 2개만 수정하면 됩니다! 끝이 보이네요!
nano keep/beacon/config/config.toml
위 명령어를 넣으면 글자가 많이 나옵니다.
# This is a TOML configuration file for Beacon node.
# Connection details of ethereum blockchain.
# Please, replace this links with your's Infura links.
[ethereum]
URL = "wss://ropsten.infura.io/ws/v3/YOUR_PROJECT_ID_ON_INFURA_FOR_BEACON_NODE"
URLRPC = "https://ropsten.infura.io/v3/YOUR_PROJECT_ID_ON_INFURA_FOR_BEACON_NODE"
# Your wallet address and link to your's wallet keyfile on the server. Replace your wallet address. No need to cha>
[ethereum.account]
Address = "PASTE_HERE_YOUR_WALLET_ADDRESS"
우리가 바꿔야 할 것은 총 3군데입니다. 모두 메모장에 저장해둔 것들입니다.
wss://ropsten.infura.io/ws/v3/YOUR_PROJECT_ID_ON_INFURA_FOR_BEACON_NODE
위 내용 대신에 infura에서 생성한 beacon node의 endpoints에서 wss://로 시작하는 것으로 바꿔주면 됩니다.
wss://ropsten.infura.io/ws/v3/1234123412341234124124
대략 위와 같이 되겠죠?
위 내용도 https://~~ 로 시작하는 내용으로 바꿔주면 됩니다.
Address = "PASTE_HERE_YOUR_WALLET_ADDRESS"
위 내용도 자신의 keep 계정 지갑 주소를 넣어주면 됩니다.
다 바꿨으면
# This is a TOML configuration file for Beacon node.
# Connection details of ethereum blockchain.
# Please, replace this links with your's Infura links.
[ethereum]
URL = "wss://ropsten.infura.io/ws/v3/12341234123412341234121234"
URLRPC = "https://ropsten.infura.io/v3/243523452345234523523523453245"
# Your wallet address and link to your's wallet keyfile on the server. Replace your wallet address. No need to change keyfile path.
[ethereum.account]
Address = "0x23l45jhk3ljj53l4k5j3lk5j34l1"
위와 같이 될 것입니다. 저장 후 빠져나옵니다.
이제 ECDSA node의 설정을 바꿀 것입니다.
nano keep/ecdsa/config/config.toml
이번에도 똑같이 총 3군데를 바꾸면 됩니다. 모두 메모장에 있는 것들이죠?
지갑주소는 beacon node와 같을 것이고, URL과 URLRPC는 ECDSA node의 그것으로 교체하면 됩니다.
저장 후 빠져나옵니다.
9. Node 실행하기
우선 Beacon node를 실행합니다.
cd && cd keep/beacon \
&& export KEEP_ACCOUNT_PASSWORD=$(cat ./config/keep-beacon-operator-account-password.txt) \
&& export SERVER_IP=$(curl ifconfig.co);
위 내용을 전체 복사해서 한번에 붙여넣고, 엔터를 누릅니다.
sudo docker run -d \
--entrypoint keep-client \
--restart always \
--volume ~/keep/beacon/persistence:/mnt/keep-beacon-client/persistence \
--volume ~/keep/beacon/config:/mnt/keep-beacon-client/config \
--env KEEP_ETHEREUM_PASSWORD=$KEEP_ACCOUNT_PASSWORD \
--env LOG_LEVEL=debug \
--name beacon-node \
-p 3920:3919 \
keepnetwork/keep-client:v1.3.1 --config /mnt/keep-beacon-client/config/config.toml start
위 내용을 전체 복사해서 한번에 붙여넣고, 엔터를 누릅니다.
Unable to find image 'keepnetwork/keep-client:v1.3.1' locally
v1.3.1: Pulling from keepnetwork/keep-client
21c83c524219: Pull complete
0b8fa4bc359c: Pull complete
Digest: sha256:1d8508f8e274f34ef5f78677b7c42cb05d3c80da84a8837cf6363b42b0856c6a
Status: Downloaded newer image for keepnetwork/keep-client:v1.3.1
d61ae27d09e27338382857dff8729c95d4fce9418130699af5ebb475f43ed8fb
위와 같이 나오면 실행 완료입니다.
이제 ECDSA node를 실행합니다.
cd && cd keep/ecdsa \
&& export KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD=$(cat ./config/keep-ecdsa-operator-account-password.txt);
위 내용을 전부 복사해서 붙여넣은 후 엔터를 누릅니다.
sudo docker run -d \
--entrypoint keep-ecdsa \
--restart always \
--volume ~/keep/ecdsa/persistence:/mnt/keep-ecdsa-client/persistence \
--volume ~/keep/ecdsa/config:/mnt/keep-ecdsa-client/config \
--env KEEP_ETHEREUM_PASSWORD=$KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD \
--env LOG_LEVEL=debug \
--name ecdsa-node \
-p 3919:3919 \
keepnetwork/keep-ecdsa-client:v1.4.0 --config /mnt/keep-ecdsa-client/config/config.toml start
위 내용을 전체 복사해서 한번에 붙여넣고, 엔터를 누릅니다.
Unable to find image 'keepnetwork/keep-ecdsa-client:v1.4.0' locally
v1.4.0: Pulling from keepnetwork/keep-ecdsa-client
21c83c524219: Already exists
77ec07c446a8: Pull complete
Digest: sha256:363e3d09d9d2c01284b12bb5858ceef2330255329a0b8452074ad21e013a792e
Status: Downloaded newer image for keepnetwork/keep-ecdsa-client:v1.4.0
위와 같이 나오면 성공입니다.
잘 되고 있는지 확인하려면
docker ps
위 명령어를 내렸을 때
@keep-node:~/keep/ecdsa$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
71b78c95c9e6 keepnetwork/keep-ecdsa-client:v1.4.0 "keep-ecdsa --config…" About a minute ago Up About a minute 0.0.0.0:3919->3919/tcp ecdsa-node
9f8dfb7e2cba keepnetwork/keep-client:v1.3.1 "keep-client --confi…" 5 minutes ago Up 5 minutes 0.0.0.0:3920->3919/tcp beacon-node
위와 같이 STATUS에 Up ~~ minutes로 나오면 성공입니다.
혹시 Restarting~~ 으로 나오면 잘못된 것이니 다시 체크해보세요.
docker logs beacon-node -f
위 명령어는 Beacon-node가 잘 돌아가는지 볼 수 있습니다.
빠져나오려면 컨트롤 + c를 누르면 됩니다.
docker logs ecdsa-node -f
위 명령어는 ECDSA-node가 잘 돌아가는지 볼 수 있습니다.
빠져나오려면 컨트롤 + c를 누르면 됩니다.
또는 https://keepnode.app/ 이 사이트에 들어가서 메타마스크와 연결하면 어느정도 정보가 나옵니다.
10. Node가 연결됐는지 확인하는 방법
Node를 실행한 후 10~20분 정도 기다립니다.
그 후에 확인해보면 됩니다.
실행 직후에는 peer가 붙지 않습니다. 걱정마세요!
1. Beacon-node
docker logs beacon-node 2>&1 --since 5m | grep "number of connected peers"
위 명령어를 내렸을 때
@keep-node:~$ docker logs beacon-node 2>&1 --since 5m | grep "number of connected peers"
2020-09-27T12:59:03.882Z INFO keep-net-libp2p number of connected peers: [85]
2020-09-27T13:00:03.882Z INFO keep-net-libp2p number of connected peers: [85]
2020-09-27T13:01:03.882Z INFO keep-net-libp2p number of connected peers: [85]
2020-09-27T13:02:03.882Z INFO keep-net-libp2p number of connected peers: [85]
2020-09-27T13:03:03.882Z INFO keep-net-libp2p number of connected peers: [85]
위와 같이 나오면 성공입니다.
2. ECDSA-node
docker logs ecdsa-node 2>&1 --since 5m | grep "number of connected peers"
위 명령어를 내렸을 때
@keep-node:~$ docker logs ecdsa-node 2>&1 --since 5m | grep "number of connected peers"
2020-09-27T12:59:00.498Z INFO keep-net-libp2p number of connected peers: [366]
2020-09-27T13:00:00.498Z INFO keep-net-libp2p number of connected peers: [371]
2020-09-27T13:01:00.499Z INFO keep-net-libp2p number of connected peers: [373]
2020-09-27T13:02:00.498Z INFO keep-net-libp2p number of connected peers: [376]
2020-09-27T13:03:00.498Z INFO keep-net-libp2p number of connected peers: [381]
위와 같이 나오면 성공입니다.
11. Node 업그레이드하기
docker stop beacon-node && docker stop ecdsa-node && docker rm beacon-node && docker rm ecdsa-node
위 명령어로 Node를 정지하고, 생성했던 컨테이너를 삭제합니다.
https://hub.docker.com/r/keepnetwork/keep-client/tags
https://hub.docker.com/r/keepnetwork/keep-ecdsa-client/tags
위 링크에 가서 각각의 버전을 확인하거나,
버전없이 그냥 latest 버전을 다운 받아서 실행하는 방법도 있습니다.
최신버전의 Beacon node를 실행하는 방법
cd && cd keep/beacon \
&& export KEEP_ACCOUNT_PASSWORD=$(cat ./config/keep-beacon-operator-account-password.txt) \
&& export SERVER_IP=$(curl ifconfig.co);
위 내용을 전체 복사해서 한번에 붙여넣고, 엔터를 누릅니다.
sudo docker run -d \
--entrypoint keep-client \
--restart always \
--volume ~/keep/beacon/persistence:/mnt/keep-beacon-client/persistence \
--volume ~/keep/beacon/config:/mnt/keep-beacon-client/config \
--env KEEP_ETHEREUM_PASSWORD=$KEEP_ACCOUNT_PASSWORD \
--env LOG_LEVEL=debug \
--name beacon-node \
-p 3920:3919 \
keepnetwork/keep-client --config /mnt/keep-beacon-client/config/config.toml start
위 내용을 전체 복사해서 한번에 붙여넣고, 엔터를 누릅니다.
Unable to find image 'keepnetwork/keep-client:latest' locally
latest: Pulling from keepnetwork/keep-client
21c83c524219: Already exists
069b56ef4eed: Pull complete
Digest: sha256:8e4f82dddb3e47a225825e6ed99339a0b484cbb89dde69e0d59f7c43eef10aba
Status: Downloaded newer image for keepnetwork/keep-client:latest
337c9e8f7db1d2f4ccc1bdba865727d3bdf708749bcbf453d9317957a339e6c4
위와 같이 latest 이미지를 다운 받아서 실행하게 됩니다.
최신버전의 ECDSA node를 실행하는 방법
cd && cd keep/ecdsa \
&& export KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD=$(cat ./config/keep-ecdsa-operator-account-password.txt);
위 내용을 전부 복사해서 붙여넣은 후 엔터를 누릅니다.
sudo docker run -d \
--entrypoint keep-ecdsa \
--restart always \
--volume ~/keep/ecdsa/persistence:/mnt/keep-ecdsa-client/persistence \
--volume ~/keep/ecdsa/config:/mnt/keep-ecdsa-client/config \
--env KEEP_ETHEREUM_PASSWORD=$KEEP_ECDSA_OPERATOR_ACCOUNT_PASSWORD \
--env LOG_LEVEL=debug \
--name ecdsa-node \
-p 3919:3919 \
keepnetwork/keep-ecdsa-client --config /mnt/keep-ecdsa-client/config/config.toml start
위 내용을 전체 복사해서 한번에 붙여넣고, 엔터를 누릅니다.
Unable to find image 'keepnetwork/keep-ecdsa-client:latest' locally
latest: Pulling from keepnetwork/keep-ecdsa-client
21c83c524219: Already exists
6afa303e4d4e: Pull complete
Digest: sha256:50386fbfffde9e5d9250db9ee07ac94065707a3874a4957b709696e4b9e8093e
Status: Downloaded newer image for keepnetwork/keep-ecdsa-client:latest
a2abcbe032179fcac5a252c68dba0a70af06cb20aaa1e32f9eb38f4cde512fe9
이렇게 버전을 삭제하면 최신버전으로 다운 받아서 실행하게 됩니다.
Keep Network 참고사이트
Keep Discord : https://discordapp.com/invite/wYezN7v
Homepage : https://keep.network/
Keep GitHub : https://github.com/keep-network
스테이킹 가이드 : https://keep-network.gitbook.io/staking-documentation/
Docker Hub : https://hub.docker.com/u/keepnetwork
Vultr로 구축하는 방법 : https://medium.com/@nickgrego/step-by-step-guide-for-installing-both-ecdsa-beacon-nodes-on-vps-with-100-voucher-db930ab2a667
-
등록일 2023.07.01
-
등록일 2023.06.29
-
등록일 2022.04.25
-
등록일 2022.04.22크레딧코인(CTC) 윈도우에서 채굴하는 방법댓글 114
관련자료
-
서명우성짱의 NAS를 운영하고 있습니다.
저의 즐거움이 여러분의 즐거움이면 좋겠습니다.