How to Sync Logseq

Logseq is a bi-directional note-taking software similar to Obsidian. I've been using it sporadically for several years, but syncing/backup can be quite troublesome, especially across multiple devices of different system types. Both Logseq and Obsidian operate by loading a local folder as the note repository, so syncing notes essentially means syncing this folder. However, achieving a seamless experience across different systems and devices can be a bit of a hassle.

Here’s a summary of the various stages I’ve gone through, trying different methods at each stage, none of which worked perfectly. In the end, I opted for the official sync feature, which costs $5 per month.

Syncing Between PCs Using OneDrive

When I first started using Logseq, I only used it on my computer and didn’t even think about checking or taking notes on my phone. At that time, I only needed to sync notes between two PCs. This was relatively simple—just choose a cloud storage service that supports real-time folder syncing, such as OneDrive or Nutstore. I used OneDrive back then, and the syncing was smooth. Since I rarely edited notes on both devices simultaneously, I didn’t encounter major issues.

Syncing Using iCloud

Later, I switched to an iPhone and needed to sync notes between my iPhone and PC. Naturally, I considered using iCloud for syncing, as iCloud can also be installed on Windows for syncing. Initially, I used iCloud to sync between my iPhone and Windows PC.

However, iCloud syncing often caused issues, especially on Windows devices. Sometimes, files would have multiple versions due to sync problems during normal use. Occasionally, a file version would fail to download for unknown reasons. When this happened, Logseq would get stuck trying to download the file, freezing the interface and crashing the program.

To resolve this, I had to manually locate and delete the problematic files in the iCloud storage directory. Obsidian also faces similar issues, but these freezes only occur when opening the software, not during use. Additionally, identifying and deleting duplicate files in the iCloud directory is nearly impossible on mobile devices. If this issue arises while using the app on a phone, it’s essentially unresolvable.

After switching my PC to a Mac, these sync conflicts and multi-version issues largely disappeared. However, I encountered another issue during actual use: file syncing and retrieval could be delayed. For example, if I wrote a journal entry on the computer today, the phone might not detect the update before opening the app. When the app opens, it might create a new note for today, overwriting the computer's entry. Fortunately, Logseq has a bak folder for backups, so the data can be recovered, but it requires manual intervention outside the program.

Git Syncing

Before switching to a Mac, I tried another approach using Git to sync notes due to iCloud’s issues on Windows:

  • Logseq has built-in Git version control capabilities, automatically committing changes at regular intervals (e.g., every minute). On the PC, you can configure Git hooks to automatically push commits to a remote repository.
  • On iOS, I used a-shell and Shortcuts to pull and sync files. Specifically, I used Shortcuts to pull changes when opening Logseq and to commit and push changes when closing the app.

This method allowed syncing notes across devices, but simultaneous edits could still cause issues.

Although the workflow seemed feasible, the actual experience was subpar due to various issues:

  • My remote repository was on GitHub, and pulling changes on mobile often failed due to network issues, preventing the mobile app from syncing to the latest version.
  • Conflicts could arise, requiring manual resolution using Git, which necessitated user intervention.

Syncing Between Android and PC Using Google Drive

When I switched back to an Android phone, iCloud was no longer an option, so I turned to Google Drive. That’s when I realized that most cloud storage services on Android don’t offer native two-way folder syncing like iCloud. To achieve this, I had to use third-party apps (e.g., AutoSync). However, these services had significant drawbacks. First, they required granting full read/write permissions for cloud storage, raising security concerns. Additionally, syncing was slow and prone to failure, as it relied on periodic syncing tasks to fetch the latest files from Drive. After a few attempts, I uninstalled the app and revoked its permissions.

Official Sync Feature

All the aforementioned methods essentially rely on external systems or software to sync the contents of the note folder. This inevitably creates a problem: Logseq itself is unaware of the syncing process or whether the files have been fully synced. Each time the app is opened, it assumes the files are already synced and processes them accordingly. This can lead to simultaneous read/write operations between Logseq and the external system, causing issues. This is the root cause of many of the sync problems mentioned above.

Side note: Obsidian has many internal plugins for syncing. Could Logseq provide a similar plugin-based syncing solution? Why are there so few sync-related plugins for Logseq? Perhaps the developers haven’t opened up the necessary APIs for such capabilities?

After struggling with syncing on Android, I finally decided to pay for the official sync feature. Logseq now offers a sync service that, although still in beta, works seamlessly across devices (Android, Mac, iPad). For just $5 per month, you can enable it. Detailed setup instructions are available in the official documentation. Payment options include credit cards (Visa/Master), Google Pay, or PayPal.

The official sync feature supports syncing up to 10 graphs. On forums like v2ex, some users share their sync slots to save money. While each graph is encrypted with a separate password, sharing slots poses security risks. For instance, creating a graph for someone else requires sharing your account credentials. Additionally, it seems that removing a remote graph doesn’t require a password, potentially allowing malicious deletion of data.

Summary

Sync MethodUse CaseAdvantagesDisadvantages
OneDrive SyncPC-to-PC Sync• Smooth syncing
• Easy to set up
• Minimal conflict issues
• Limited to PC devices
• Limited support for mobile devices
iCloud SynciPhone + PC/Mac• Relatively stable in Mac environments
• Native iOS support
• Prone to file conflicts on Windows
• Sync delays may cause data overwrites
• Difficult to resolve conflicts on mobile
• App may freeze
Git SyncCross-Platform Users• Strong version control
• Supports auto-commits
• Theoretically supports all platforms
• Sync failures due to network issues
• Requires manual conflict resolution
• Complex setup
• Difficult for mobile use
Google Drive + Third-Party SyncAndroid + PC• Supports Android platform• Requires third-party app permissions
• High security risks
• Slow and unreliable syncing
• Only periodic syncing
Official Sync FeatureAll Devices• Built-in, seamless experience
• Supports multiple devices (Android, Mac, iPad)
• Encrypted and secure
• Syncs up to 10 graphs
• Requires payment ($5/month)
• Still in beta
• Slot-sharing poses security risks
  1. For PC-only use: Cloud storage services like OneDrive are sufficient.
  2. For Mac + iOS environments: iCloud is generally usable but watch out for sync delays.
  3. For cross-platform use involving Android: The official sync feature is the best choice. Although it requires payment, it offers the best experience.
  4. For tech-savvy users: Git syncing is an option but requires expertise in conflict resolution.