Skip to content

Commit c5d747e

Browse files
CryptoTotalWarCMCDragonkai
authored andcommitted
feat(tutorials): added bootstrapping, managing secrets, and managing vaults tutorials
1 parent b51fdf3 commit c5d747e

File tree

3 files changed

+614
-1
lines changed

3 files changed

+614
-1
lines changed
Lines changed: 126 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,127 @@
1-
# Bootstrap Keypair
1+
# Bootstrapping
22

3+
## Introduction
4+
5+
Bootstrapping is the process where the Polykey agent sets itself up as a new Polykey node. This involves creating the encrypted-at-rest node state, and connecting to the [mainnet](https://mainnet.polykey.com/) or a custom specified network domain.
6+
7+
## Setting Up Your Node
8+
9+
### Creating the Root Key
10+
11+
When you first start the Polykey agent, it automatically generates a random root key.
12+
13+
This root key is an asymmetric key pair consisting of a public key representing your identity and used for verifying signatures, and a private key which is used for signing.
14+
15+
Afterwards, encryption keys are derived from this root key, which is used for encryption and decryption of all node state and secret data managed by Polykey.
16+
17+
You will be prompted to provide a root password. This password encrypts the root key.
18+
19+
:::note
20+
Remember to keep your password in a secure location as you will need it each time you start the Polykey agent.
21+
:::
22+
23+
### Starting the Polykey Agent
24+
25+
You can start the Polykey agent in the foreground of your terminal by running:
26+
27+
```bash
28+
polykey agent start --verbose
29+
```
30+
31+
Running the agent in the foreground allows you to monitor its output directly in the terminal. Ensure this terminal session remains active to keep the agent running. You can execute Polykey commands from any other terminal session while this runs.
32+
33+
### Starting Polykey in the Background
34+
35+
Alternatively, in the demo video and other scenarios where you do not wish to occupy your terminal, you can start the agent in the background:
36+
37+
```bash
38+
polykey agent start --verbose --background
39+
```
40+
41+
### Stopping the Polykey Agent
42+
43+
You can stop the Polykey agent by pressing **Control+C** in the terminal where it's running in the foreground, or by running:
44+
45+
```bash
46+
polykey agent stop
47+
```
48+
49+
#### Troubleshooting
50+
51+
If the Polykey agent does not terminate properly, you can force quit the process through the Activity Monitor on your machine. If you encounter this or any other issue, please consider making a [bug report](https://github.com/MatrixAI/Polykey-CLI/issues/new/choose) to help improve Polykey.
52+
53+
## Check Agent Status
54+
55+
To check the status of your Polykey node, use the following command:
56+
57+
```bash
58+
polykey agent status
59+
```
60+
61+
This command provides detailed information about your node's current state, including its connectivity and activity within the network.
62+
63+
### Example Output
64+
65+
```bash
66+
status LIVE
67+
pid 96992
68+
nodeId vgijtpv0h8m1eajeir77g73muq88n5kj0413t6fjdqsv9kt8dq4pg
69+
clientHost ::1
70+
clientPort 54975
71+
agentHost ::
72+
agentPort 60358
73+
upTime 8
74+
startTime 1716509093
75+
connectionsActive 3
76+
nodesTotal 11
77+
version 1.2.3-alpha.4-1-1
78+
sourceVersion 1.2.3-alpha.4
79+
stateVersion 1
80+
networkVersion 1
81+
```
82+
83+
## Check Network Status
84+
85+
When your agent has started, it should show as a node on the network. By default the network is [mainnet](https://mainnet.polykey.com/). Check out the network dashboard to see your placement on the world map.
86+
87+
## Monitoring Network Connections
88+
89+
To view the nodes currently connected to the network, including the seed nodes, run:
90+
91+
```bash
92+
polykey nodes connections
93+
```
94+
95+
This will list all active connections, including details about each node.
96+
97+
### Example Output
98+
99+
```bash
100+
host hostname nodeIdEncoded port timeout usageCount
101+
3.145.86.40 N/A v6p14qcvvftnnscuavsehu37t22vfvnhse054pbkb3ehemmjsrdh0 1314 46873 0
102+
13.239.117.143 N/A vncm2mkk41vgp2fmplqiu1je7b2l3v6fhgltlqf5f3f85923ve0j0 1314 116186 0
103+
1.145.55.96 N/A vg6gldhfdstju8frtbguav2p2svmev85dvpdb34gffmiagpgjf2pg 1200 102086 0
104+
```
105+
106+
## Checking Node Activity
107+
108+
To determine if a specific node is active, use the ping command:
109+
110+
```bash
111+
polykey nodes ping <nodeID>
112+
```
113+
114+
This will tell you whether the node is active within the network.
115+
116+
### Example Output
117+
118+
```bash
119+
polykey nodes ping v6p14qcvvftnnscuavsehu37t22vfvnhse054pbkb3ehemmjsrdh0
120+
Node is Active
121+
```
122+
123+
## Conclusion
124+
125+
Bootstrapping your node is the first step to using Polykey effectively. It prepares your node for managing and sharing secrets securely within the network. By following these guidelines, you ensure that your node is well-configured, secure, and ready for advanced operations in the Polykey ecosystem.
126+
127+
Stay tuned for upcoming sections where we will discuss managing multiple nodes, assigning different file paths to each node, and other advanced configurations.

0 commit comments

Comments
 (0)