Trying to understand how clients on self-hosted servers can communicate without server

What do you need help with?

Hi,

I have a self-hosted server. I’m an integrations developer for a medium-sized business, so I usually think of achieving parity between clients via event-driven architecture: client 1 submits an update to server A, and that update is sent to other clients when they poll for changes as they visit that page.

I started using Anytype a few months ago to store any intellectual property created for my own company. My Anytype self-hosted server client-config.yml is shared between 5 different clients, all on the same local network. When I completely turn off my server, I’m expecting to see that no clients can update the server, which means I shouldn’t see updates on other clients. But someone on github pointed out that clients can still update each other via P2P protocol, and that’s what happens when I turn off my server. My concern is with sending my intellectual property to the cloud.

How does this work, exactly? Does each client contain a full copy/shadow copy of all data, and the clients coordinate changes between each other? What gets stored in the mongodb or on the server if data retention and change processing occurs between clients?

Thanks

OS

CachyOS, win32 x64 10.0.26200, Android, Synology NAS

Anytype Version

v0.55.5

Network Mode

self-hosted

Technical Information

OS version: win32 x64 10.0.26200
App version: 0.55.5
Build number: build on 2026-06-02 16:45:57 +0000 UTC at #5e888f1b9b8590575ea81da218e95c472daf0fdf
Library version: v0.50.8
Anytype Identity: A7JQCXuoyVNfd5WEcKijWvxJrRVv6SV6NygXuG4f9wQvgjZD

P2P local mDNS based discovery + CRDTs makes it easy on local networks to see each other and coordinating every change to an object. Files are not always part of this except you set the offline access prefs on desktop to unlimited. otherwise it pulls from the devices what’s needed.

Text objects are always synced to all devices. Only attachments are not automatically.

The server then has everything at all times. Also here because of CRDTs it doesn’t matter what device did what change at which time. when all the devices have access to the server again the CRDTs do it’s magic and everything comes together.

Look here for further reference:

As others have pointed out, Anytype is local-first, which is relevant to your question in two ways:

  1. All data is stored locally (unless you set file limits) on device and works offline by default. No internet/lan connection is ever required to access your data.
  2. Users are able to us p2p to sync whenever they don’t have lan/internet access.

This indeed creates a unique issue where, if you’ve made changes to the ACL/permissions of your spaces while users are offline, those changes will not sync until those clients connect back to your network. The consensus/ACL/permissions portion of local-first software is one of the uncomfortable moments that isn’t as smooth as cloud-first software (for obvious reasons).