capsul devlog

returning to the project, and the capsul dispenser

returning to the project

šŸ—’ļø NOTE: This blog is moving! check out this post or re-subscribe to RSS on blog.breaksoftware.xyz.

It's been half a year since our last post, j3s has been busy moving to a different city, and I fell off the pattern of working on capsul regularly. Too many other things were taking up my attention, and I was struggling to muster up motivation. Initially, we had planned to rebuild all the current capsul.org features first before we started implementing anything new and exciting.

This approach may have gotten me into trouble with my own motivation; why build another "pay money, recieve VM" system when there are already so many? I've had some conflict about this with capsul since the very beginning; fueled by desire to build something that doesn't currently exist, transformational tech. It would be familiar ground with familiar issues. (centralization, etc.)

So from now on, my work will continue only as it can be fueled by dreams and desires. If not a clone of capsul.org, then what exactly are we building?

10 years ago

My original motivation to work on capsul came from an idea I had when I was a lot younger... Frustrations about the way the internet was built, and an urgent imperative to effectively paper it over, to try to make the frustrating reality disapper. Ideally, to eventually establish something permanent which could work for everyone forever.

But in my defense, all I wanted was a way to set up a computer so it can publish to the internet directly, just as easily as it can consume stuff from someone elses server on the internet. Is that so much to ask? That's how it worked on the internet originally Ģ„
_ (惄)_/ Ģ„

The classic: Got a problem caused by tech? Ope. Ya better create more tech to solve it!

I had already started a project to try to do the "create more tech to solve it" thing mere months after I started working on capsul back in 2020. In a way, I think seeing how capsul had some success inspired me to move forward with that project as well (called greenhouse at the time)

At first, j3s wasn't interested in it. Probably at least in part because my plans at the time were so expansive, much more so than what I ever wrote about on my blog. But as we've returned to the capsul project, considered how it went and what that means for:

We've both concluded that what capsul does today is great, but it's not quite enough for the interested parties: We want it to be easier to run at home, for it to be more than just a service powered by a server in a rack located far away from us. So we eventually settled on integrating greenhouse's TLS SNI routing and TCP reverse-tunneling to enable easier publishing to the internet through a gateway.

Now there's only one problem. What are we going to call this new feature?

the capsul dispenser

capsul-dispenser refers to this new network tunnel implementation. There are two main reasons for it. First, we want multiple capsuls to be able to share an IP address, because not everyone needs one, and they're only getting more expensive. This also enables capsul to be run on a home network which only gets one IP address. Further, it allows us to make capsul even easier to set up on a home network; port-forwarding and dynamic DNS become optional instead of required.

I created this comic strip to try to explain it:

Tangela creates an account on capsul.org. "I want to publish a website or app to the internet", they say. Then they create a virtual machine on there. Bellsprout and Oddish show up (more and more users), and they say, "This is a cool website or app, we want to use it."  The capsul vm is sweating.  Tangela upgrades the capsul vm to a larger size. Now the capsul isn't sweating anymore, but Tangela is. "Oh dear, paying for all of this compute is getting expensive!", they say, "But I can't let my friends down!"  Next, capsul.org says "We have a new feature. Run on your own server." After thinking for a second, Tangela responds, "I've enjoyed hosting for my community so far. I'll give it a try with a $35 fanless computer from eBay".  Then Tangela installs the capsul cog software onto the home server, and adds thier server config to thier capsul.org account. A Network Tunnel is created, from the capsul.org cloud into the home server. Next, Tangela migrates the capsul vm from capsul.org onto the cog on the home server. "Phew, With dedicated hardware, my popular app is running smooother, with less monthly cost!", they say. Now Bellsprout shows up and asks Tangela, "Hey, I want to learn how to do this too! Can I please run a capsul on your home server as well?"  Bellsprout creates a new capsul on Tangela's home server.  "This is so cool, I'm going to start my own capsul hub too, so I can help other people host home servers someday," Tangela says.  Tangela registers the my-local-hub.org domain name, sets up dynamic DNS, installs the capsul hub software, and configures port forwarding on thier home router.  Bellsprout installs the capsul cog software on thier home server, and migrates thier capsul vm  to it.  A network tunnel is created from my-local-hub.org to Bellsprout's home server. And thus, the process can repeat, again and again...  From an experiment in a VM to a community resource. From a single-tenant home server to a multi-tenant one. And an insulated node stuck behind a NAT, to a new public service provider on the global internet.

-- forest