# Sb\_space\_ignore

**URL:** https://community.silverbullet.md/t/sb-space-ignore/2566
**Category:** Edge
**Created:** [June 30, 2025, 5:15pm UTC](https://community.silverbullet.md/t/sb-space-ignore/2566 "2025-06-30T17:15:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gregorybleiker](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/g/b38774/32.png) [@gregorybleiker](https://community.silverbullet.md/u/gregorybleiker)
#### Post date: [June 30, 2025, 5:15pm UTC](https://community.silverbullet.md/t/sb-space-ignore/2566/1 "2025-06-30T17:15:32Z")

</div>

I can’t get SB\_SPACE\_IGNORE to do anything (either edge or v2). I have set it to “private/\*”, but the silverbullet instance happily serves files under the `space/private` directory

---

<div class="post-metadata">

### Author: ![MrMugame](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mrmugame/32/358_2.png) [@MrMugame](https://community.silverbullet.md/u/MrMugame)
#### Post date: [June 30, 2025, 5:38pm UTC](https://community.silverbullet.md/t/sb-space-ignore/2566/2 "2025-06-30T17:38:33Z")

</div>

Did you by chance sync the space fully before you set the environment variable?

And if you just mean “is able to read” by serve, then yeah, it will only stop SB from knowing they exist, it can still read/write to them.

---

<div class="post-metadata">

### Author: ![lochel](https://community.silverbullet.md/user_avatar/community.silverbullet.md/lochel/32/912_2.png) [@lochel](https://community.silverbullet.md/u/lochel)
#### Post date: [August 5, 2025, 5:46pm UTC](https://community.silverbullet.md/t/sb-space-ignore/2566/3 "2025-08-05T17:46:35Z")

</div>

What’s the intended use case for `SB_SPACE_IGNORE`? I had assumed SilverBullet would avoid both reading from and writing to such paths, yet that doesn’t seem to be the case.

---

<div class="post-metadata">

### Author: ![lochel](https://community.silverbullet.md/user_avatar/community.silverbullet.md/lochel/32/912_2.png) [@lochel](https://community.silverbullet.md/u/lochel)
#### Post date: [August 7, 2025, 6:20pm UTC](https://community.silverbullet.md/t/sb-space-ignore/2566/5 "2025-08-07T18:20:44Z")

</div>

@zef, could you please share your thoughts on this?

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [August 7, 2025, 6:45pm UTC](https://community.silverbullet.md/t/sb-space-ignore/2566/6 "2025-08-07T18:45:29Z")

</div>

The original use case was: “I have way too many files to sync, allow me to exclude some” and that’s what it does. It’s fairly similar to having a `.gitignore` file. Files matching SB\_SPACE\_IGNORE do not appear in internal _file listings_, so they’re effectively hidden. I would indeed imagine that if you forcefully reading or writing to specific files, that’s not blocked, that wasn’t really a consideration.

I wouldn’t oppose to a PR that would somehow block reads and writes, though. I don’t think that would affect any existing users of this feature. The implementation lives here: [silverbullet/lib/spaces/filtered\_space\_primitives.ts at main · silverbulletmd/silverbullet · GitHub](https://github.com/silverbulletmd/silverbullet/blob/main/lib/spaces/filtered_space_primitives.ts) as you can see, the only place this filter is applied is in `fetchFileList` right now, it could also be checked on read and write.
