Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some ambiguity around pub announcements #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions guides/pubs/announce-a-pub-server.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Announce a Pub Server

To announce a pub server, publish this `pub` message:
To announce a pub server, publish this `pub` message, replacing the parts in quotes with your pub server's values:

```bash
ssb-server publish --type pub --address.key {feedId} --address.host {string} --address.port {number}
ssb-server publish --type pub --address.key "@myPubId.ed25519" --address.host "awesomepub.mydomain.org" --address.port 8008
```

You can achieve the same from JavaScript like such:
```js
sbot.publish({ type: 'pub', address: { key: feedId, host: string, port: number } }, cb)
sbot.publish({ type: 'pub', address: { key: pubId, host: string, port: number } }, cb)
```

Scuttlebot, and any user that follows you, will add the pub to their peer list, and begin contacting it for syncing.
`ssb-server`, and any user that follows you, will add the pub to their peer list, and begin contacting it for syncing.

If you do this correctly, the newest message of your pub should look like this:

```terminal
$ ssb-server getLatest '@myPubId=.ed25519' | jq '.value.content'
{
"type": "pub",
"address": {
"key": "@myPubId.ed25519",
"host": "awesomepub.mydomain.org",
"port": 8008
}
```