Commit 45711f7e951055faa40829bc23bb3c396e6067a1
Merge branch 'ssb-server'
cel committed on 4/21/2019, 12:44:05 AMParent: 69c5ed428a0c5ac7ea980ad8220130d5ddcd024f
Parent: 804cc11aa68f312b4037911ddbc45a3526fde434
Files changed
tmpl/apis/modules/secret-stack.md | ||
---|---|---|
@@ -4,9 +4,9 @@ | ||
4 | 4 … | |
5 | 5 … | SecretStack is built on [secret-handshake](https://github.com/dominictarr/secret-handshake) |
6 | 6 … | and [muxrpc](https://github.com/ssbc/muxrpc). This provides a framework |
7 | 7 … | to make building secure, decentralized systems easier. |
8 | -(such as [scuttlebot](https://github.com/ssbc/scuttlebot) which this was refactored out of ;) | |
8 … | +(such as [scuttlebot](https://github.com/ssbc/ssb-server) which this was refactored out of ;) | |
9 | 9 … | |
10 | 10 … | ## Example |
11 | 11 … | |
12 | 12 … | ``` js |
tmpl/apis/modules/ssb-config.md | ||
---|---|---|
@@ -1,7 +1,7 @@ | ||
1 | 1 … | # ssb-config |
2 | 2 … | |
3 | -Configuration module used by [`scuttlebot`](https://github.com/ssbc/scuttlebot). | |
3 … | +Configuration module used by [`ssb-server`](https://github.com/ssbc/ssb-server). | |
4 | 4 … | |
5 | 5 … | ## example |
6 | 6 … | |
7 | 7 … | ``` js |
@@ -24,9 +24,9 @@ | ||
24 | 24 … | * `friends.dunbar` *(number)* [`Dunbar's number`](https://en.wikipedia.org/wiki/Dunbar%27s_number). Number of nodes your instance will replicate. Defaults to `150`. |
25 | 25 … | * `friends.hops` *(number)* How many friend of friend hops to replicate. Defaults to `3`. |
26 | 26 … | * `gossip.connections` *(number)* How many other nodes to connect with at one time. Defaults to `2`. |
27 | 27 … | * `path` *(string)* Path to the application data folder, which contains the private key, message attachment data (blobs) and the leveldb backend. Defaults to `$HOME/.ssb`. |
28 | -* `master` *(array)* Pubkeys of users who, if they connect to the Scuttlebot instance, are allowed to command the primary user with full rights. Useful for remotely operating a pub. Defaults to `[]`. | |
28 … | +* `master` *(array)* Pubkeys of users who, if they connect to the server instance, are allowed to command the primary user with full rights. Useful for remotely operating a pub. Defaults to `[]`. | |
29 | 29 … | * `logging.level` *(string)* How verbose should the logging be. Possible values are error, warning, notice, and info. Defaults to `notice`. |
30 | 30 … | |
31 | 31 … | There are some configuration options for the sysadmins out there. All configuration is loaded via [`rc`](https://github.com/dominictarr/rc). You can pass any configuration value in as cli arg, env var, or in a file. |
32 | 32 … |
tmpl/apis/modules/ssb-feed.md | ||
---|---|---|
@@ -27,8 +27,8 @@ | ||
27 | 27 … | console.log(feed.keys) |
28 | 28 … | }) |
29 | 29 … | ``` |
30 | 30 … | |
31 | -This example uses `ssb-client`, but, if you're embedding `scuttlebot` or the `secure-scuttlebutt` library into your process, you can use them locally. | |
31 … | +This example uses `ssb-client`, but, if you're embedding `ssb-server` or the `secure-scuttlebutt` library into your process, you can use them locally. | |
32 | 32 … | |
33 | 33 … | [View on Github](https://github.com/ssbc/ssb-feed) |
34 | 34 … |
tmpl/apis/modules/ssb-party.md | ||
---|---|---|
@@ -19,9 +19,9 @@ | ||
19 | 19 … | overrides, but if the server is already running, these will not affect the existing server's config. |
20 | 20 … | |
21 | 21 … | ### Example |
22 | 22 … | |
23 | -simplest case: connect to or start a local sbot: | |
23 … | +simplest case: connect to or start a local ssb-server: | |
24 | 24 … | ``` |
25 | 25 … | var party = require('ssb-party') |
26 | 26 … | |
27 | 27 … | party(function (err, sbot) { |
@@ -34,9 +34,9 @@ | ||
34 | 34 … | - `config.timers.keepalive`: minimum time (ms) to keep the server online after the last client disconnects. default: 30s |
35 | 35 … | - `config.party.out`: where to put standard output of sbot. may be a path (absolute, or relative to ssb's directory), or `false` to discard, or `true` to pass through to the controlling terminal. default: `"debug.log"` |
36 | 36 … | - `config.party.err`: where to put standard error of sbot. default: same as `config.party.out` |
37 | 37 … | |
38 | -[scuttlebot]: https://github.com/ssbc/scuttlebot | |
38 … | +[scuttlebot]: https://github.com/ssbc/ssb-server | |
39 | 39 … | [ssb-keys]: https://github.com/ssbc/ssb-keys |
40 | 40 … | [ssb-config]: https://github.com/ssbc/ssb-config |
41 | 41 … | [secret-stack]: https://github.com/ssbc/secret-stack |
42 | 42 … |
tmpl/apis/scuttlebot/invite.md | |||
---|---|---|---|
@@ -7,13 +7,13 @@ | |||
7 | 7 … | ||
8 | 8 … | Create a new invite code. | |
9 | 9 … | ||
10 | 10 … | ```bash | |
11 | -create {n} | ||
11 … | +sbot create {n} | ||
12 | 12 … | ``` | |
13 | 13 … | ||
14 | 14 … | ```js | |
15 | -create(n, cb) | ||
15 … | +sbot.create(n, cb) | ||
16 | 16 … | ``` | |
17 | 17 … | ||
18 | 18 … | This produces an invite-code which encodes the sbot server's address, and a keypair seed. | |
19 | 19 … | The keypair seed is used to generate a keypair, which is then used to authenticate a connection with the sbot server. | |
@@ -27,13 +27,13 @@ | |||
27 | 27 … | ||
28 | 28 … | Use an invite code. | |
29 | 29 … | ||
30 | 30 … | ```bash | |
31 | -accept {invitecode} | ||
31 … | +sbot accept {invitecode} | ||
32 | 32 … | ``` | |
33 | 33 … | ||
34 | 34 … | ```js | |
35 | -accept(invitecode, cb) | ||
35 … | +sbot.accept(invitecode, cb) | ||
36 | 36 … | ``` | |
37 | 37 … | ||
38 | 38 … | This connects to the server address encoded in the invite-code, then calls `use()` on the server. | |
39 | 39 … | It will cause the server to follow the local user. | |
@@ -45,13 +45,13 @@ | |||
45 | 45 … | ||
46 | 46 … | Use an invite code created by this sbot instance (advanced function). | |
47 | 47 … | ||
48 | 48 … | ```bash | |
49 | -use --feed {feedid} | ||
49 … | +sbot use --feed {feedid} | ||
50 | 50 … | ``` | |
51 | 51 … | ||
52 | 52 … | ```js | |
53 | -use({ feed: }, cb) | ||
53 … | +sbot.use({ feed: }, cb) | ||
54 | 54 … | ``` | |
55 | 55 … | ||
56 | 56 … | This commands the receiving server to follow the given feed. | |
57 | 57 … |
tmpl/docs/basics/install-the-database.html.js | ||
---|---|---|
@@ -10,15 +10,15 @@ | ||
10 | 10 … | |
11 | 11 … | // put content in a separate function so that index.html can reuse it |
12 | 12 … | module.exports.content = () => ` |
13 | 13 … | <h2>Install the database</h2> |
14 | - ${ com.code({ bash: `npm install -g scuttlebot` }) } | |
14 … | + ${ com.code({ bash: `npm install -g ssb-server` }) } | |
15 | 15 … | <p> |
16 | 16 … | Install the database to your device, not to a host. |
17 | 17 … | Each user runs their own Scuttlebot. |
18 | 18 … | </p> |
19 | 19 … | <h2>Start the server</h2> |
20 | - ${ com.code({ bash: `sbot server` }) } | |
20 … | + ${ com.code({ bash: `ssb-server start` }) } | |
21 | 21 … | <blockquote> |
22 | 22 … | Scuttlebot server must be running for any of its other commands, or apps, to work. |
23 | 23 … | </blockquote> |
24 | 24 … | <h2>Next:</h2> |
tmpl/docs/basics/open-a-client.md | ||
---|---|---|
@@ -1,7 +1,7 @@ | ||
1 | 1 … | ## Open an API client |
2 | 2 … | |
3 | -If youre using Scuttlebot from a JS application, you will need to open a client connection. | |
3 … | +If you're using Scuttlebot from a JS application, you will need to open a client connection. | |
4 | 4 … | |
5 | 5 … | > If you're using the command-line, you can <a href="./publish-a-message.html">skip this step.</a> |
6 | 6 … | |
7 | 7 … | ```js |
tmpl/docs/config/configure-scuttlebot.md | ||
---|---|---|
@@ -24,13 +24,13 @@ | ||
24 | 24 … | } |
25 | 25 … | } |
26 | 26 … | ``` |
27 | 27 … | |
28 | -You can also specify config flags in the `sbot server` call. | |
28 … | +You can also specify config flags in the `ssb-server start` call. | |
29 | 29 … | For example: |
30 | 30 … | |
31 | 31 … | ```bash |
32 | -sbot server --port 1234 --timeout 500 | |
32 … | +ssb-server start --port 1234 --timeout 500 | |
33 | 33 … | ``` |
34 | 34 … | |
35 | 35 … | The options: |
36 | 36 … | |
@@ -42,5 +42,7 @@ | ||
42 | 42 … | - `friends.dunbar` *(number)* [`Dunbar's number`](https://en.wikipedia.org/wiki/Dunbar%27s_number). Number of nodes your instance will replicate. Defaults to `150`. |
43 | 43 … | - `friends.hops` *(number)* How many friend of friend hops to replicate. Defaults to `3`. |
44 | 44 … | - `gossip.connections` *(number)* How many other nodes to connect with at one time. Defaults to `2`. |
45 | 45 … | * `master` *(array)* Pubkeys of users who, if they connect to the Scuttlebot instance, are allowed to command the primary user with full rights. Useful for remotely operating a pub. Defaults to `[]`. |
46 | -* `logging.level` *(string)* How verbose should the logging be. Possible values are error, warning, notice, and info. Defaults to `notice`. | |
46 … | +* `logging.level` *(string)* How verbose should the logging be. Possible values are error, warning, notice, and info. Defaults to `notice`. | |
47 … | + | |
48 … | +See [ssb-config](https://github.com/ssbc/ssb-config) for more info about the config. |
tmpl/docs/config/create-a-pub.html.js | ||
---|---|---|
@@ -20,50 +20,80 @@ | ||
20 | 20 … | <h2>2. Install Scuttlebot</h2> |
21 | 21 … | <p> |
22 | 22 … | Install Scuttlebot using NPM. |
23 | 23 … | </p> |
24 | - ${ com.code({ bash: `npm install -g scuttlebot` }) } | |
24 … | + ${ com.code({ bash: `npm install -g ssb-server` }) } | |
25 | 25 … | <p> |
26 | 26 … | To update scuttlebot in the future, simply run the global install again. |
27 | 27 … | </p> |
28 | 28 … | |
29 | - <h2>3. Create a run-sbot.sh script</h2> | |
29 … | + <h2>3. Configure Scuttlebot</h2> | |
30 … | + ${ com.code({ bash: ` | |
31 … | +EXTERNAL=<hostname.yourdomain.tld> | |
32 … | + | |
33 … | +mkdir -p ~/.ssb | |
34 … | +cat > ~/.ssb/config <<EOF | |
35 … | +{ | |
36 … | + "connections": { | |
37 … | + "incoming": { | |
38 … | + "net": [ | |
39 … | + { | |
40 … | + "scope": "public", | |
41 … | + "host": "0.0.0.0", | |
42 … | + "external": ["$EXTERNAL"], | |
43 … | + "transform": "shs", | |
44 … | + "port": 8008 | |
45 … | + } | |
46 … | + ] | |
47 … | + }, | |
48 … | + "outgoing": { | |
49 … | + "net": [ | |
50 … | + { | |
51 … | + "transform": "shs" | |
52 … | + } | |
53 … | + ] | |
54 … | + } | |
55 … | + } | |
56 … | +} | |
57 … | + ` }) } | |
58 … | + | |
59 … | + <h2>4. Create a run-sbotserver.sh script</h2> | |
30 | 60 … | <p> |
31 | - Save the following script somewhere easy to find, such as <code>~/run-sbot.sh</code>. | |
61 … | + Save the following script somewhere easy to find, such as <code>~/run-sbotserver.sh</code>. | |
32 | 62 … | This script will help ensure uptime, even if scuttlebot experiences a crash: |
33 | 63 … | </p> |
34 | 64 … | ${ com.code({ bash: ` |
35 | 65 … | #!/bin/bash |
36 | 66 … | while true; do |
37 | - sbot server --host {your-hostname} | |
67 … | + ssb-server start --host {your-hostname} | |
38 | 68 … | done |
39 | 69 … | ` }) } |
40 | 70 … | <p> |
41 | 71 … | Be sure to replace <code>{your-hostname}</code> with the actual hostname of your server |
42 | - For instance, if your server is <code>foobar.com</code>, then you should enter <code>sbot server --host foobar.com</code>. | |
72 … | + For instance, if your server is <code>foobar.com</code>, then you should enter <code>ssb-server start --host foobar.com</code>. | |
43 | 73 … | </p> |
44 | 74 … | |
45 | - <h2>4. Run the server script</h2> | |
75 … | + <h2>5. Run the server script</h2> | |
46 | 76 … | <p> |
47 | 77 … | Use a session-manager such as <a href="https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/">screen</a> or <a href="https://wiki.archlinux.org/index.php/Tmux">tmux</a> to create a detachable session. |
48 | 78 … | Start the session and run the script: |
49 | 79 … | </p> |
50 | - ${ com.code({ bash: `sh ~/run-sbot.sh` }) } | |
80 … | + ${ com.code({ bash: `sh ~/run-sbotserver.sh` }) } | |
51 | 81 … | <p> |
52 | 82 … | Then, detach the session. |
53 | 83 … | </p> |
54 | 84 … | |
55 | - <h2>5. Confirm Scuttlebot server is running</h2> | |
85 … | + <h2>6. Confirm Scuttlebot server is running</h2> | |
56 | 86 … | <p> |
57 | - To check if sbot is running, use the following command: | |
87 … | + To check if the server is running, use the following command: | |
58 | 88 … | </p> |
59 | 89 … | ${ com.code({ bash: `sbot whoami` }) } |
60 | 90 … | <p> |
61 | 91 … | If all is well, your Pub's ID will be logged to the console. |
62 | 92 … | If this fails, check that the server-script is still active, and isn't failing during startup. |
63 | 93 … | </p> |
64 | 94 … | |
65 | - <h2>6. Create the Pub's profile</h2> | |
95 … | + <h2>7. Create the Pub's profile</h2> | |
66 | 96 … | <p> |
67 | 97 … | It's a good idea to give your Pub a name, by publishing one on its feed. |
68 | 98 … | To do this, first get the Pub's ID, with <code>sbot whoami</code>. |
69 | 99 … | Then, publish a name with the following command: |
@@ -77,9 +107,9 @@ | ||
77 | 107 … | ${ com.code({ bash: `sbot publish --type about \\ |
78 | 108 … | --about "@2mIg4e/GO...GEHoQp3U=.ed25519" \\ |
79 | 109 … | --name "foobar.com"` }) } |
80 | 110 … | |
81 | - <h2>7. Create invites</h2> | |
111 … | + <h2>8. Create invites</h2> | |
82 | 112 … | <p> |
83 | 113 … | For a last step, you should create invite codes, which you can send to other users to let them join the pub. |
84 | 114 … | The command to create an invite code is: |
85 | 115 … | </p> |
@@ -88,9 +118,9 @@ | ||
88 | 118 … | This may now be given out to friends, to command your pub to follow them. |
89 | 119 … | If you want to let a single code be used more than once, you can provide a number larger than 1. |
90 | 120 … | </p> |
91 | 121 … | |
92 | - <h2>8. Backup your data directory (optional)</h2> | |
122 … | + <h2>9. Backup your data directory (optional)</h2> | |
93 | 123 … | <p> |
94 | 124 … | It's a good idea to regularly backup the Pub's data directory, in case of failures. |
95 | 125 … | The data-directory will include the Pub's keypair, messages, and files. |
96 | 126 … | It can be found at <code>~/.ssb</code>, where <code>~</code> points to the home directory of the user running Scuttlebot. |
tmpl/docs/config/creating-test-databases.md | ||
---|---|---|
@@ -5,8 +5,8 @@ | ||
5 | 5 … | To create databases for testing, you can specify a different data-directory using the `ssb_appname` environment variable. |
6 | 6 … | For instance: |
7 | 7 … | |
8 | 8 … | ```bash |
9 | -ssb_appname=test sbot server | |
9 … | +ssb_appname=test ssb-server start | |
10 | 10 … | ``` |
11 | 11 … | |
12 | 12 … | This will spawn the server with the `~/.test` data-directory. |
tmpl/footer.part.js | ||
---|---|---|
@@ -9,7 +9,7 @@ | ||
9 | 9 … | <ul class="footer-section"> |
10 | 10 … | <li>Community</li> |
11 | 11 … | <li><p>#scuttlebutt on freenode</p></li> |
12 | 12 … | <li><a href="https://github.com/ssbc">GitHub Org</a></li> |
13 | - <li><a href="https://github.com/ssbc/scuttlebot">GitHub Repo</a></li> | |
13 … | + <li><a href="https://github.com/ssbc/ssb-server">GitHub Repo</a></li> | |
14 | 14 … | </ul> |
15 | 15 … | </div>` |
Built with git-ssb-web