How to Sync Logseq Plugins, Themes and Settings Across Multiple Devices
TL;DR: Sync the .logseq
directory (including settings, themes, plugins, config, preferences.json) across devices and create soft links for these setting files.
Logseq, a robust platform for knowledge management and note-taking, offers users the ability to install a wide array of plugins to enhance productivity. However, these plugins and their associated settings are device-specific and do not automatically synchronize across different devices. This guide provides a detailed walkthrough on how to synchronize your Logseq plugins and settings across multiple devices.
This guide primarily focuses on synchronizing plugins and settings, excluding the actual pages, blocks, or graphs, as they usually have their own synchronization methods.
Assuming you are starting from your main machine, this guide will help you install and synchronize all your settings and plugins of Logseq to a new machine.
Step 1: Locate the .logseq Directory
The first step involves locating the .logseq
directory on your device (your main machine). This directory houses all Logseq plugins and settings. The location of this directory varies depending on the operating system but is typically found in $HOME:
- Linux:
$HOME/.logseq
- macOS:
$HOME/.logseq
- Windows:
%USERPROFILE%/.logseq
Step 2: Backup the .logseq Directory
Once you've located the .logseq
directory, the next step is to create a backup. (It's crucial to create a backup every time you plan to migrate or make any significant changes). Copy the .logseq
directory, excluding the graphs
and git
sub-folders, to your backup location, which is usually where your Logseq pages and content are located.
For instance, I store all my Logseq pages in my Dropbox and manage their versions by pushing them to GitHub. You can see my settings and plugins in my GitHub repository (opens in a new tab).
Step 3: Transfer the .logseq Directory to the New Device
To use your plugins and their settings on another device, copy or synchronize (using your preferred method) the .logseq
directory to your new device.
Step 4: Create Soft Links
The final step is creating soft links to manage the the .logseq
folder. This ensures that these configuration files remain consistent across different computers.
You can refer to my bash script (opens in a new tab) for creating soft links:
current_dir="$(pwd)/.logseq"
target_dir="${HOME}/.logseq"
ln -s ${current_dir}/preferences.json ${target_dir}
ln -s ${current_dir}/config ${target_dir}
ln -s ${current_dir}/plugins ${target_dir}
ln -s ${current_dir}/settings ${target_dir}
Finally, when you open Logseq on your new device, you will find everything synchronized seamlessly!
References: