@CustomDesigned in #minbay

I installed minbay, got build/index.html generated, and started sbot with --allowPrivate (the sbot I already had, not the sbot that npm installs as a dependency of minbay - does that make a difference?).

When I node serve.js, it just sits waiting without printing the line about listening on 3013 and the invite. What am I missing? Still using #patchfoo

@CustomDesigned in #minbay
Re: %dii5RjWZg

So I copied index.html, minbay.css, minbay.png to /var/www/html/minbay and browsed it from another system (with just my regular sbot running in the background and nothing running for minbay on the sbot machine) — it seems to work! So, it has a fresh key. Where is that key stored? My browser doesn't indicate anything used for offline storage. Is it supposed to work this way? Should I go ahead and get a regular invite from my pub? How do a get a private invite? (And what exactly is the difference?)

@ev
Re: %dii5RjWZg

@customdesigned You can move your ~/.ssb/secret key into the browser and use the same remote. The import/export is in the Key tab.

You can get the remote manually with sbot ws.getAddress.

The lite client can't read your computer's hard drive (I think this is a good thing!) so it can't detect the key that you already have.

I don't know what a private invite is? Feel free to explain where you're seeing that part of the application.

@ev
Re: %dii5RjWZg

For example, I use my 8Qee0I/DwI5DHSCi3p5fsl6FyLGArrnDz3ox9qZr5Qc= key on my local with itself as a remote ws://localhost:8989~shs:8Qee0I/DwI5DHSCi3p5fsl6FyLGArrnDz3ox9qZr5Qc=.

@CustomDesigned in #minbay
Re: %dii5RjWZg

@ev
If I import my key from sbot server, is it safe to run both patchfoo and minbay (without forking my feed)? Or do I need to be careful to stop patchfoo before playing with minbay? Why does minbay seem to work when I'm not running the thing that listens on 3013 as talked about in README.md ?

@CustomDesigned in #minbay
Re: %dii5RjWZg

The README says to run sbot with --allowPrivate. What does that do?

@ev
Re: %dii5RjWZg

@customdesigned If they're both connected to the same sbot instance, there's no way you'll fork your key. If the sbot instances are on different machines, then you need to worry about it.

Why does minbay seem to work when I'm not running the thing that listens on 3013 as talked about in README.md ?

the lite client contains the entire application in an html file, so it runs without serve.js which is just a ecstatic server to quickly host the lite client and give you lite client invites on the command line.

@ev
Re: %dii5RjWZg

The README says to run sbot with --allowPrivate. What does that do?

sbot will throw an error if you're trying to generate an invite on a machine without a public ip address. because the lite client works on your local, this bypasses the error and generates a localhost invite if you're not on a vps.

@CustomDesigned in #minbay
Re: %dii5RjWZg

I must be dense. I can't figure out how to turn an invite from my pub into something minbay can use. Maybe the thing that is supposed to be listening on 3013 is needed for websockets? But your example doesn't use 3013. Should I open 8989 to the world? Currently only 8008 is open to the world on my pub.

As I understand it, js in the browser cannot connect to the network. So you need websockets so it can use Ajax to proxy connections through the server the served the page. Hence, I do need something running on 3013 to provide websockets after serving index.html.

@ev
Re: %dii5RjWZg

@customdesigned Yes, you should be running ssb-ws at port 8989. To generate a modern invite, use sbot invite.create --modern.

You'll get this:

ws://yourserver.com:8989~shs:8Qee0I/DwI5DHSCi3p5fsl6FyLGArrnDz3ox9qZr5Qc=:F2HgvfPR3t0uYXSZJUOGVA6SMO98OIsdltC60ogRJVo=

Next, you'll need to put that into the url of where minbase is hosted. So:

http://ssb.yoursite.com/#ws://yourserver.com:8989~shs:8Qee0I/DwI5DHSCi3p5fsl6FyLGArrnDz3ox9qZr5Qc=:F2HgvfPR3t0uYXSZJUOGVA6SMO98OIsdltC60ogRJVo=

That's a one-click invite similar to what I have up at http://evbogue.com:1337/invite/

Minbase does most of this for you, but I'm explaining the process. If you want to host lite clients on your website, you just gotta make sure to configure your host properly and point everything at the right places.

The serve.js file that hosts the lite client at port 3013 is just a static website to host the lite client, it doesn't do anything else. You'll have sbot running at 8008, ssb-ws running at 8989, and maybe serve.js running at 3013. But you can also host the lite client anyway you want using any static hosting software you want.

@CustomDesigned in #scuttlebot
Re: %dii5RjWZg

@ev
One more newbie question: what are the security implications of opening port 8989 to the world? For instance, does that let random internet entities make web socket connections to arbitrary ips and ports? Is there some sort of authorization? (e.g. listing ssb ids allowed to use web sockets would be sweet)

@CustomDesigned in #scuttlebot
Re: %dii5RjWZg

Looks like there is authorization of some description. After opening port 8989 and using a modern invite, #minbay gets a permission error clicking the publc button:

Error: method:createLogStream is not on whitelist
    at Function.perms.pre (/home/stuart/src/scuttlebot/node_modules/muxrpc/permissions.js:88:14)
    at Object.<anonymous> (/home/stuart/src/scuttlebot/node_modules/muxrpc/local-api.js:35:21)
    at PacketStreamSubstream.stream.read (/home/stuart/src/scuttlebot/node_modules/muxrpc/stream.js:67:23)
    at PacketStream._onstream (/home/stuart/src/scuttlebot/node_modules/packet-stream/index.js:230:11)
    at PacketStream.write (/home/stuart/src/scuttlebot/node_modules/packet-stream/index.js:135:41)
    at /home/stuart/src/scuttlebot/node_modules/muxrpc/pull-weird.js:56:15
    at /home/stuart/src/scuttlebot/node_modules/pull-stream/sinks/drain.js:24:37
    at /home/stuart/src/scuttlebot/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.cb (/home/stuart/src/scuttlebot/node_modules/packet-stream-codec/index.js:111:11)
    at drain (/home/stuart/src/scuttlebot/node_modules/pull-reader/index.js:39:14)