What changed in 0.41, and how to upgrade
0.41 is the biggest release Atomic has had.
If you last looked at Atomic Data in the 0.40 days, you probably think of it as linked data over HTTP: every resource has an https:// URL, a server owns it, and the browser asks that server for it.
That is no longer the model.
Why we changed it
An AtomicServer gave you real ownership, but asked a lot: a domain, a machine that stays on, and an app that stopped working when it could not reach that machine. Most people will never run a server, and even those who do want their notes to open on a train.
So in 0.41 your data lives on your device, and a server is one more device that never sleeps. Read Local-first for the full reasoning.
What is new
- Local-first by default. The web app keeps its own database in the browser (WASM + OPFS). The desktop and phone apps keep one on disk. Reading and writing never wait on a network, and being offline is a state, not an error.
- Identities are keys. An Agent is an Ed25519 keypair, named
atomic:agent:{publicKey}. Nobody issues it, and no server has to exist before you can create data. - Location-independent names. New resources are named
atomic:{genesis}, derived from their first signed commit, so a resource keeps its name on your phone, your laptop and a server. The olderdid:ad:spelling names the same resource and is accepted forever. Existinghttps://resources keep their URLs. See URLs and identifiers. - Loro CRDTs. Every resource is a Loro document and every commit is a signed Loro delta. Edits made apart merge without conflicts, and rich text is collaborative in real time.
- Sync between your own devices. Devices reconcile drives over WebSockets, over Iroh peer connections, or between browsers over WebRTC. See Atomic Sync.
- Finding a drive’s server from a key. A drive publishes a signed pkarr record that lists the nodes and https origins hosting it. Sign in with your secret on a fresh device and the app finds your data, without you typing an address. The app only connects after the server proves it holds the drive’s genesis certificate.
- Private drives and invites. Every new Agent gets a private drive. Shared resources arrive through invites listed there.
- Schemas as ontologies.
atomic-cli schema push | lock | check | diffturns a JSON Schema or ontology file into an ordinary Atomic ontology, with content-addressed properties and class constraints. - Apps. WASM apps add views, tables, forms and more. See Apps.
- Desktop and phone apps. A desktop app (macOS, Windows, Linux) that updates itself, and a Flutter app for Android and iOS.
The CHANGELOG lists every change, beta by beta.
Upgrading a self-hosted AtomicServer from 0.40
Read this before you replace the binary or the Docker image.
- Back up your store, and check free disk. On the first start, 0.41 migrates a sled store (0.40 and earlier) to redb, and renames the old directory to
sled.bak. During the migration both copies exist, so you need room for about twice your store. Keep your own copy of the store directory, too. - Allow time for the first start. The migration rewrites every resource into its new binary format. A large store can take ten minutes or more before the server answers. Don’t let a health check kill it halfway.
- Set
ATOMIC_HOME_DRIVEif/should show your data. In 0.41,/shows the sign-in / welcome flow unless you name a drive, for exampleATOMIC_HOME_DRIVE=https://example.com/. That drive must be readable by the public Agent. - Update your clients together with the server. Commits that use the old
set/remove/pushfields are rejected: commits now carry a Loro delta. Use@tomic/lib,@tomic/react,atomic_libandatomic-cli0.41. - Check removed or changed options.
- Vector search is opt-in: pass
--enable-vector-index(and build with--features vector-search). - The
/versionand/all-versionsendpoints are gone. History comes from the Loro oplog (resource.getLoroHistory()) and/history-attribution. - Write endpoints are rate limited, and a busy node answers
503withRetry-After(--commit-soft-limit,--commit-hard-limit).
- Vector search is opt-in: pass
- Plan for no way back. 0.40 cannot read a redb store, and a node from before 0.41 cannot read the compact commit rows 0.41 writes. To roll back, restore the backup from step 1 and lose what was written since.
If the server does not come back as expected, see FAQ & troubleshooting.
Upgrading apps built on @tomic/lib
- A
Storeworks without a server. Create an Agent and a Drive locally, persist them, and add a server later to sync. The local-first guide walks through it. - Treat subjects as opaque strings. They can be
atomic:,did:ad:orhttps://, and the same resource can arrive in more than one spelling. Normalize them withcanonicalIdentifier()before comparing, and compare agents withsameAgent(); don’t use===on raw strings. - Write through
resource.set()andresource.save(). Hand-built commits withset/removefields no longer work.