Blog index

Written 2021 12Dec 25, revised 2022 03Mar 29

The Spacedock model

Lowering the barrier for running web servers

Admins run state-less relays in the cloud. Users run web servers on their PCs. Web servers 'dock' loosely with relays.

It's a specific case of Publish on your Own Site, Syndicate Elsewhere.

A picture of the spacedock architecture, with two clients connecting to a relay. The relay in turn connects to 4 servers, a desktop, a laptop, a phone, and a web browser tab.

You are already reading this on a spacedock relay. The original file spacedock.html lives on my home desktop. The relay at https://six-five-six-four.com is only a frontend / cache for my desktop's origin server.

With other server models, picking a cloud server is like buying a home and moving in. It's a big commitment, you have to move all your data, and you don't really want to move it back out.

With the spacedock model, picking a relay is like pulling your RV into a truck stop. The truck stop is not your home, but you can let people visit your RV while you're parked. If the truck stop raises their prices or kicks you out, just drive down the road to the next one.

Existing implementations

PageKite implemented this in Python, in 2010. PageKite claims to work with any TCP-based protocol, not just HTTP.

PTTH implemented this in Rust, in 2020. Currently the server only serves static files. The PTTH_QUIC proof-of-concept works with any TCP-based protocol.

Theoretical implementations

A VPN like WireGuard and any web server like Nginx or Caddy could form a space dock. It requires root access on the origin server, but it would probably have better latency than the HTTP long-polling that PTTH uses.

Any other tunneling software could implement this.

The File API in JavaScript could serve a single file through a relay, like Station307 does, but AFAICT it can't serve an entire folder.