Skip to content
Adam Bliss edited this page Apr 30, 2020 · 2 revisions

WARNING: Experimental feature!

Standalone grains are experimental and may be removed in the future. Kenton has very mixed feelings about them. But if you want to toy around with it, read on.

Standalone Grains

According to db.js,

// A standalone domain that points to a single share link. These domains act a little different
// than a normal shared Sandstorm grain. They completely drop any Sandstorm topbar/sidebar, and at
// first glance look completely like a non-Sandstorm hosted webserver. The apps instead act in
// concert with Sandstorm through the postMessage API, which allows it to do things like prompt for
// login.

Note that there's still an iframe wrapping a session-specific ui-* subdomain. It's just that the iframe is full-screen, so the outer sandstorm UI is hidden from the screen.

Creating a standalone grain

  1. From the sandstorm ui, request a webkey with the permissions you want exposed to the world.
  2. The webkey ends with an authentication token, after the #. Copy it to your clipboard.
  3. Login to your sandstorm server and run sudo sandstorm mongo.
  4. At the mongo prompt, type use meteor and then db.standaloneDomains.insert({_id:"my_new_subdomain.my_domain.sandcats.io",token:"my_auth_token"});. If it worked correctly, you should see a response like WriteResult({ "nInserted" : 1 }).
  5. That's it! enjoy your new standalone grain at its named subdomain.
Clone this wiki locally