Giter Site home page Giter Site logo

staltz / ssb-room Goto Github PK

View Code? Open in Web Editor NEW
109.0 16.0 17.0 981 KB

A server to find and connect to other SSB peers – a meeting place. AGPL-3.0

License: GNU Affero General Public License v3.0

Dockerfile 1.93% JavaScript 61.65% Shell 11.24% EJS 25.17%
ssb ssbroom

ssb-room's Introduction

SSB Room 🏕

A server to find and connect to other SSB peers – a meeting place.

⚠️ DEPRECATED. Please use the new iteration of SSB Rooms, go-ssb-room ⚠️

  • A Secure Scuttlebutt (SSB) server for your community
  • Friends currently online can connect to each other, bridged by the room server
  • No developer skills required to set up your own room
  • Comes with a friendly web page interface

How does this compare to SSB pubs?

SSB Pubs are servers that hold copies of several SSB accounts, allowing you to sync with multiple friends, even if those friends are not currently online. Rooms are alternatives to Pubs that have an important difference: rooms do not store any user data, but instead allow currently online friends to connect to each other and synchronize their feeds.

The advantages are:

  • Discover accounts that share a common interest with you
  • Choose who you want to connect with (helps avoid a sudden influx of many strangers)
  • Openly available invites makes it easy to onboard people onto SSB
  • No concerns about hosting other people's data on the internet

The caveat is that you can only connect with accounts that are currently online in the same room. That said, you can still fetch the updates of an offline friend if another account online in the room also follows that offline friend.

How to setup an SSB room

  1. Create an account on DigitalOcean and setup a billing method

  2. Press this button Install on DigitalOcean to create a server on DigitalOcean and setup SSB Room

  3. Follow the instructions on that page until you see this big button, and press it. "Go to your new app!"

  1. You will see this initial page. Setup a name and description for your room server, and press "Done".

  1. In the next page, your room is now ready to be used. It shows the invite code.

  1. Copy the invite code and paste it into your preferred SSB app. Apps that support room invite codes: Manyverse (version 0.1908.12 or higher) and Patchwork.

  1. In your SSB app, when friends join the room, your apps will sync. Send the room's website link to other friends to invite them too.

  2. Announce the room's website publicly to the world by mentioning it anywhere on the web with the hashtag #ssbroom, or keep the link private to yourself and your friends.

For other use cases and setups, read the FAQ.

Acknowledgements and donations

A large portion of this project was forked from ahdinosaur's superb ssb-pub. Support them on their OpenCollective.

As for myself, you can support my work on the Manyverse OpenCollective.

License

AGPL-3.0

ssb-room's People

Contributors

ahdinosaur avatar christianbundy avatar llebout avatar miikka avatar romuloalves avatar staltz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ssb-room's Issues

Unable to launch

Hey Andre,

Super cool new project! Tried to create my own room, but after following the steps, the container wouldn't start. When running docker logs room, I see this error:

Error: EACCES: permission denied, open '/home/node/.ssb/secret'
    at Object.openSync (fs.js:443:3)
    at Object.writeFileSync (fs.js:1194:35)
    at Object.exports.createSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/storage.js:104:8)
    at Object.exports.loadOrCreateSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/index.js:89:20)
    at setDefaults (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/defaults.js:71:27)
    at module.exports (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/inject.js:7:16)
    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/config.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)

Did I miss a step maybe?

Thanks!

Docker Container - Continually Restarting

Following the Docker pull install method from the manual install documentation - the docker container status is continually restarting.

The container logs show:

Error: EACCES: permission denied, open '/home/node/.ssb/secret'
at Object.openSync (fs.js:443:3)
at Object.writeFileSync (fs.js:1194:35)
at Object.exports.createSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/storage.js:104:8)
at Object.exports.loadOrCreateSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/index.js:89:20)
at setDefaults (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/defaults.js:71:27)
at module.exports (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/inject.js:7:16)
at Object. (/home/node/.npm-global/lib/node_modules/ssb-room/config.js:4:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)

Note - when attempting to install from git - The install fails.

Install on Digital Ocean - Debian 9 Droplet ($5)

How to add the go-ssb-room plugin to go-ssb-pub

Hello, we have installed go-ssb pub. Now we want to integrate go-ssb-room into pub. Is there an integration method? In addition, do the integrated pub and room have their own SSB id or only one SSB id? Well, if there are two SSB id , is it supported by the user who chooses which one to use for communication?thanks.

DigitalOcean Installer not showing that I have an account

Really sorry if this has an obvious solution, but I can't seem to figure it out. Whenever I click to start the installer it says that I don't have a DO account, when I have set up payment and signed in many times. I've tried it in multiple browsers as well.
image

How can I enable *both* a client and server?

I've tried to add both the client and server as secret-stack plugins but instead I saw:

plugin named:tunnel is already loaded, skipping

My use-case is that Oasis works as both a user-facing client and as a public SSB viewer, so I'd like to be able to use both.

Update secret-stack dependency

This requires secret-stack version 6.3.0 exactly. It would be nice if this could be hatted to support the current version 6.3.2.

Splitting out the tunnel directory into a separate module

Trying to add this as a module to ssb-browser I see that a lot of stuff is pulled in (like ssb-master). I was wondering if it would make sense to split out the actual implementation into maybe two modules? ssb-room-server and ssb-room-client?

Idea: stub muxrpc APIs for replication to silence error

Peers connecting to rooms might not know it's a room, and then attempt to call ssb-replicate / ssb-ebt muxrpc APIs such as replicate.request. Currently we don't have those, so the peer experiences an error or a warning. We could, though, provide that muxrpc API which always answer boring empty data, to avoid the error.

SSL support (out of the box)

I didn't add SSL originally for two reasons: too much work (I wanted to get Rooms released asap), and uncertainty about SSL for plain IP addresses. When a user installs their first ssb-room using the D.O. installer, they get a webapp running at a certain IP address. This may remain like this if they don't have a domain or don't set up a domain. I have no experience with setting up SSL for IP addresses, but maybe that's possible?

I'm happy if someone could make a PR to add easy SSL support, the main requirement being that this has to keep the no-terminal (and no dev skills) D.O. installer process still a no-terminal experience.

I suppose we could run letsencrypt in one of these two files

Enable WebSockets by default

For those of us working with ssb-browser-demo, it would be great if the default installer and manual installation instructions could enable support for WebSockets by default. See also:

ssbc/ssb-server#750

Error with Instructions on Debian 9

> `root@ssb-room:~# cat > ./create-room <<EOF
> #!/bin/bash
> memory_limit=$(($(free -b --si | awk '/Mem\:/ { print $2 }') - 200*(10**6)))
> docker run -d --name room \
>    -v ~/ssb-room-data/:/home/node/.ssb/ \
>    --network host \
>    --restart unless-stopped \
>    --memory "\$memory_limit" \
>    staltz/ssb-room
> EOF
root@ssb-room:~# nano create-room
root@ssb-room:~# chmod +x ./create-room
root@ssb-room:~# ./create-room
WARNING: Your kernel does not support swap limit capabilities or the cgroup is n                                                                                                                               ot mounted. Memory limited without swap.
a386438bbf343109579a460580442aa9e177511dc84e78b2eef885e747553ed9
root@ssb-room:~# cat > ./room <<EOF
> #!/bin/sh
> docker exec -it room ssb-room \$@
> EOF
root@ssb-room:~# chmod +x ./room
root@ssb-room:~# ./room check
{ message: 'no async:whoami',
  name: 'Error',
  stack:
   'Error: no async:whoami\n    at Object.localCall (/home/node/.npm-global/lib/                                                                                                                               node_modules/ssb-room/node_modules/muxrpc/local-api.js:29:13)\n    at Object.<an                                                                                                                               onymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/l                                                                                                                               ocal-api.js:37:22)\n    at Object.request (/home/node/.npm-global/lib/node_modul                                                                                                                               es/ssb-room/node_modules/muxrpc/stream.js:48:17)\n    at PacketStream._onrequest                                                                                                                                (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/in                                                                                                                               dex.js:161:17)\n    at PacketStream.write (/home/node/.npm-global/lib/node_modul                                                                                                                               es/ssb-room/node_modules/packet-stream/index.js:134:41)\n    at /home/node/.npm-                                                                                                                               global/lib/node_modules/ssb-room/node_modules/muxrpc/pull-weird.js:56:15\n    at                                                                                                                                /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-stream/sinks                                                                                                                               /drain.js:24:37\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_mo                                                                                                                               dules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Obj                                                                                                                               ect.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-str                                                                                                                               eam-codec/index.js:111:11)\n    at drain (/home/node/.npm-global/lib/node_module                                                                                                                               s/ssb-room/node_modules/pull-reader/index.js:39:14)' }

`

I created a new DO $5 box on Debian 9 and followed the instructions in https://github.com/staltz/ssb-room/blob/master/manual-setup.md to the letter. No problems at all until I got to the ./room check step, where I got the above.

There was a warning in ./create-room, but I didn't follow what that meant.

Digital Ocean Single click installer never completes

Not to complain, but I'll post this here so I can know if it is just me, or if this is a known thing.

Is the digital ocean single click installer currently working? For me it never completes.
Is there a debug process that need to be in the documentation for the installer never completing?

For me, the progress bar gets some small proportion of the way along the screen then stops (forever, as far as I know, but certainly at least 3 hours)

Screenshots attached (not anonymised since I've already destroyed all the droplets in question)

Screenshot from 2020-11-04 19-36-54

In the console nothing is happening special at that point

Screenshot from 2020-11-04 19-36-40

DO resource meter shows a lot of activity for a while, then none for an hour or two. Then I destroy the droplet.

Screenshot from 2020-11-04 19-35-40

This behaviour is reproducible across frankfurt-3 and singapore-1 sites, and from firefox and Brave browers, and virtual instances at 1 and 2gb sizes. Before I dive into trying to understand DO's droplet thingy I would like to know if I should be expecting this behaviour or not. Or does the instance take days or weeks to spin up?

Document known-good cloud hosts for ssb-room

Digital ocean does not work (#18), OVH does not work (#19 )

Perhaps we can maximise the value of scarece developer labour by simply listing some known-good configurations that DO work on known clouds. AWS? Azure? Has anyone had any luck?

`check` command results in `Error: no async:whoami` on various cloud providers

Running the manual install instructions creates a room that seems to start up but cannot pass a ./room check succesfully.

Here is a transcript of the state the system gets in to, on an ovh.com vanilla Debian 10 VM.

$ ./create-room 
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
29c9d7937727bb8e8e15c2be0f1a4690f50775abecceacd0deae24524b383d2d
$ docker logs room
2020-11-05T20:33:20.742Z secret-stack Adding transport net
2020-11-05T20:33:20.746Z secret-stack Adding transform shs
2020-11-05T20:33:20.749Z ssb:conn-db Created new conn.json because there was no existing conn.json nor gossip.json
Thu, 05 Nov 2020 20:33:20 GMT express:application set "x-powered-by" to true
Thu, 05 Nov 2020 20:33:20 GMT express:application set "etag" to 'weak'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "etag fn" to [Function: generateETag]
Thu, 05 Nov 2020 20:33:20 GMT express:application set "env" to 'development'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "query parser" to 'extended'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "query parser fn" to [Function: parseExtendedQueryString]
Thu, 05 Nov 2020 20:33:20 GMT express:application set "subdomain offset" to 2
Thu, 05 Nov 2020 20:33:20 GMT express:application set "trust proxy" to false
Thu, 05 Nov 2020 20:33:20 GMT express:application set "trust proxy fn" to [Function: trustNone]
Thu, 05 Nov 2020 20:33:20 GMT express:application booting in development mode
Thu, 05 Nov 2020 20:33:20 GMT express:application set "view" to [Function: View]
Thu, 05 Nov 2020 20:33:20 GMT express:application set "views" to '/views'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "jsonp callback name" to 'callback'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' query
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' expressInit
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' serveStatic
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' urlencodedParser
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "port" to 8007
Thu, 05 Nov 2020 20:33:20 GMT express:application set "views" to '/home/node/.npm-global/lib/node_modules/ssb-room/pages'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "view engine" to 'ejs'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route get '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route new '/setup'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/setup'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route get '/setup'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
2020-11-05T20:33:20.786Z ssb:room:http Express app is running on port 8007
2020-11-05T20:33:20.788Z secret-stack net plugin creating transport host=0.0.0.0 port=8008 scope=public
2020-11-05T20:33:20.788Z secret-stack creating server net shs host=0.0.0.0 port=8008 scope=public
2020-11-05T20:33:20.788Z secret-stack net plugin creating transport host=0.0.0.0 port=8008 scope=public
2020-11-05T20:33:20.789Z secret-stack net plugin creating transport host=undefined port=NaN scope=undefined
2020-11-05T20:33:20.790Z multiserver:net Listening on 0.0.0.0:8008
$ ./room check
{ message: 'no async:whoami',
  name: 'Error',
  stack:
   'Error: no async:whoami\n    at Object.localCall (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:29:13)\n    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:37:22)\n    at Object.request (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/stream.js:48:17)\n    at PacketStream._onrequest (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:161:17)\n    at PacketStream.write (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:134:41)\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/pull-weird.js:56:15\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-stream/sinks/drain.js:24:37\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Object.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream-codec/index.js:111:11)\n    at drain (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-reader/index.js:39:14)' }

Setting about information for a room.

Hey, Thanks for the amazing work you've done so far on this ssb-room project!
As the title suggests, I got bit of a question.

I've been trying to give my new room a name, picture and description. the only commands that seem to be available when executing ssb-room seem to be:

ssb-room start (which is performed in Dockerfile)
ssb-room check (which is performed in Dockerfile)

When I however execute the second one with an ssb-room running I get the error:

{ message: 'no async:whoami',
  name: 'Error',
  stack:
   'Error: no async:whoami\n    at Object.localCall (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:29:13)\n    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:37:22)\n    at Object.request (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/stream.js:48:17)\n    at PacketStream._onrequest (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:161:17)\n    at PacketStream.write (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:134:41)\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/pull-weird.js:56:15\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-stream/sinks/drain.js:24:37\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Object.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream-codec/index.js:111:11)\n    at drain (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-reader/index.js:39:14)' }

Is there a way to set the name, description and profile pic for an SSB room?

edit: Slightly more readable stack-trace from error above:

Error: no async:whoami
    at Object.localCall (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:29:13)
    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:37:22)
    at Object.request (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/stream.js:48:17)
    at PacketStream._onrequest (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:161:17)
    at PacketStream.write (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:134:41)
    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/pull-weird.js:56:15
    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-stream/sinks/drain.js:24:37
    at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream-codec/index.js:111:11)
    at drain (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-reader/index.js:39:14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.