Skip to content

Commit db4d75a

Browse files
authored
Update new_node_setup.md
1 parent 47be49a commit db4d75a

File tree

1 file changed

+83
-30
lines changed

1 file changed

+83
-30
lines changed

new_node_setup.md

Lines changed: 83 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,89 @@ At least 100GB SSD (Note: HDD will not work)
2525
You'll be working with two machines, a server for the validator node, and your personal machie/monitor machine to install near-cli, create the wallet, monitor and control the validator node.
2626

2727
### Ubuntu Prerequisite Installation
28-
*On the Server:*
2928

29+
*To use Nearup On the Server:*
30+
31+
```bash
32+
sudo apt install python3 git curl
33+
```
34+
35+
*To use Compile Script and Systemd:*
3036
```bash
31-
sudo apt install python3 git curl clang build-essential
37+
sudo apt install python3 git curl snapd
3238
```
3339

3440
## Launch validator node
3541

36-
### Step 1. Install Nearup
37-
*On the Server:*
38-
The Prerequisite has python3, git and curl toolset, which have been installed in previous step. please run command prompt.
39-
```bash
42+
### Step 1. Install nearcore on Host
43+
44+
- There are 2 ways to install nearcore currently. You can use Nearup or you can compile the source and use systemd to manage it.
45+
46+
### Option 1 - Use Nearup
47+
48+
- **Step 1.Install Nearup**
49+
50+
On the Server: The Prerequisite has python3, git and curl toolset, which have been installed in previous step. please run command prompt.
51+
4052
curl --proto '=https' --tlsv1.2 -sSfL https://raw.githubusercontent.com/near-guildnet/nearup/master/nearup | python3
41-
```
42-
Nearup automatically adds itself to PATH: **restart the terminal**, or issue the command: . ~/.profile. On each run, nearup self-updates to the latest version.
53+
Nearup automatically adds itself to PATH: restart the terminal, or issue the command: . ~/.profile. On each run, nearup self-updates to the latest version.
54+
55+
- **Step 2. Choose a staking-pool AccountId**
4356

44-
### Step 2. Choose a staking-pool AccountId
4557
On the first run, nearup will ask you to enter a staking-pool AccountId, please choose a name for your staking-pool AccountId, it must end with ".stake.guildnet", e.g. *MyStakingPool.stake.guildnet*.
4658

4759
You should go to [https://near-guildnet.github.io/staking-pool-factory](https://near-guildnet.github.io/staking-pool-factory/) to check if the name is available. Don't create your staking-pool contract yet, just check if the name is available.
4860

49-
### Step 3. Start nearup guildnet
61+
- **Step 3. Start nearup guildnet**
62+
5063
We recommand to use Officially Compiled Binary to launch a validator node, which is suitable to run on VPS. Then, input your staking pool ID in the prompt by this command:
5164
```bash
5265
nearup guildnet --nodocker
66+
67+
```
68+
69+
### Option 2 - Compile from source and Use Systemd
70+
71+
- **Step 1** Compile the code - Install The Service
72+
```
73+
wget https://raw.githubusercontent.com/crypto-guys/near-guildnet/main/nearcore/install/install.sh
74+
chmod +x install.sh
75+
sudo ./install.sh
76+
```
77+
- **Systemd Usage**
78+
79+
- Enabling the service on boot
80+
```
81+
sudo systemctl enable neard.service
82+
sudo systemctl disable neard.service
83+
```
84+
85+
- Start, Stop, Get Status
86+
```
87+
sudo systemctl start neard.service
88+
89+
sudo systemctl stop neard.service
90+
91+
sudo systemctl status neard.service
5392
```
93+
- Check the validators log.
94+
- **Please note:** By default logs go to the system journal
95+
- This is controlled by the file /usr/lib/systemd/journald.conf.d/neard.conf
96+
97+
To output logs to the specified file and append data uncomment this line from /usr/lib/systemd/neard.service
98+
```
99+
#StandardOutput=append:/var/log/guildnet.log
100+
```
101+
102+
- Check the logs
103+
```
104+
sudo journalctl -x -u neard
105+
```
106+
For more information on using journalctl use this command
107+
108+
```journalctl --help```
109+
110+
## Verify your install
54111

55112
Check validator_key.json is generated for staking pool.
56113
```bash
@@ -77,39 +134,35 @@ _Tip: You may request 75,000 faucet from Near team for staking test._
77134

78135
[GuildNet Faucet](https://near-guildnet.github.io/open-shards-faucet/)
79136

80-
#### Install Node Version 12.x and npm
137+
## Install Near-Cli
138+
*On your personal machine:*
139+
NEAR CLI is a Node.js application that relies on near-api-js to generate secure keys, connect to the NEAR platform and send transactions to the network on your behalf.
140+
_note that Node.js version 10+ is required to run NEAR CLI_
141+
142+
**Note: You don't need to install Near-Cli on the server. We reccomend to install near-cli on your personal machine or a separate machine for increased security and performance. However it still can be installed on the same machine.**
143+
144+
#### Install Node Version 15.x and npm
81145
Nodes.js and npm can be install by
82146
```bash
83-
sudo apt install nodejs
84-
sudo apt install npm
85-
sudo npm install -g n
86-
sudo n stable
147+
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
148+
sudo apt install build-essential nodejs
87149
PATH="$PATH"
88150
```
89151

90152
#### Check Node.js and npm version
91153
```bash
92154
node -v
93-
v12.18.3
155+
v14.X.X
94156
npm -v
95-
6.14.6
96-
```
97-
98-
##### Alternative
99-
If "n" is not working for you to upgrade node (node -v doesn't change) you can try [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) to manage node versions
100-
101-
## Install Near-Cli
102-
*On your personal machine:*
103-
NEAR CLI is a Node.js application that relies on near-api-js to generate secure keys, connect to the NEAR platform and send transactions to the network on your behalf.
104-
_note that Node.js version 10+ is required to run NEAR CLI_
105-
106-
**Note: You don't need to install Near-Cli on the server. We reccomend to install near-cli on your personal machine or a separate machine for increased security and performance. However it still can be installed on the same machine.**
157+
6.14.8
107158

159+
```
108160

109161
### Install the guild's near-cli
110162
```bash
111-
git clone https://github.com/near-guildnet/near-cli.git
112-
cd near-cli
163+
git clone https://github.com/crypto-guys/near-cli.git
164+
cd near-cli/
165+
npm install
113166
sudo npm install -g
114167
```
115168
## Setting up your environment

0 commit comments

Comments
 (0)