Skip to content

How to Sync an Obsidian Vault Between Windows 11 and Linux (Debian LXC) Using Syncthing for n8n Automations

Why I needed a Cross-Platform Obsidian Sync Setup

Keeping an Obsidian vault synced between Windows and Linux can be tricky if you don’t want to rely on third‑party cloud services like Dropbox or Google Drive. I ran into this challenge while trying to keep my various vaults consistent across my Windows 11 desktop (where I do most of my vault work) and a Debian Linux LXC running on Proxmox, where I host my automation tools. My goal wasn’t just simple note syncing, I wanted to unlock powerful n8n workflows that process and automate my notes directly from the server.

After brainstorming a few options, I landed on Syncthing as the perfect solution. It’s lightweight, private, and runs quietly in the background without any dependency on external services. Even better, I figured out how to start Syncthing automatically on Windows 11 without the annoying terminal popup, while also configuring a persistent Syncthing systemd service inside my Debian LXC. In this post, I’ll walk you through exactly how I set it up and how it powers my Obsidian + n8n automation workflow.

Setting Up the Environment

My Setup: Windows 11, Debian LXC on Proxmox, and Obsidian

My environment is nothing fancy. A simple Windows 11 Pro desktop PC, and my Proxmox device running on old hardware. I have a few LXC's on the device, so my one for n8n isn't alone. Each is accessible through my firewall even though I have my network segmentated with VLANs.

Why Syncthing Instead of Cloud-Based Sync Options

I chose to use Syncthing instead of alternative options for the simple reason of self-hosted and private. Plus who doesn't like having a bit of fun with configuration and system administration tasks? Additionally, I wanted a stand-alone Syncthing setup, not just using a community plugin within Obsidian. If I'm going to use a tool I want to enact full control with that tool for how I need it.

Installing and Configuring Syncthing on Windows 11

Step 1: Download and Install Syncthing on Windows 11

Head on over to the official downloads page here: syncthing.net/downloads/. I chose the Base Syncthing, which is just a zip file with everything needed to run it on my Windows 11 PC. All you need to do after downloading is unzip the folder.

For me, I took an additional step and copied over the syncthing folder to the following location C:\opt\syncthing\ as that is the folder structure I'm used to for installing software.

I should point out, I use the term "install" loosely here, because we aren't actually installing anything. Syncthing is just an executable that we run after it is download.

Step 2: Run Syncthing Automatically at Windows Startup

Per the documentation, there are multiple ways to achieve running Syncthing automatically at startup in Windows 11. I took the approach of creating a task in Task Scheduler.

Here is the rather simple way of doing this using PowerShell:

<#
.SYNOPSIS
    Creates or updates a scheduled task to run Syncthing at user login.
#>

param(
    [string]$ExePath = "Powershell.exe",
    [string]$TaskName = "SyncthingStartup"
)

try {
    if (-not (Test-Path $ExePath)) {
        Write-Error "Syncthing executable not found at $ExePath"
        exit 1
    }

    $userName = "$env:USERNAME"
    $action = New-ScheduledTaskAction -Execute $ExePath -Argument "-WindowStyle Hidden -Command "Start-Process 'C:\opt\syncthing\syncthing.exe' -ArgumentList '--no-console'""
    $trigger = New-ScheduledTaskTrigger -AtLogOn
    $principal = New-ScheduledTaskPrincipal -UserId $userName -LogonType Interactive
    $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable

    # Remove existing task if it exists
    if (Get-ScheduledTask -TaskName $TaskName -ErrorAction SilentlyContinue) {
        Unregister-ScheduledTask -TaskName $TaskName -Confirm:$false
    }

    Register-ScheduledTask -TaskName $TaskName -Action $action -Trigger $trigger -Principal $principal -Settings $settings -Description "Start Syncthing at user login" -Force
    Write-Output "Scheduled task '$TaskName' created successfully."
}
catch {
    Write-Error "Failed to create scheduled task: $_"
}

Running the Synchthing executable by way of Powershell.exe helped me permanently solve the issue of having a Terminal popup when it ran. This is because the option --no-console is not reliable on Windows 11, and may still cause the launcher to open a console window.

The other part to fixing this was to set your Default terminal application to Windows Control Host rather then the default Let Windows decide.

Doing those 2 things made the task schedule work without a Terminal window persistently being opened.

Installing and Running Syncthing on Debian LXC (Proxmox)

There's a setup guide on https://apt.syncthing.net/ you can follow for this step. I'll briefly detail it below.

Step 1: Add Official Syncthing Repository on Debian

Add the release PGP key and the stable-v2 channel to your apt sources:

sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg

echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable-v2" | sudo tee /etc/apt/sources.list.d/syncthing.list

Step 2: Install Syncthing with apt

To install, perform an sudo apt update and then sudo apt install syncthing

Step 3: Running Syncthing as systemd Service in Debian

There is a keen distinction to understand here. You can run Syncthing as a systemd service as either a User Service, or as a System Service.

Running as a User Service ensures that Syncthing only starts after the user has logged into the system.

Running as a System Service ensure that Syncthing starts at system startup.

For my setup, I need the latter and did this setup to enable and run Syncthing as a System Service for my user:

sudo systemctl enable syncthing@doug.service
sudo systemctl start syncthing@doug.service

replace doug with your username in this case. The reason we perform the system service execution this way is because Syncthing is setup and configured per user, not per system. That's why we don't just run systemctl start syncthing.service here.

Connecting Devices and Syncing the Obsidian Vault

Finding and Adding Syncthing Device IDs

Syncthing is great for security in that it requires you to perform the setup on both devices that you want to communicate and sync files/folders with. This starts with configuring the Device IDs for each.

This means I would need the Device ID for my Windows 11 PC, and for my Debian LXC. You can find each easily by just running the syncthing executable on each device. In Windows 11, you can just double click on the syncthing.exe executable and it will open up in the Terminal. What you are looking for is the line with INFO: My ID: and what follows would be the Device ID. Copy this and note which device it is for.

You can do the same on Debian with just the syncthing command at the CLI. This too will show a similar line to above with the Device ID.

For Windows 11, with the syncthing.exe still running, open up your browser to the following address: http://localhost:8384. The web GUI runs by default and this is my chosen method in Windows 11 since I'll be doing most of the configuration here going forward. Although I would like to automate these steps in the future so using the CLI is on the horizon for me (more on that to come).

In the bottom right just click the + Add Remote Device button, type in a name and paste in the Device ID for your Debian LXC. It won't actually connect successfully until we do the same on the Debian LXC. Remember, we have to configure each device!

For the Debian LXC, I don't have access to any GUI, so it's CLI time! Here is the flow I did to get things configured:

# Add the Windows 11 Device using the Device ID:
syncthing cli config devices add --device-id <WIN11_DEVICE_ID>

If you switch back to your Windows 11 and the Syncthing GUI, you should now see the remote device connected. If not, then you'll have a bit of logs to dig through!

Sharing the Obsidian Vault Folder from Windows to Linux

Before sharing my Obsidian Vault folder from Windows to the Debian LXC, you'll need to check to ensure the default folder path is where you want it to be. In my case I wanted the default folder path to be in /opt/syncthing/ and not the default ~.

To do this, open up the configuration file in your favorite editor (vim in my case) and do the following:

vim ~/.local/state/syncthing/config.xml

# Search for <defaults>, first press /
/<defaults>

# make sure the 'path="~"' is the location you want for default folder paths

So my default folder setting looks like the following now:

<folder id="" label="" path="/opt/syncthing/" type=...>

The next thing was to adjust the autoAcceptFolders setting. I went back into the configuration file on my Debian LXC, found the location for my Windows 11 Device (search for the Device ID), and changed the value for <autoAcceptFolders></autoAcceptFolders> from false to true. This file is located in ~/.local/state/syncthing/config.xml

Now all I needed to do was add the folder from the GUI on my Windows 11 PC, and it would automatically get added and synced to my Debian LXC.

Doing this in the GUI is pretty straighforward. Select +Add Folder on the left, type a folder label, and specify the folder path. Then select the "Sharing" tab at the top, and click the box next to the device you want to share the folder with.

If everything was configured correctly on both devices, you should now see your shared folder from Windows 11 on your Debian LXC.

Handling the '.obsidian' Folder and Ignore Patterns

Since I won't be using my Obsidian Vaults on my Debian LXC, I do not need to sync the .obsidian folder. This avoids syncing my UI layout, workspace state, community plugin settings, and several other things that would be important if I planned on opening and using the vault on that device.

But since I'm not, I'm adding the ignore pattern .obsidian/ to my .stignore. You can also do this in the GUI, when editing the folder, under the "Ignore Patterns" tab.

Verifying Syncthing Sync Works

To verify, I used a combination of seeing what state the GUI displayed for both the Folder being shared, and the Device. Both should say "Up to Date".

You can also check your sync location on Debian LXC and verify that your obsidian vault is there now.

An additional step to test would be creating a new file on each device and confirming that is appears on the other device.

Testing File Sync Between Windows 11 and Debian LXC

Common Issues

The only issue I encountered was being too bold and creating the folder on my Debian LXC ahead of time. This wouldn't let Syncthing create the folder due to the wrong permissions.

However, the parent folder needs to provide read+write access for the user if you are running Syncthing as a user service and not a system service.

Automating Obsidian with n8n After Sync

Now, if your obsidian vault is correctly synced to your Debian LXC, and you happen to also be running n8n on that LXC, then you've got a strong case of building some wicked automation sequences to write files to your obsidian vault.

In my case, I wanted to automate my Job Hunt tracking. More On this in another post. For now just relish in the fact you have Syncthing setup, working, and can build whatever you would like with n8n to automate things in your vault!

Conclusion

By combining Syncthing with a Windows 11 workstation and a Debian LXC running on Proxmox, I now have a seamless way to keep my Obsidian vaults perfectly in sync across platforms. More importantly, this setup gave me the foundation to build powerful n8n automations that process and extend my notes without ever leaving my local environment. No cloud lock‑in, no subscription fees — just full control over my data and workflows.

If you’ve been looking for a reliable way to sync your Obsidian vaults between Windows and Linux, I highly recommend giving Syncthing a try. Once you have syncing in place, the possibilities are endless when paired with n8n workflows. From automated task management to smart daily note summaries and integrations with your favorite tools.