# How does Synchting handle symbolic links?

**URL:** https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985
**Category:** General
**Created:** [April 21, 2024, 5:06pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985 "2024-04-21T17:06:50Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Eli123](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/e/e36b37/32.png) [@Eli123](https://forum.syncthing.net/u/Eli123)
#### Post date: [April 21, 2024, 5:06pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/1 "2024-04-21T17:06:50Z")

</div>

It looks like it depends on file system, operating system etc. Here is what I find in the docs:

- Symbolic links (synced, except on Windows, but never followed)

Is there a workaround to follow the symbolic links?

I see this post, but it’s inconclusive

> [@Option to follow directory junctions / symbolic links?](https://forum.syncthing.net/t/option-to-follow-directory-junctions-symbolic-links/14750/156):
>

The symlink links to outside the Synchting folder. I want when the source data is updated, the actual data is synced in Synchting folder of the other peer (not just a link that points to nowhere).

Can someone clarify the situation as of 2024.

---

<div class="post-metadata">

### Author: ![gadget](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@gadget](https://forum.syncthing.net/u/gadget)
#### Post date: [April 21, 2024, 5:56pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/2 "2024-04-21T17:56:48Z")

</div>

> [@Eli123](#):
>
> It looks like it depends on file system, operating system etc. Here is what I find in the docs:

Yes. For example, FAT-based filesystems don’t support symbolic or hard links.

> [@](#):
>
> The symlink links to outside the Synchting folder. I want when the source data is updated, the actual data is synced in Synchting folder of the other peer (not just a link that points to nowhere).

The scenario you describe above is unsupported in any combination of operating system and filesystem. If it was an option in Syncthing, there would be the question of what happens in the default “Send & Receive” mode when one side has a symbolic link while the other side doesn’t (just one of many issues).

What exactly is it that you’re trying to accomplish on the destination device?

---

<div class="post-metadata">

### Author: ![Eli123](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/e/e36b37/32.png) [@Eli123](https://forum.syncthing.net/u/Eli123)
#### Post date: [April 21, 2024, 6:38pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/3 "2024-04-21T18:38:31Z")

</div>

Synchting syncs a folder in peer A to a folder in peer B. How do you sync a specific file in peer A, for example /etc/foo, to a file in peer B, for example, ~/Sync/foo?

In general, I want to sync assorted files and folders in peer A (various folders, specific dot files or files in /etc/ and so on) to the Synchting folder in peer B. I thought of creating symbolic links from those files and folders to the Synchting folder in peer A. I was hoping that Synchting will follow the links and syncs them somewhere in peer B. For example, /etc/foo is linked to ~\Sync\foo.ln in peer A which is then synced to ~\Sync\foo (actual file not a symbolic link) in peer B. The sync will be one way. A two way sync could also be implemented, but is more complicated.

---

<div class="post-metadata">

### Author: ![gadget](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@gadget](https://forum.syncthing.net/u/gadget)
#### Post date: [April 21, 2024, 6:58pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/4 "2024-04-21T18:58:26Z")

</div>

> [@Eli123](#):
>
> Synchting syncs a folder in peer A to a folder in peer B. How do you sync a specific file in peer A, for example /etc/foo, to a file in peer B, for example, ~/Sync/foo?

Syncthing works relative to a designated starting path, so device B doesn’t care that its `~/Sync/` is receiving files from `/etc/` on device A.

Then for filtering out all but specific files from a directory/folder, see: [https://docs.syncthing.net/users/ignoring.html](https://docs.syncthing.net/users/ignoring.html)

> [@](#):
>
> In general, I want to sync assorted files and folders in peer A (various folders, specific dot files or files in /etc/ and so on) to the Synchting folder in peer B. I thought of creating symbolic links from those files and folders to the Synchting folder in peer A. I was hoping that Synchting will follow the links and syncs them somewhere in peer B. For example, /etc/foo is linked to ~\Sync\foo.ln in peer A which is then synced to ~\Sync\foo (actual file not a symbolic link) in peer B. The sync will be one way. A two way sync could also be implemented, but is more complicated.

If `/etc/` and `~/Sync/` are in the same filesystem, one option is to use hardlinks instead of symlinks.

But if `~/Sync/` is on a different filesystem, one option is bind mounts (i.e. `mount --bind`).

_(Note that it’s spelled “Syncthing” and not “Synchting”. 😏)_

---

<div class="post-metadata">

### Author: ![es20490446e](https://forum.syncthing.net/user_avatar/forum.syncthing.net/es20490446e/32/6658_2.png) [@es20490446e](https://forum.syncthing.net/u/es20490446e)
#### Post date: [April 21, 2024, 8:07pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/5 "2024-04-21T20:07:29Z")

</div>

A trick I use is to link through a shell-script.

- [Example](https://gitlab.com/es20490446e/repoInfo/-/blob/master/root/usr/bin/repoInfo?ref_type=heads)

---

<div class="post-metadata">

### Author: ![jojoharry16](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jojoharry16](https://forum.syncthing.net/u/jojoharry16)
#### Post date: [April 12, 2026, 12:56pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/7 "2026-04-12T12:56:38Z")

</div>

Could you kindly explain this shell script? I don’t quite understand what it’s meant to do or how that gets around the Syncthing limitations

---

<div class="post-metadata">

### Author: ![gadget](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@gadget](https://forum.syncthing.net/u/gadget)
#### Post date: [April 15, 2026, 2:30am UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/8 "2026-04-15T02:30:36Z")

</div>

> [@jojoharry16](#):
>
> Could you kindly explain this shell script?

As-is, the shell script shared via the link above requires a very user-specific environment, so it’s not likely to work out of the box on a random Un\*x system.

> [@](#):
>
> I don’t quite understand what it’s meant to do or how that gets around the Syncthing limitations

I hesitate to call it a limitation _in_ Syncthing because there are all kinds of limitations _outside_ of Syncthing regarding links.

If the goal is to sync assorted files/directories that are spread across available storage on device A, and have them deposited into a single destination directory on device B, the simplest solution is to reverse the direction of the symlinks.

For example, if device A has the following files…

```plaintext
/home/user/Documents/notes.txt
/home/user/Music/song.mp3
/home/user/Pictures/pic.jpg

```

… with the goal of ending up with the following on device B…

```plaintext
/home/user/Sync/notes.txt
/home/user/Sync/song.mp3
/home/user/Sync/pic.jpg

```

… on device A, set up a `/home/user/Sync` directory like this…

```plaintext
/home/user/Sync/notes.txt
/home/user/Sync/song.mp3
/home/user/Sync/pic.jpg

```

_(Note how on device A it looks just like it does on device B. Syncthing syncs a single folder on both ends.)_

… then add symlinks as needed:

```plaintext
/home/user/Documents/notes.txt ➛ /home/user/Sync/notes.txt
/home/user/Music/song.mp3 ➛ /home/user/Sync/song.mp3
/home/user/Pictures/pic.jpg ➛ /home/user/Sync/pic.jpg

```

---

<div class="post-metadata">

### Author: ![jojoharry16](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/j/4bbf92/32.png) [@jojoharry16](https://forum.syncthing.net/u/jojoharry16)
#### Post date: [April 17, 2026, 1:21pm UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/9 "2026-04-17T13:21:00Z")

</div>

Well here’s my use case, so there’s a complete understanding:

I have a tablet (Device A) that I want to use as a photo frame, but it doesn’t have enough storage to hold all my photos. On my PC (Device B) I have 2 hard drives with photos, all sorted by date, event, family, etc.

I want to have a folder on Device B that syncs to Device A so that, every week or so, I can add links to the photos I want shown on the photo frame. It’s not reasonable to add links the way you mentioned in this case, only to move them back to their original location and so on.

In my case I think I will just create copies of the photos into the shared directory, but if you have a suggestion for a more cohesive solution, even if unrelated to SyncThing, I’d be interested to learn about it.

---

<div class="post-metadata">

### Author: ![gadget](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@gadget](https://forum.syncthing.net/u/gadget)
#### Post date: [July 9, 2026, 3:06am UTC](https://forum.syncthing.net/t/how-does-synchting-handle-symbolic-links/21985/10 "2026-07-09T03:06:06Z")

</div>

> [@jojoharry16](#):
>
> I want to have a folder on Device B that syncs to Device A so that, every week or so, I can add links to the photos I want shown on the photo frame. It’s not reasonable to add links the way you mentioned in this case, only to move them back to their original location and so on.

_(Sorry, I only just saw your post a few minutes ago. It sounds like you were referring to my solution above, but because your reply was to the thread instead of my post, I didn’t get a notification.)_

Your specific use case isn’t the same as the OP’s, so I agree that flipping the folder and symlinks wouldn’t work. However, you didn’t mention the OS you’re using, but if it’s Windows, which Syncthing doesn’t support symlinks on, that alone would’ve been a deal breaker.

> [@](#):
>
> In my case I think I will just create copies of the photos into the shared directory, but if you have a suggestion for a more cohesive solution, even if unrelated to SyncThing, I’d be interested to learn about it.

Assuming that your PC is running Windows and the two drives are NTFS volumes, set up folders (e.g. D:\Photo\_Frame, E:\Photo\_Frame) and create [hard links](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mklink) to each photo that Syncthing should sync to the photo frame – e.g.:

```plaintext
mklink /h D:\Photo_Frame\2026-07-08.beach.jpg D:\Photos\2026\07\08\beach.jpg

```

The reason for the separate folders is because hard links cannot span volumes, they can only point to a file or directory that’s on the same volume, so a single folder hard linking to files on both D: and E: isn’t an option. If your photo frame support folders like most do, syncing two folders won’t be a problem.

Syncthing follows hard links and syncs the target file, so it’s as though the photos were copied to D:\Photo\_Frame and E:\Photo\_Frame.
