| Title: Join the peer to peer social network Scuttlebutt using OpenBSD | |
| and Oasis | |
| Author: Solène | |
| Date: 04 November 2020 | |
| Tags: openbsd ssb | |
| Description: | |
| In this article I will tell you about the | |
| [Scuttlebutt social network](https://scuttlebutt.nz/), | |
| what makes it special and how to join it using OpenBSD. From here, | |
| I'll refer to Scuttlebutt as SSB. | |
| ### Introduction to the protocol | |
| You can find all the related documentation on | |
| [the official website](https://scuttlebutt.nz/docs/). | |
| I will make a simplification of the protocol to present it. | |
| SSB is decentralized, meaning there are no central server with | |
| clients around it (think about Twitter model) nor it has a | |
| constellation | |
| of servers federating to each others (Fediverse: mastodon, plemora, | |
| peertube...). SSB uses a peer to peer model, meaning nodes exchanges | |
| data between others nodes. A device with an account is a node, | |
| someone using SSB acts as a node. | |
| The protocol requires people to be mutual followers to make the | |
| private messaging system to work (messages are encrypted end-to | |
| end). | |
| This peer to peer paradigm has specific implications: | |
| 1. Internet is not required for SSB to work. You could use it with | |
| other people in a local network. For example, you could visit a | |
| friend's place exchange your SSB data over their network. | |
| 2. Nodes owns the data: when you join, this can be very long to | |
| download the content of nodes close to you (relatively to people | |
| you follow) because the SSB client will download the data, and then | |
| serves everything locally. This mean you can use SSB while being | |
| offline, but also that in the case seen previously at your friend's | |
| place, you can exchange data from mutual friends. Example: if A | |
| visits B, B receives A updates. When you visit B, you will receive | |
| B updates but also A updates if you follow B on the network. | |
| 3. Data are immutables: when you publish something on the network, | |
| it will be spread across nodes and you can't modify those data. | |
| This is important to think twice before publishing. | |
| 4. Moderation: there are no moderation as there are no autority in | |
| control, but people can block nodes they don't want to get data | |
| from and this blocking will be published, so other people can easily | |
| see who gets blocked and block it too. It seems to work, I don't | |
| have opinion about this. | |
| 5. You discover parts of the network by following people, giving | |
| you access to the people they follow. This makes the discovery of | |
| the network quite organic and should create some communities by | |
| itself. Birds of feather flock together! | |
| 6. It's complicated to share an account across multiples devices | |
| because you need to share all your data between the devices, most | |
| people use an account per device. | |
| ### SSB clients | |
| There are differents clients, the top clients I found were: | |
| - [Patchwork](https://github.com/ssbc/patchwork) | |
| - [Manyverse](https://www.manyver.se/), for Android (also available on | |
| f-droid), Windows, Linux and iPhone | |
| - [Oasis](https://github.com/fraction/oasis) | |
| There are also lot of applications using the protocol, you can find | |
| a list [on this link](https://handbook.scuttlebutt.nz/applications). | |
| One particularly interesting project is git-ssb, hosting a git | |
| repository on the network. | |
| Most of the code related to SSB is written in NodeJS. | |
| In my opinion, Patchwork is the most user-friendly client but Oasis | |
| is very nice too. Patchwork has more features, like being able to | |
| publish pictures within your messages which is not currently possible | |
| with Oasis. | |
| Manyverse works fine but is rather limited in term of features. | |
| The developer community working on the projects seems rather small | |
| and would be happy to receive some help. | |
| ### How to install Oasis on OpenBSD | |
| I've been able to get the Oasis client to run on OpenBSD. The NodeJS | |
| ecosystem is quite hostile to anything non linux but following the | |
| path of [qbit](https://bsd.network/@qbit) (who solved few libs years | |
| ago), this piece of software works. | |
| $ doas pkg_add libvips git node autoconf--%2.69 automake--%1.16 | |
| libtool | |
| $ git clone https://github.com/fraction/oasis | |
| $ cd oasis | |
| $ env AUTOMAKE_VERSION=1.16 AUTOCONF_VERSION=2.69 CC=clang | |
| CXX=clang++ npm install --only=prod | |
| There is currently ONE issue that require a hack to start Oasis. | |
| The `lo0` interface must not have any IPv6 address. | |
| You can use the following command as root to remove the IPv6 | |
| addresses. | |
| # ifconfig lo0 -inet6 | |
| I reported this bug as I've not been able to fix it myself. | |
| ### How to use Oasis on OpenBSD | |
| **2023-10-21 THIS IS OUTDATED**: oasis seems to be unmaintained, and I | |
| can't get it to work anymore even on Linux. | |
| When you want to use Oasis, you have to run | |
| $ node /path/to/oasis_sources | |
| You can add `--help` to have the usage output, like `--offline` if | |
| you don't want oasis to do networking. | |
| When you start oasis, you can then open `http://localhost:3000` to | |
| access network. **Beware that this address is available to anyone | |
| having access to your system**. | |
| You have to use an **invitation** from someone to connect to a node | |
| and start following people to increase your range in this small | |
| world. | |
| You can use a public server which acts as a 24/7 node to connect | |
| people together on | |
| [https://github.com/ssbc/ssb-server/wiki/Pub-Servers](https://github.co | |
| m/ssbc/ssb-server/wiki/Pub-Servers). | |
| ### How to backup your account | |
| You absolutely need to backup your `~/.ssb/` directory if you don't | |
| want to lose your account. There are no central server able to | |
| help you recover your account in case of data lass. | |
| If you want to use another client on another computer, you have | |
| to copy this directory to the new place. | |
| I don't think the whole directory is required, but I have not | |
| been able to find more precise information. |