I may end up doing that, but I really wish there was a true p2p option that doesn’t have me relying on someone not rug pulling their free tier sync server.

Yeah... true p2p is pretty hard though, to the point that even stuff like WebRTC requires external servers to setup the data sync portion. It would be nice to develop something that worked at that layer though.

IIUC, InstantDB is open source with a docker container you can run yourself, but at this point it's designed to run in a more cloud-like environment than I'd like. Last time I checked there was at least one open PR to make it easier to run in a different environment, but I haven't check in recently.

I spent some more time hunting due to this conversation and I’m hopeful that yjs + y-WebRTC + PeerJS will solve this. I also see that there are a few libraries that enable QR codes to replace PeerJS as a truly offline WebRTC initialization with true p2p connectivity. Looks quite promising

Unfortunately, p2p is *inhales* fxxxed! due to how modern internet networks are set up. NAT (potentially VPNed at carrier level), lack of IPv6, firewalls blocking incoming traffic, dysfunctioning UPnP, blocked UDP. Next tier issues: legal, that bound user identities to IPs, showing your IP publically is a privacy risk first and a security risk second (DoS).

It seems like it'll be impossible without an overlay network (like Yggdrasil, i2p), but these will be too heavy for mobile devices without a dedicated functioning relay... here we go again.