Skip to content

Instantly share code, notes, and snippets.

@hallojoe
Created January 27, 2026 08:52
Show Gist options
  • Select an option

  • Save hallojoe/a7b093ffe7ef337475c7a2915cb5d4f2 to your computer and use it in GitHub Desktop.

Select an option

Save hallojoe/a7b093ffe7ef337475c7a2915cb5d4f2 to your computer and use it in GitHub Desktop.
Umbraco LuceneDirectoryFactory and LocalTempStorageLocation Lookup

Umbraco – Matrix: what to set per environment (Examine + temp)

This guide is a quick lookup matrix for:

  • Umbraco:CMS:Examine:LuceneDirectoryFactory
  • Umbraco:CMS:Hosting:LocalTempStorageLocation

Rule of thumb

  • On‑prem single instance: Default / Default
  • Azure App Service: EnvironmentTemp + (SyncedTemp... for single/admin, Temp... for public scale‑out)
  • On‑prem load balanced: usually EnvironmentTemp + Temp... on CD (local indexes per node)

Matrix: what to set per environment

Scenario LuceneDirectoryFactory LocalTempStorageLocation Notes / rationale
1) On‑prem, single instance (CM+CD in same instance) Default Default Simple setup. Indexes live under umbraco/Data/TEMP/ExamineIndexes.
2) Azure App Service, single instance (CM+CD in same instance) SyncedTempFileSystemDirectoryFactory EnvironmentTemp Index runs from machine temp and is synced back to umbraco/Data/TEMP/ExamineIndexes to allow restore after recycle.
3) Azure App Service “load‑balanced‑ish” (Admin/CM separate, Public/CD scalable) Admin/CM (single): SyncedTempFileSystemDirectoryFactory Public/CD (multi): TempFileSystemDirectoryFactory EnvironmentTemp (both) Admin must be single instance (scale up), Public can scale out.
4) On‑prem load balanced (CM on its own server + multiple CD servers) Typical: CM = SyncedTempFileSystemDirectoryFactory, CD = TempFileSystemDirectoryFactory Typical: EnvironmentTemp If umbraco/Data/TEMP is ever shared or replicated, CDs should not sync indexes back to disk.

Quick rules

Choose LuceneDirectoryFactory like this

  • Default: only when you have one node and everything is local.
  • TempFileSystemDirectoryFactory: best for multiple nodes, keeping local indexes per node (avoids shared/replicated TEMP).
  • SyncedTempFileSystemDirectoryFactory: useful when you want to run from temp and sync back to umbraco/Data/TEMP/ExamineIndexes (typically Azure single/admin or CM).

Choose LocalTempStorageLocation like this

  • Default: often fine for on‑prem single instance.
  • EnvironmentTemp: good choice when temp files should be local per machine (Azure and often load‑balanced setups).

Configuration examples (copy/paste)

1) On‑prem single instance

{
  "Umbraco": {
    "CMS": {
      "Hosting": { "LocalTempStorageLocation": "Default" },
      "Examine": { "LuceneDirectoryFactory": "Default" }
    }
  }
}

2) Azure single instance

{
  "Umbraco": {
    "CMS": {
      "Hosting": { "LocalTempStorageLocation": "EnvironmentTemp" },
      "Examine": { "LuceneDirectoryFactory": "SyncedTempFileSystemDirectoryFactory" }
    }
  }
}

3) Azure load balanced (Admin vs Public)

Admin/CM (single):

{
  "Umbraco": {
    "CMS": {
      "Hosting": { "LocalTempStorageLocation": "EnvironmentTemp" },
      "Examine": { "LuceneDirectoryFactory": "SyncedTempFileSystemDirectoryFactory" }
    }
  }
}

Public/CD (multi):

{
  "Umbraco": {
    "CMS": {
      "Hosting": { "LocalTempStorageLocation": "EnvironmentTemp" },
      "Examine": { "LuceneDirectoryFactory": "TempFileSystemDirectoryFactory" }
    }
  }
}

4) On‑prem CM + multiple CD servers (typical)

CM:

{
  "Umbraco": {
    "CMS": {
      "Hosting": { "LocalTempStorageLocation": "EnvironmentTemp" },
      "Examine": { "LuceneDirectoryFactory": "SyncedTempFileSystemDirectoryFactory" }
    }
  }
}

CD:

{
  "Umbraco": {
    "CMS": {
      "Hosting": { "LocalTempStorageLocation": "EnvironmentTemp" },
      "Examine": { "LuceneDirectoryFactory": "TempFileSystemDirectoryFactory" }
    }
  }
}

Notes for on‑prem CM + CD setups

If CD nodes are fully isolated (no file sync or shared storage), running SyncedTemp... on CDs can work, but is usually unnecessary. If umbraco/Data/TEMP is ever shared or replicated, CDs should switch to TempFileSystemDirectoryFactory to avoid file locking and index corruption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment