Evbogue.com


How to publish a Scuttlebot message

By Ev Bogue - July 15th 2016

I sold a copy of The Art of Being Minimalist yesterday, which got me thinking 'maybe I should write a blog post about minimalism today'. But then I realized if I knew more people on a distributed social network I'd probably be selling a lot more copies of The Art of Being Minimalist. Because of my counter-thought I've decided to keep focused on technology this July.

I do promise to update my list of Things before August though, as I've thrown out a few things and bought one button up shirt since returning to Mexico City. I probably have less things than I did when I last relocated.

Back to the tech!

Scuttlebot is a series of append-only cryptographic logs. Instead of a single Blockchain where the next block is written based on proof of work from miners, Scuttlebot has many sigchains written by individual people on the network. These sigchains are then networked using a gossip protocol based on who you follow, and who follows you.

The end result is what we've all been waiting for: the freedom of publishing on a distributed social network.

One of the amazing things about running your own social network on your computer is you can post directly to the social network from your command line.

Getting the command line client

To install the Scuttlebot command line client, you'll first need to install the latest version of Node.js and npm. Go ahead and do this for your computer.

You'll also need python 2.7 to build some of the dependencies, which is probably on your system already.

On Arch Linux, this is one command

% sudo pacman -Sy nodejs npm python2

Next install the stable version of Scuttlebot on your computer

% sudo npm install -g scuttlebot

You might get an error installing chloridedown, just ignore it -- you can use the JavaScript version of chloride.

Running Scuttlebot

Scuttlebot has a server that you need to run to create posts, receive posts, and view posts. Scuttlebot is appreviated to sbot on the command line for ease of typing

It'll look similar to this:

% sbot server
error loading sodium bindings: Cannot find module 'chloridedown/build/Release/sodium'
falling back to javascript version.
Loading plugins from /home/ev/.ssb/node_modules
Loading plugin "ssb-links"
Loading plugin "ssb-query"
Log level: notice
RELOAD INDEX: {"version":13,"since":1468552223038}
xCREAT &/6/ymzryEmxVNpsQIGbVYEJxC4Xo2pZIhvSGjPzV6J0=.sha256
CREAT &/6/ymzryEmxVNpsQIGbVYEJxC4Xo2pZIhvSGjPzV6J0=.sha256
RELOAD INDEX: {"version":5,"since":1468552223038}
LOAD LINKS SINCE null 1468552223038
.Connect attempt 45.55.213.91:8008:@9sCXwCJZJ9doPcx7oZ1gm7HNZapO2Z9iZ0FJHJdROio=.ed25519
Connect attempt 104.131.48.99:8008:@0gUdg/lz6UPavonq8KDmVUPyPxGrMhCFdBGy5h0SoG4=.ed25519
Connect attempt evbogue.com:8008:@9sCXwCJZJ9doPcx7oZ1gm7HNZapO2Z9iZ0FJHJdROio=.ed25519
Connect attempt 104.131.122.139:8008:@kZ9Ra80lKWlmzfjxh5PFAjJWYlCHEPxbqxNajdzhPF8=.ed25519
Connect attempt 176.58.117.63:8008:@J+0DGLgRn8H5tVLCcRUfN7NfUcTGEZKqML3krEOJjDY=.ed25519
Connect attempt 188.166.252.233:8008:@uRECWB4KIeKoNMis2UYWyB2aQPvWmS3OePQvBj2zClg=.ed25519

Except you have no contacts. Sadface. So your client won't connect to anyone right away.

To get a contact you will need an invite.

Open a new terminal, because you will need to keep sbot running to use this command, and paste the command below

sbot invite.accept 168.235.78.40:8008:@J2VKbbf69rK38vXIRLOCwaZdEm+0vzv/LMeaxmJks3k=.ed25519~+CtbmJAfD0PMUjiDtdZ3xVzzJgg73ISglJSWgldW8wY=

Above is an invite to my Scuttlebot pub. When you copy and paste it into your command line, you will follow my pub. All at once your local Scuttlebot instance should start gossiping with my pub and receiving all of the messages that I've published, as well as messages from my contacts up to three hops out from me. Wow!

The gossip protocol figures out how to get all of these messages down to your local machine, for offline social networking.

How to publish a message to your sigchain

If you pasted the invite code, then you've already published your first message to your log. Scuttlebot has also already generated a public/private keypair for you.

Congrats! You're a real identity on a real distributed social network.

For the final two steps, let's say hello and give you a name.

To publish a generic message to Scuttlebot from your command line type

% sbot publish --type post --text "Hello World!"

To give yourself a name on Scuttlebot, you publish a different type of message

First you'll need to get your ID

% sbot whoami

This will return a long hash, use it in the next command

% sbot publish --type about --about <your id goes here> --name 'yourname'

Make sure to paste your entire id hash after the '--about' part and be sure to get your name right.

To recap, we:

  1. Installed Node.js, npm, and Scuttlebot
  2. Invited ourselves to the Scuttlebot network
  3. Published a 'hello world!' message
  4. Gave ourselve a name

Next steps might include getting your messages back from Scuttlebot, or installing a robust Scuttlebot client to see what is going on in there.

Scuttlebot Lite Client on-boarding →

← How to get invited to Secure Scuttlebot

git

This is Decent: ?


about | blog | ssb | decent | ev@evbogue.com | gitmx