Skip to content

Commit 7a44f93

Browse files
committed
fix(docs): add optional staking copy step, rename observer to node
1 parent ec6a138 commit 7a44f93

File tree

3 files changed

+269
-134
lines changed

3 files changed

+269
-134
lines changed

docs/run-node/2-from-source.mdx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,62 @@ Make sure to check the [hardware requirements](/run-node/system-requirements) be
114114
curl http://127.0.0.1:9650/ext/health | jq
115115
```
116116

117+
3. (Optional) If you plan to [register your node as a validator](/run-node/register-validator).
118+
Make sure to copy the staking keys to a persistent directory outside the default location.
119+
This is important for ensuring that your staking keys are not lost if the node is restarted or updated.
120+
121+
<Tabs groupId="network" block>
122+
123+
<TabItem value="flare" label="Flare Mainnet" default>
124+
125+
```bash
126+
# Create a dedicated directory
127+
sudo mkdir -p /opt/flare/staking
128+
# Move your keys
129+
sudo mv ~/.avalanchego/staking/staker.key /opt/flare/staking/
130+
sudo mv ~/.avalanchego/staking/staker.crt /opt/flare/staking/
131+
```
132+
133+
</TabItem>
134+
135+
<TabItem value="coston2" label="Flare Testnet Coston2">
136+
137+
```bash
138+
# Create a dedicated directory
139+
sudo mkdir -p /opt/coston2/staking
140+
# Move your keys
141+
sudo mv ~/.avalanchego/staking/staker.key /opt/coston2/staking/
142+
sudo mv ~/.avalanchego/staking/staker.crt /opt/coston2/staking/
143+
```
144+
145+
</TabItem>
146+
147+
<TabItem value="songbird" label="Songbird Canary-Network">
148+
149+
```bash
150+
# Create a dedicated directory
151+
sudo mkdir -p /opt/songbird/staking
152+
# Move your keys
153+
sudo mv ~/.avalanchego/staking/staker.key /opt/songbird/staking/
154+
sudo mv ~/.avalanchego/staking/staker.crt /opt/songbird/staking/
155+
```
156+
157+
</TabItem>
158+
159+
<TabItem value="coston" label="Songbird Testnet Coston">
160+
161+
```bash
162+
# Create a dedicated directory
163+
sudo mkdir -p /opt/coston/staking
164+
# Move your keys
165+
sudo mv ~/.avalanchego/staking/staker.key /opt/coston/staking/
166+
sudo mv ~/.avalanchego/staking/staker.crt /opt/coston/staking/
167+
```
168+
169+
</TabItem>
170+
171+
</Tabs>
172+
117173
:::tip[Node stuck when bootstrapping?]
118174

119175
If the node gets stuck during bootstrap (or it takes far longer than the estimates given above), try adding the parameter `--bootstrap-retry-enabled=false` when running the node.

docs/run-node/3-using-docker.mdx

Lines changed: 132 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ This guide will show examples of running the node using both Docker CLI and Dock
161161
<TabItem value="flare" label="Flare Mainnet" default>
162162

163163
```bash
164-
docker run -d --name flare-observer \
164+
docker run -d --name flare-node \
165165
-e NETWORK_ID="flare" \
166166
-e AUTOCONFIGURE_BOOTSTRAP="1" \
167167
-e AUTOCONFIGURE_PUBLIC_IP="1" \
@@ -177,15 +177,15 @@ This guide will show examples of running the node using both Docker CLI and Dock
177177

178178
```bash
179179
docker ps
180-
docker logs flare-observer -f
180+
docker logs flare-node -f
181181
```
182182

183183
</TabItem>
184184

185185
<TabItem value="coston2" label="Flare Testnet Coston2">
186186

187187
```bash
188-
docker run -d --name coston2-observer \
188+
docker run -d --name coston2-node \
189189
-e NETWORK_ID="costwo" \
190190
-e AUTOCONFIGURE_BOOTSTRAP="1" \
191191
-e AUTOCONFIGURE_PUBLIC_IP="1" \
@@ -201,15 +201,15 @@ This guide will show examples of running the node using both Docker CLI and Dock
201201

202202
```bash
203203
docker ps
204-
docker logs coston2-observer -f
204+
docker logs coston2-node -f
205205
```
206206

207207
</TabItem>
208208

209209
<TabItem value="songbird" label="Songbird Canary-Network">
210210

211211
```bash
212-
docker run -d --name songbird-observer \
212+
docker run -d --name songbird-node \
213213
-e NETWORK_ID="songbird" \
214214
-e AUTOCONFIGURE_BOOTSTRAP="1" \
215215
-e AUTOCONFIGURE_PUBLIC_IP="1" \
@@ -225,15 +225,15 @@ This guide will show examples of running the node using both Docker CLI and Dock
225225

226226
```bash
227227
docker ps
228-
docker logs songbird-observer -f
228+
docker logs songbird-node -f
229229
```
230230

231231
</TabItem>
232232

233233
<TabItem value="coston" label="Songbird Testnet Coston">
234234

235235
```bash
236-
docker run -d --name coston-observer \
236+
docker run -d --name coston-node \
237237
-e NETWORK_ID="coston" \
238238
-e AUTOCONFIGURE_BOOTSTRAP="1" \
239239
-e AUTOCONFIGURE_PUBLIC_IP="1" \
@@ -249,7 +249,7 @@ This guide will show examples of running the node using both Docker CLI and Dock
249249

250250
```bash
251251
docker ps
252-
docker logs coston-observer -f
252+
docker logs coston-node -f
253253
```
254254

255255
</TabItem>
@@ -263,6 +263,58 @@ This guide will show examples of running the node using both Docker CLI and Dock
263263
curl http://localhost:9650/ext/health | jq
264264
```
265265

266+
4. (Optional) If you plan to [register your node as a validator](/run-node/register-validator).
267+
Make sure to copy the staking keys to a persistent directory outside the default location.
268+
This is important for ensuring that your staking keys are not lost if the node is restarted or updated.
269+
270+
<Tabs groupId="network" block>
271+
272+
<TabItem value="flare" label="Flare Mainnet" default>
273+
274+
```bash
275+
# Create a dedicated directory
276+
sudo mkdir -p /opt/flare/staking
277+
# Move your keys
278+
docker cp flare-node:/root/.avalanchego/staking /opt/flare/staking
279+
```
280+
281+
</TabItem>
282+
283+
<TabItem value="coston2" label="Flare Testnet Coston2">
284+
285+
```bash
286+
# Create a dedicated directory
287+
sudo mkdir -p /opt/coston2/staking
288+
# Move your keys
289+
docker cp coston2-node:/root/.avalanchego/staking /opt/coston2/staking
290+
```
291+
292+
</TabItem>
293+
294+
<TabItem value="songbird" label="Songbird Canary-Network">
295+
296+
```bash
297+
# Create a dedicated directory
298+
sudo mkdir -p /opt/songbird/staking
299+
# Move your keys
300+
docker cp songbird-node:/root/.avalanchego/staking /opt/songbird/staking
301+
```
302+
303+
</TabItem>
304+
305+
<TabItem value="coston" label="Songbird Testnet Coston">
306+
307+
```bash
308+
# Create a dedicated directory
309+
sudo mkdir -p /opt/coston/staking
310+
# Move your keys
311+
docker cp coston-node:/root/.avalanchego/staking /opt/coston/staking
312+
```
313+
314+
</TabItem>
315+
316+
</Tabs>
317+
266318
<details>
267319
<summary>Explanation of the CLI arguments.</summary>
268320

@@ -329,13 +381,13 @@ This guide will show examples of running the node using both Docker CLI and Dock
329381

330382
Docker Compose for this use case is a good way to simplify your setup of running the RPC node. Adding all necessary configurations into a single file that can be run with a simple command.
331383

332-
In this guide the `docker-compose.yaml` file is created in `/opt/observer` but the location is entirely up to you.
384+
In this guide the `docker-compose.yaml` file is created in `/opt/node` but the location is entirely up to you.
333385

334386
1. Create the working directory and set the ownership.
335387

336388
```bash
337-
sudo mkdir /opt/observer
338-
sudo chown -R <user>:<group> /opt/observer
389+
sudo mkdir /opt/node
390+
sudo chown -R <user>:<group> /opt/node
339391
```
340392

341393
2. Create the `docker-compose.yaml` file:
@@ -344,10 +396,10 @@ In this guide the `docker-compose.yaml` file is created in `/opt/observer` but t
344396

345397
<TabItem value="flare" label="Flare Mainnet" default>
346398

347-
```yaml title="/opt/observer/docker-compose.yaml"
399+
```yaml title="/opt/node/docker-compose.yaml"
348400
services:
349-
observer:
350-
container_name: flare-observer
401+
node:
402+
container_name: flare-node
351403
# 1. Find the latest stable release tag from:
352404
# https://hub.docker.com/r/flarefoundation/go-flare/tags
353405
# 2. Set the tag name in the variable below (only use versioned tags):
@@ -371,10 +423,10 @@ In this guide the `docker-compose.yaml` file is created in `/opt/observer` but t
371423
372424
<TabItem value="coston2" label="Flare Testnet Coston2">
373425
374-
```yaml title="/opt/observer/docker-compose.yaml"
426+
```yaml title="/opt/node/docker-compose.yaml"
375427
services:
376-
observer:
377-
container_name: coston2-observer
428+
node:
429+
container_name: coston2-node
378430
# 1. Find the latest stable release tag from:
379431
# https://hub.docker.com/r/flarefoundation/go-flare/tags
380432
# 2. Set the tag name in the variable below (only use versioned tags):
@@ -398,10 +450,10 @@ In this guide the `docker-compose.yaml` file is created in `/opt/observer` but t
398450
399451
<TabItem value="songbird" label="Songbird Canary-Network">
400452
401-
```yaml title="/opt/observer/docker-compose.yaml"
453+
```yaml title="/opt/node/docker-compose.yaml"
402454
services:
403-
observer:
404-
container_name: songbird-observer
455+
node:
456+
container_name: songbird-node
405457
# 1. Find the latest stable release tag from:
406458
# https://hub.docker.com/r/flarefoundation/go-flare/tags
407459
# 2. Set the tag name in the variable below (only use versioned tags):
@@ -425,10 +477,10 @@ In this guide the `docker-compose.yaml` file is created in `/opt/observer` but t
425477
426478
<TabItem value="coston" label="Songbird Testnet Coston">
427479
428-
```yaml title="/opt/observer/docker-compose.yaml"
480+
```yaml title="/opt/node/docker-compose.yaml"
429481
services:
430-
observer:
431-
container_name: coston-observer
482+
node:
483+
container_name: coston-node
432484
# 1. Find the latest stable release tag from:
433485
# https://hub.docker.com/r/flarefoundation/go-flare/tags
434486
# 2. Set the tag name in the variable below (only use versioned tags):
@@ -455,7 +507,7 @@ In this guide the `docker-compose.yaml` file is created in `/opt/observer` but t
455507
3. Run Docker Compose:
456508
457509
```bash
458-
docker compose -f /opt/observer/docker-compose.yaml up -d
510+
docker compose -f /opt/node/docker-compose.yaml up -d
459511
```
460512

461513
4. When the command completes, check the container is running and inspect that logs are being generated:
@@ -472,6 +524,58 @@ In this guide the `docker-compose.yaml` file is created in `/opt/observer` but t
472524
curl http://localhost:9650/ext/health | jq
473525
```
474526

527+
6. (Optional) If you plan to [register your node as a validator](/run-node/register-validator).
528+
Make sure to copy the staking keys to a persistent directory outside the default location.
529+
This is important for ensuring that your staking keys are not lost if the node is restarted or updated.
530+
531+
<Tabs groupId="network" block>
532+
533+
<TabItem value="flare" label="Flare Mainnet" default>
534+
535+
```bash
536+
# Create a dedicated directory
537+
sudo mkdir -p /opt/flare/staking
538+
# Move your keys
539+
docker compose cp flare-node:/root/.avalanchego/staking /opt/flare/staking
540+
```
541+
542+
</TabItem>
543+
544+
<TabItem value="coston2" label="Flare Testnet Coston2">
545+
546+
```bash
547+
# Create a dedicated directory
548+
sudo mkdir -p /opt/coston2/staking
549+
# Move your keys
550+
docker compose cp coston2-node:/root/.avalanchego/staking /opt/coston2/staking
551+
```
552+
553+
</TabItem>
554+
555+
<TabItem value="songbird" label="Songbird Canary-Network">
556+
557+
```bash
558+
# Create a dedicated directory
559+
sudo mkdir -p /opt/songbird/staking
560+
# Move your keys
561+
docker compose cp songbird-node:/root/.avalanchego/staking /opt/songbird/staking
562+
```
563+
564+
</TabItem>
565+
566+
<TabItem value="coston" label="Songbird Testnet Coston">
567+
568+
```bash
569+
# Create a dedicated directory
570+
sudo mkdir -p /opt/coston/staking
571+
# Move your keys
572+
docker compose cp coston-node:/root/.avalanchego/staking /opt/coston/staking
573+
```
574+
575+
</TabItem>
576+
577+
</Tabs>
578+
475579
### Additional configuration
476580

477581
There are several environment variables to adjust your workload at runtime.
@@ -510,7 +614,7 @@ To update your node to a newer go-flare version:
510614
2. Stop and remove the old container:
511615

512616
```bash
513-
docker stop <your_container_name> # e.g., flare-observer
617+
docker stop <your_container_name> # e.g., flare-node
514618
docker rm <your_container_name>
515619
```
516620

@@ -525,15 +629,15 @@ To update your node to a newer go-flare version:
525629
2. Stop the old container:
526630

527631
```bash
528-
docker compose -f /opt/observer/docker-compose.yaml down
632+
docker compose -f /opt/node/docker-compose.yaml down
529633
```
530634

531635
3. Update the `docker-compose.yaml` file with the new tag and start the new container:
532636

533637
```bash
534638
LATEST_TAG="vX.Y.Z" # <-- Replace with the actual latest tag e.g v1.10.0
535-
yq -i ".services.observer.image = flarefoundation/go-flare:${LATEST_TAG}" /opt/observer/docker-compose.yaml
536-
docker compose -f /opt/observer/docker-compose.yaml up -d
639+
yq -i ".services.node.image = flarefoundation/go-flare:${LATEST_TAG}" /opt/node/docker-compose.yaml
640+
docker compose -f /opt/node/docker-compose.yaml up -d
537641
```
538642

539643
</TabItem>

0 commit comments

Comments
 (0)