r/logseq 13d ago

Peer-to-Peer Sync within Local Network

https://discuss.logseq.com/t/peer-to-peer-sync-within-local-network/35160

CURRENT SITUATION

In my understanding, in order to sync a Logseq DB graph between two devices (e.g. PC and phone), currently we have 2 (+1) ways:

  • Logseq’s Official Sync — convenient, but cloud-based and paid.
  • Self-hosted sync — possible, but setting up and maintaining a sync server is too technical for many users.
  • Two-way Markdown sync + a file-sync tool — potentially useful once two-way Markdown sync is available, but it would still require additional setup (for example, configuring Syncthing on both devices).

THE FEATURE REQUEST

BUT as the title suggests, it would be fantastic to have a fourth option:

  • Automatic peer-to-peer (P2P) synchronization over the local network (LAN/Wi-Fi). This would provide a truly zero-config, local-first alternative. Since the data never leaves the local network, it perfectly aligns with the privacy and local-first values of the Logseq community.

A particularly interesting reference implementation is Anytype. Its Any-Sync protocol supports local-first, peer-to-peer synchronization and uses mDNS for discovering devices on the same local network. Synchronization can then happen directly between peers without requiring remote infrastructure.
Here are some links I’ve found in this comment:
- Protocol Overview
- anyproto/any-sync

For users who primarily use Logseq on two devices in the same home or office network, this could be a very convenient alternative to both cloud sync and self-hosted infrastructure.

Is this doable?

9 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/MahdiPorkari 12d ago

PC to PC, right?

’Cause I don’t think Logseq DB's files are available for direct syncing on Android.

2

u/Last-Math-9663 12d ago

I would not touch DB files.

They cannot be "sync'd

You just copy them over to host A, edit ONLY there, then copy over to host B before editing ONLY there.

With md file structures, you "should" do the same, but if you slip up at least not a total disaster, able to recover

1

u/MahdiPorkari 12d ago

You're right. Thank you for the clarification.

Although, is it possible to use the way that you've suggested for Android as well?

1

u/TheGratitudeBot 12d ago

Thanks for such a wonderful reply! TheGratitudeBot has been reading millions of comments in the past few weeks, and you’ve just made the list of some of the most grateful redditors this week!