+29
-11
README.md
+29
-11
README.md
···
22
22
23
23
How to Install `ssb-server` and create a working pub
24
24
25
-
1. `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash`
25
+
1. `sudo apt install curl autotools-dev automake`
26
26
27
-
2. `npm install -g node-gyp`
27
+
2. Install the Node Version Manager (NVM):
28
28
29
-
3. `apt-get install autotools-dev automake`
29
+
```
30
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
31
+
```
32
+
33
+
3. Close and reopen your terminal to start using nvm or run the following:
34
+
35
+
```
36
+
export NVM_DIR="$HOME/.nvm"
37
+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
38
+
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
39
+
```
30
40
31
41
4. `nvm install 10`
32
42
33
43
5. `nvm alias default 10`
34
44
35
-
6. Then to add `ssb-server` to your available CLI commands, install it using the `-g` global flag:
45
+
6. `npm install -g node-gyp`
46
+
47
+
7. Then to add `ssb-server` to your available CLI commands, install it using the `-g` global flag:
48
+
36
49
```
37
50
npm install -g ssb-server
38
51
```
39
-
7. `nano ~/run-server.sh` and input:
52
+
53
+
If you are running as the root user this command will fail. Ideally you would run ssb-server as a non-priviledged user, but if you have to run it as root you can do so with `npm install -g ssb-server --unsafe-perm`.
54
+
55
+
8. `nano ~/run-server.sh` and input:
40
56
41
57
```
42
58
#!/bin/bash
···
46
62
done
47
63
```
48
64
65
+
Input Ctrl-X to save and quit.
66
+
49
67
Be sure to start the pub server from this script (as shown in step 10), as this script will run the pub server and restart it even if it crashes.
50
68
51
-
8. `mkdir ~/.ssb/`
69
+
9. `mkdir ~/.ssb/`
52
70
53
-
9. `nano ~/.ssb/config` and input:
71
+
10. `nano ~/.ssb/config` and input:
54
72
55
73
```
56
74
{
···
67
85
}
68
86
```
69
87
70
-
10. Now run `sh ~/run-server.sh` in a detachable session (e.g. screens)
88
+
11. Now run `sh ~/run-server.sh` in a detachable session (e.g. screens)
71
89
72
-
11. Detach the session and run `ssb-server whoami` to check to see if the server is working.
90
+
12. Detach the session and run `ssb-server whoami` to check to see if the server is working.
73
91
74
-
12. Now is the time to think of a really cool name for your new pub server. Once you have it run:
92
+
13. Now is the time to think of a really cool name for your new pub server. Once you have it run:
75
93
76
94
`ssb-server publish --type about --about {pub-id (this is the output from ssb-server whoami)} --name {Your pubs awesome name}`
77
95
78
-
12. Now it's time to create those invites!
96
+
14. Now it's time to create those invites!
79
97
Just run `ssb-server invite.create 1` and send those codes to your friends.
80
98
81
99
Congratulations! You are now ready to scuttlebutt with your friends!