Repository navigation
Replies: 2 comments 1 reply
|
Hey I'd be really interested in a slim docker to run via tailscale (vs. cloudflare). Perhaps something like this can simplify offering it? https://hub.docker.com/r/jacoblincool/workerd |
0 replies
|
@kinchahoy thanks for the feedback! A lot of people have expressed interest for a dockerised version, and it's on the near roadmap. The current proposal is even simpler than using workerd! It's just plain Nodejs, and it will work just fine. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
This RFC proposes adding a first-class self-hosted server runtime for YAOS, packaged for Docker, while preserving the current
Cloudflare Worker deployment as the default zero-ops path.
The key architectural decision is:
This gives us vendor portability without destabilizing the current Cloudflare path.
Motivation
YAOS already solves the main problem for most users:
However, there is a meaningful self-hosted segment that specifically wants:
This is not just a deployment preference. For part of the Obsidian self-host community, “self-deployed on Cloudflare” and “self-hosted
on my own machine” are not equivalent.
Problem Statement
The current server is portable in some places, but not portable as a whole.
Portable pieces already exist:
Cloudflare-specific pieces are still deeply embedded:
So this is not “put the current server in Docker.”
It is “build a second runtime for the same YAOS server contract.”
Current Architecture Reality
Relevant grounding in the repo:
Also worth noting:
Goals
Non-Goals
Core Architectural Decision
Decision
Use a dual-runtime architecture.
Why
y-partyserver is a Durable Object abstraction, not a generic app server abstraction. It should remain the Cloudflare adapter, not
become the center of the entire portability strategy.
The portability boundary should be YAOS-owned and include:
Consequence
We should preserve:
We should not preserve:
Proposed Design
1. Introduce a core server layer
Create runtime-agnostic interfaces for:
The core layer should own:
2. Keep Cloudflare as an adapter
The existing Worker runtime becomes runtime-cloudflare.
It keeps:
This path should change only as needed to plug into core.
3. Add a Node self-host adapter
Create runtime-node using:
Important constraint for v1:
No horizontal scaling in v1.
4. Add a tiny provider abstraction in the plugin
Right now the plugin constructs YSyncProvider in one place.
We should wrap that in a small local interface so the client can swap transports later if needed.
Target state:
Networking and Deployment Strategy
The main lesson here is:
Public VM deployments
These are the cleanest self-host story.
Officially support:
These are real solutions when the box has public ingress because they handle:
Private homelab / NATed deployments
Coolify and Dokploy do not solve NAT traversal by themselves.
If the server lives on a home LAN, we should officially recommend:
These solve the actual hard problem:
Reverse proxy setups
Support as best-effort only:
These are fine for advanced users, but we should not let “debug my proxy” become the support burden for the project.
Official Support Matrix
Supported:
Best-effort:
Not supported in v1:
Storage Model for Self-Host
Text sync
Use SQLite-backed persistence that preserves the current YAOS checkpoint+journal model.
Do not rewrite the persistence model around full-document rewrites.
Blobs
Use local disk storage with the current content-addressed model.
Suggested layout:
Snapshots
Use the same logical model as today:
The backend may be local disk instead of R2, but the feature contract should remain the same.
Risks
1. Runtime drift
Two runtimes can diverge in behavior over time.
Mitigation:
2. Hidden Cloudflare assumptions
There are currently implicit assumptions around:
Mitigation:
3. Support burden explosion
Self-host users often turn deployment issues into app issues.
Mitigation:
4. Accidental multi-instance breakage
If someone runs multiple app replicas, room ownership semantics break.
Mitigation:
Rollout Plan
Phase 0: Refactor boundary only
Phase 1: Text-only self-host MVP
Phase 2: Blob and snapshot parity
Phase 3: Self-host polish
Acceptance Criteria
Architecture
Product
Testing
Open Questions
All reactions