Skip to content
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
}
```