Sandstorm: Open-source platform for self-hosting web apps
sandstorm.io
sandstorm.io
The overall UX is very similar to my vision of the future of selfhosting. It should be as easy as installing an app on your phone, then going through a quick OAuth2 flow to set up a tunnel on a domain, and you're up and running.
I don't think app packaging could be said to be the achilles heel -- how much work it involves depends a lot on the app (some things are very easy, others can be painful), but it is certainly not the case that Sandstorm didn't take off because packaging was too hard.
Sandstorm the business was shut down 6 years ago https://sandstorm.io/news/2017-02-06-sandstorm-returning-to-...
And Sandstorm Oasis the hosting service was shut down almost 4 years ago https://sandstorm.io/news/2019-09-15-shutting-down-oasis
This codebase is basically abandonware at this point and can’t be trusted for anything serious these days. If CF brought this on as an official product (and renamed it), it would go a long ways to build back trust
For my part, I am indeed mostly focused on Cloudflare Workers today and don't have much leftover energy to spend on Sandstorm. This has nothing to do with Cloudflare telling me how to spend my time. I make my own choices. I still love what we were building with Sandstorm, but what can I say, Workers has been a lot more successful and so I am drawn to focus my energy there.
Note that Cloudflare has no affiliation with Sandstorm, other than employing some of the former team members. Cloudflare did not acquire Sandstorm itself.
Another is that it lacked (and still does, from what I can see) a killer app. It had the perfect conditions last year with the Twitter acquisition, but to my knowledge didn't seize upon it. (Likewise, Cloudflare had a similar opportunity, but the Wildebeest project comes off as a celebration of Cloudflare's infrastructure for the sake of it and/or aimed at those who love devops stack complexity, generally—a fairly tonedeaf response to what would drive someone to want to run their own fediverse node that's not backed by Mastodon.)
The weird URLs—or rather: the constraints that led to them, and the downstream consequences to UX—didn't help.
As far as the killer app, Sandstorm has some really awesome Sandstorm-only apps, but probably not enough yet for our "exclusives" to be a draw to the platform on their own. Sandstorm currently has some limitations that make it difficult to use in federated environments, and we are working on it, but yeah, it meant we didn't have a fantastic story for social during all this Elon stuff.
The hosted version wasn't. Having to prop up your own Sandstorm instance pretty much compromises the project goal—ease of app installability means little gains when you're still responsible for running Sandstorm infrastructure that it relies upon.
Your original complaint was the lack of a "miniflare", i.e. a simulator for local development purposes. But you can run Sandstorm itself locally and there are in fact tools to streamline the process of doing app development using a local Sandstorm server.
Now you seem to be arguing something about how running Sandstorm locally is too much work for end users, who would prefer to use the hosted version? But I thought we were talking about app developers. End users don't need a "miniflare".
"The Cloudflare developer experience with miniflare is worse than that of Sandstorm."
Sandstorm implements a capability-based security model, where not only does each app run in a strong sandbox, but a new instance of the app is created for each document (or whatever the app's logical unit of data may be). Sandstorm itself enforces that each document can only be accessed by the people with whom it has been shared, regardless of any bugs that might exist in the app itself. All communications between the user's browser and the app go through a proxy implemented by Sandstorm which applies this authorization regime.
Apps cannot even talk to each other or the internet without specifically requesting access, granted by the user. The UX model for these requests is designed to flow naturally for the user, by deriving the user's intent to permit access from the action they took that caused the access to be needed. For example, say the user wants to embed a chart into a document, where the chart editor and document editor are separate apps. The user clicks some sort of "embed" button in the document editor. Now they are presented with a chooser where they can pick which thing they want to embed. If they make a choice, there is no need to separately ask the user if they want the document to have access to the chart -- of course they do. Sandstorm works by having the system implement the "picker" UI directly, so that Sandstorm knows the user made this choice, and can automatically provide the implied authorization.
All this actually makes apps easier to write since they don't have to deal with authorization and user management themselves, and as a result there are a lot of neat unique apps for Sandstorm written by various people in a short amount of time. However, the down side is that existing off-the-shelf apps that do already feature their own user management and authorization are somewhat laborious to port to Sandstorm.
Yunohost takes a more traditional model of just running each app and letting it figure out its own authorization.
Also, Cloudron is not open source and you need a subscription to use it generally. This has led it to be more successful of a business venture, of course, but is a big downside for software freedom.
Docker (or Podman) is just a tool that sets up some linux primitives for you. One with a track record and volume of users that'd make me trust it over things that specifically advertise themselves as "security sandboxes" (i.e. firejail, who had some extremely funny basic exploits to get root from their SUID'd binary). You can even pair containers with user namespaces now and get the fakeroot equivalent of containers.
Object capabilities, which is what Sandstorm/Cap’n Proto are based on, provides much more security than Mandatory Access Control systems while also providing a much simpler method for getting there.
Sadly the literature on OCAP is fairly poor, often being either too low level or too abstract.
The tl;dr is that OCAP systems work by assuming an application has no functionality whatsoever, and then must be passed (not sandboxed but passed) functionality, either at start time, or when the application requests it.
The easiest way to understand it is imagine if instead of being able to open a file on the filesystem by path, you had to specifically be passed the file descriptor by the OS, possibly before runtime.
Another way to think about it is thinking about the OAuth2 capabilities that you can grant an application. You authorize an application to have certain capabilities, and then the client is handed back a set of API tokens or addresses. Those are the only way it can exercise those capabilities.
It's not being sandboxed, it simply doesn't have any additional way to get access.
Thanks for actually answering the question.
You need to understand how sandboxing work.
> Docker (or Podman) is just a tool that sets up some linux primitives for you. One with a track record
A pretty poor track record.
That's pretty much my job. Can you be more concrete with what you're talking about instead of this passive agressive "you don't know what you're talking about" tone?
Flatpak and Snap are pretty much using the same primitives as containers, they just don't like using the word because of existing connotations. Mandatory access controls are neat, but nobody actually uses them unless the default doesn't disturb them or they have a compliance requirement.
> A pretty poor track record.
Modern containerd, after having been split up from Docker/Moby, has a better track record than most other sandboxing tools. I mentioned a laughably bad one that the Arch wiki and many HN users still seem to endorse.
The core difference here is that for all intents and purposes app vulnerabilities are almost wholly mitigated. The only significant type of app vulnerability which Sandstorm cannot prevent is privilege escalation within a single document, where you've shared limit access of a document with a user, say read only, and due to an app vulnerability, they've figured out how to edit it.
Since all documents are private solely to the user who created them initially, and the process isn't even running until that particular user tries to open it, there's effectively no attack surface for Sandstorm apps most of the time. When they are spawned, they're spun up at randomly-generated ethereal subdomains, and authorized solely for access by the web browser that launched them.
Security can just be a OTP: https://github.com/tinspin/rupy/blob/master/src/se/rupy/http...
But if you built your entire application assuming you're shipping it via Docker, untangling the sheer amount of redundant garbage you need to pare down to a single-document app that accepts outside authentication and security, ends up being a ton of work to package and then maintain it long-term.
Ideally, I think having apps not made for Sandstorm originally is mostly just a strategy to get enough people operating on Sandstorm's model for people to build Sandstorm-specific apps in earnest.
Oof... 9 years ago.
The biggest thing is the lack of integration. Some of them have patchy SSO integration options, but most won't tamper with the app in any meaningful way, so even if you have login integration, you have to log into each app on a server, and each app is subject to that app's capabilities for things like sharing.
You end up hosting a bunch of disjointed and separate services. Sandstorm feels much more like hosting Google Docs and it's barely ever used support for third party apps/document types.
Sandstorm requires aggressive app packaging work but the payoff is significant: Apps do not have independent authentication at all, logging into Sandstorm gets you into all of your applications, and every file can be shared using the same process with other users or the public trivially.
In fact, because we break apps into "grains" or documents, we can do crazy things like allow you create Collections which comprise of documents made with different applications and then share that as a single unit with others. So I can take a couple specific Etherpad documents, a Wekan board, and a WordPress, put them into a project collection, and then share that with a collaborator with one link.
Impressive that Umbrel's popular because IIRC it doesn't take security as seriously as say Sandstrom. You'd think the crypto folks would at least care about that, if nothing else?
I've done plenty of manual self-hosting. I explored sandstorm for a year or two in the mid 2010s. It worked as promised, but the complexity of integrations, fraying, showed.
I switched to yunohost 6 years ago. I almost entirely don't think about it. I use a few services, wallabag and Uptime Kuma. Tried Nextcloud, HedgeDoc /HackMD/CodiMD, and Monica PRM because it was so painless to give them a go.
My initial motivation for exploring it, came from the hope it could install NextCloud. My attempts at installing OpenCloud and NextCloud, with scripts that would make non-idempotent changes that fail on a second run after first pass fixes, left me sensing an unfriendly forced upsell environment.
I have had to do some manual fixing to complete an upgrade or two, but it has workflows for backups, and some stringent, but fully automated configuration, sanity checking. I don't worry about the complexity.
Every app is run by a special user created to do just that. This app user only has permissions for the app and data folder.
(I don’t have much security/hardening experience)
I'm wondering if taking something like Fedora CoreOS/IoT, Cockpit, linuxserver.io images & develop a nice GUI & documentation on top wouldn't have much greater chance to succeed. People who will try to self host & will most likely stick to it are already familiar with tech & willing to tinker anyway.
Engineers and QA/useability/marketing people tend not to mingle in these projects. I am broken record at this point, but Blender and Godot tackled this problem.
Take sandstorm, it looks like a informative website but just looking at it I see a ton of friction installing it. Whether or not that is true, but the optics are against it.
The only way to make Sandstorm easier to set up would be to partner with hosting providers to offer one-click installers. In the absence of that, Sandstorm's current install is about as easy as it could possibly be given the constraint of "should run on a generic Linux host".
(Aside: People have always given Linux flak for being hard to install. But have you ever tried to install Windows from scratch? It's sooooo much harder. But no one cares because it's preinstalled on every PC you buy.)
(Aside 2: How did Chrome become the most popular browser? Sure as hell not because it's so easy for people to install. Most people don't know what a browser is. It got there by Google paying a lot of people to bundle it. It's honestly amazing that Google pulled it off, against competitors who owned their respective operating systems.)
Anyway, back in the day, Sandstorm actually offered its own hosting service, which you didn't need to be technical to sign up for. So it was actually quite easy then. But it was a first-party service. In retrospect I think building the first-party service was a mistake. It distracted too much engineering time away from actually building out the platform and ecosystem. It meant we could offer a better price point than a VPS provider would, but I think the people actually interested in the product at that point weren't so price-conscious. If I did it again I'd focus on partnerships.
Similiar and a little bit more mature is also YunoHost, https://yunohost.org/, or for professional environments, UCS https://www.univention.com/.
My personal favorite is Cloudron, as they have an app concept that only needs minimal human maintenance. And you could even combine it with an LDAP server like ucs for the user management.
There's been attempts to do this without the opinions e.g deploy docker containers but the reality is we do actually need a cohesive vision for the end user for anything like this to take off. Catering to the developers alone in the self hosted model is very hard. And I know Kenton tried hosting too. It's just a tough business all around.
But it's such a good system, I wish we could use it.
- Node (& JS in general) have three implementations. One[1] mentions in the README that it's a hacky wrapper, the interface isn't final and the implementation is slow - for 9 years now. Another one[2] without support for RPC hasn't been updated in 4 years, and the last one[3] for 10 years.
- Lua[4] has been updated sporadically over the last couple of years, but the README mentions it ONLY works with LuaJIT v2.1, not with current Lua versions.
Currently it's hard to justify using it in a long-term project, considering how much broader the language implementations for Protobuf are. They also aren't perfect, but there is a lot more buy-in.
[1] https://github.com/capnproto/node-capnp
[2] https://github.com/capnp-js/plugin/
[0] https://spritely.institute
[1] https://github.com/ocapn/ocapn
[2] https://spritely.institute/static/papers/spritely-core.html
But yeah, Sandstorm has been in a state of "not dead but not moving fast" basically since the company went under; things picked up a bit in 2020, and I got oriented-enough on the codebase during that time to keep it floating along, but, per the post, it's never been easy going.
Anyway, I wish I were answering this question in 6 months time, when I'll be able to show off a variation of Tempest that is relatively usable and can do a few tricks that Sandstorm can't.
Are there primary areas in which contributions would be most valuable, especially from those without Golang experience/skills?
At some point the project would greatly benefit from some attention from a UI/UX specialist -- I'm doing my best, but it's not what I'm an expert at. Though right now I'm mostly focused on getting enough stuff to work for it to be of interest, and someone fussing with the UI might just be distracting.
Doing app packaging for Sandstorm might be the most accessible way to help for someone who's not a Go dev -- Tempest will of course benefit from more apps when it's ready to run them, and it'd be a high impact thing for the community right now.
Hosted services will always offer more convenience. If the price is fair, they are likely better options in general.
App Examples - github.com/peergos/example-apps
API Docs - book.peergos.org/features/apps.html
Disclaimer: I work on the project.
Sandstorm is for users/admins to deploy many apps together.
Have you considered or tried nextcloud?
The idea of applications has been stale for a long time, it just takes a long time for people to get there.
Microsoft doesn't want it to happen quickly because they like selling Office as a package, but they're slowing decomposing it. OLE was a micro step, now with a cloud graph model and AI they're going much deeper.
Ultimately, your "table" can be generated from data in a "spreadsheet" or "database." And your AI can interact with this data precisely. At a certain level, you really shouldn't need to care where something was generated or viewed. It's data. But the more strongly it's "typed," the more accurate everything becomes.
Yes there's some hype over AI, but it is just incredibly useful, even the most basic and stumbling step of importing your documentation to an app or browser based AI to answer questions. Anything that doesn't include it as a first class consideration is last epoch, in the same category as Visicalc, 1979. Unfortunately, that includes the vast majority of Open Source. KDE was way ahead of this, but they stumbled. I hope they can catch up. Local, Open Source AI needs to leap ahead or computing is going to collapse.
So the first step is to give all the data a schema, ideally a domain-relative one so it's interoperable. See Linked Data.
Once umbrel is setup apps are are just as easy to update and install as an iPhone. I also appreciate how it has a dependency system so apps can build on one another. Umbrel is more for personal homelab rather than sharing with friends, there is no public endpoint you would want on the clearnet, you need to VPN in, but that also makes it more secure.
Fancy website hints on prevalence of form over substance, although perhaps it's just me. People who are concerned about privacy and big corporations don't need fancy rotating boxes, rather clear and concise explanation of the matter.
Just my 2 cents
I was considering Mattermost over Rocket Chat, but it’s not currently supported/listed.
The space of Linux distros specifically for self-hosting data has always been a little fragmented, which is a shame since it's really useful for the intended audience. A bit like Linux distros in general, perhaps.
Maybe if one of the bigger distributions, like Debian or Fedora, got behind one system it would improve. But that's also how we ended up with Flatpak and Snap, so it could be either way really.
In the end, I find the LAMP stack the best for self-hosting, especially with an interface like cPanel. You can simply upload files and the app works (PHP), you can view the databases (PHPMyAdmin), most hosting companies support it, there are many apps built on it.
Do you just run Docker or do you combine it with Docker Compose?
Do you instead opt for Proxmox in combination with Podman?
Maybe you opt for something simpler like this tool; Sandstorm.
Or even more complex of a setup with a K8 cluster with combined with Gitops.
It is interesting and a lot of really good tools to chose from but it is not obvious to me.
Is this a remote server where you can install and use web apps from third parties?
Or can you actually build a web app there so that users can employ it? Something similar to Digital Ocean.
The installation is a few simple CLI steps. From there everything is in the browser, including the admin. Each user, once logged in, can install whatever apps they want from the app store. Or they can upload their own if they want. This is safe because everything is containerized. Apps have to be specially designed (or retrofitted) for Sandstorm, though.
It’s also open source, so you can choose to host Sandstorm yourself, instead of using their service.
You didn’t ask what Sandstorm is, so I’m assuming you already understand what it is.
By way of analogy:
You could carry around a phone that has a simple Linux distro running on it. And while we're at it, what's the point of having a package repository? So we could get rid of that, and compile all our software from source. So the user experience is something like: SSH into your phone, curl down a source tarball for the calculator software you would like to run on your phone, and first make sure you have all of the build dependencies installed, and now make && sudo make install.
So what's the point of Android or iPhones?
Well, I'm very technically proficient, and yet I don't want to SSH into my phone and make && sudo make install. God help my non-techie family and friends. We all want to install software that has gone through at least some semblance of an audit, and we want to install it trivially, and we want that software to then run in a minimally privileged sandbox. While a "phone app" is technically "software", the distinguishing factor is that aforementioned features are implied when someone says "app".
So recap of what it's like to use a phone app:
- There's a distribution channel that makes it easy to search for and install the app of your choosing.
- The apps run in a sandbox. Privileges/capabilities are surfaced through a common setting UI: don't want the app to be able to send you notifications? You can toggle that in a way that the app can't circumvent.
Maybe you do or do not appreciate these features. But if you, like many, do appreciate these features, the a logical question is: is there anything like this but for software we want to use outside the context of our phones? And, well, if we're wanting this software to be accessibly not only on our phone, we should probably make this as maximally accessible as we can, and what could be more accessible than a browser based app -- now you're not limited to using it just from your phone (though that's possible too), you can access it from your laptop, or a friend's computer, or your gaming console's browser, or anywhere else where you can browse the web.
So that's what Sandstorm is, more or less. Trivially installable apps, where you can completely own your own data (if you're hosting yourself), and even if someone else is hosting Sandstorm you can trivially export your data, the whole app is sandboxed, you have a common dashboard for controlling each app's capabilities, etc.
Once upon a time, years ago, Sandstorm was a startup, and that startup did offer a paid hosting service as an option. However, that startup shut down a while ago and the paid hosting service went away. But the open source project lives on.
(I was the co-founder of said startup.)
Also how does sandstorm makes money then ?
It doesn't. It is an open source project. Originally Sandstorm was offered by a startup, but they stopped [0] in 2017. You can make donations though [1].
[0] https://sandstorm.io/news/2017-02-06-sandstorm-returning-to-...
[1] https://sandstorm.io/news/2021-06-17-sandstorm-community-fun...