git ssb

2+

cel / scuttlebot.io



Tree: 254c89b83aef67583e5b1b6f6cd5fdba4fb0b493

Files: 254c89b83aef67583e5b1b6f6cd5fdba4fb0b493 / tmpl / docs / social / create-a-pub.html.js

4221 bytesRaw
1var page = require('../../page.part')
2var com = require('../../com.part')
3
4module.exports = () => page({
5 section: 'docs',
6 tab: 'docs-social',
7 path :'/docs/social/create-a-pub.html',
8 content: `
9 <h2>1. Get a public server</h2>
10 <p>
11 Pub servers need a static, publicly-reachable IP address.
12 The easiest way to get a public server is by renting a virtual server from businesses such as <a href="https://aws.amazon.com/">Amazon</a>, <a href="https://www.linode.com/">Linode</a>, or <a href="https://www.digitalocean.com/">Digital Ocean</a>.
13 </p>
14 <p>
15 After renting the server, follow the guides provided by your host to configure the software and install nodejs.
16 We recommend using a common Linux distribution, such as Ubuntu.
17 </p>
18
19 <h2>2. Install Scuttlebot</h2>
20 <p>
21 Install Scuttlebot using NPM.
22 </p>
23 ${ com.code({ bash: `npm install -g scuttlebot` }) }
24 <p>
25 To update scuttlebot in the future, simply run the global install again.
26 </p>
27
28 <h2>3. Create a run-sbot.sh script</h2>
29 <p>
30 Save the following script somewhere easy to find, such as <code>~/run-sbot.sh</code>.
31 This script will help ensure uptime, even if scuttlebot experiences a crash:
32 </p>
33 ${ com.code({ bash: `
34#!/bin/bash
35while true; do
36 sbot server --host {your-hostname}
37done
38 ` }) }
39 <p>
40 Be sure to replace <code>{your-hostname}</code> with the actual hostname of your server
41 For instance, if your server is <code>foobar.com</code>, then you should enter <code>sbot server --host foobar.com</code>.
42 </p>
43
44 <h2>4. Run the server script</h2>
45 <p>
46 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.
47 Start the session and run the script:
48 </p>
49 ${ com.code({ bash: `sh ~/run-sbot.sh` }) }
50 <p>
51 Then, detach the session.
52 </p>
53
54 <h2>5. Confirm Scuttlebot server is running</h2>
55 <p>
56 To check if sbot is running, use the following command:
57 </p>
58 ${ com.code({ bash: `sbot whoami` }) }
59 <p>
60 If all is well, your Pub&#39;s ID will be logged to the console.
61 If this fails, check that the server-script is still active, and isn&#39;t failing during startup.
62 </p>
63
64 <h2>6. Create the Pub&#39;s profile</h2>
65 <p>
66 It&#39;s a good idea to give your Pub a name, by publishing one on its feed.
67 To do this, first get the Pub&#39;s ID, with <code>sbot whoami</code>.
68 Then, publish a name with the following command:
69 </p>
70 ${ com.code({ bash: `sbot publish --type about --about {pub-id} --name {name}` }) }
71 <p>
72 It&#39;s a good idea to use your Pub&#39;s hostname.
73 Also, don&#39;t use spaces, or include the <code>@</code> symbol.
74 Here&#39;s an example usage (dont copy this!):
75 </p>
76 ${ com.code({ bash: `sbot publish --type about \\
77 --about "@2mIg4e/GO...GEHoQp3U=.ed25519" \\
78 --name "foobar.com"` }) }
79
80 <h2>7. Create invites</h2>
81 <p>
82 For a last step, you should create invite codes, which you can send to other users to let them join the pub.
83 The command to create an invite code is:
84 </p>
85 ${ com.code({ bash: `sbot invite.create 1` }) }
86 <p>
87 This may now be given out to friends, to command your pub to follow them.
88 If you want to let a single code be used more than once, you can provide a number larger than 1.
89 </p>
90
91 <h2>8. Backup your data directory (optional)</h2>
92 <p>
93 It&#39;s a good idea to regularly backup the Pub&#39;s data directory, in case of failures.
94 The data-directory will include the Pub&#39;s keypair, messages, and files.
95 It can be found at <code>~/.ssb</code>, where <code>~</code> points to the home directory of the user running Scuttlebot.
96 </p>
97
98 <p class="next"><a href="/docs/message-types/post.html">Message types: Post</a></p>
99 <ul class="see-also">
100 <li><a href="/modules/scuttlebot-invite.html">Scuttlebot.Invite API</a></li>
101 <li><a href="/docs/social/social-network.html">Social Network</a></li>
102 </ul>
103 `
104})

Built with git-ssb-web