Skip to content

Runtime Extraction & Cache

When a Kiln binary executes, it unpacks embedded server files into an extraction directory.


By default, files are extracted to the directory containing the binary (path.dirname(process.execPath)).

/app/
├── app # Executable binary
├── .kiln-extracted # Build stamp hash
├── .next/ # Extracted runtime chunks
└── node_modules/# Extracted dependencies

Customizing Extraction Directory (KILN_RUNTIME_DIR)

Section titled “Customizing Extraction Directory (KILN_RUNTIME_DIR)”

If you prefer keeping your application directory clean and extracting files to a system temp folder or RAM-backed tmpfs:

Terminal window
KILN_RUNTIME_DIR=/tmp/app-runtime ./bin/app
Terminal window
$env:KILN_RUNTIME_DIR = "$env:TEMP\app-runtime"
.\bin\app.exe

Kiln writes a .kiln-extracted file containing the deterministic SHA-256 build hash. On subsequent runs:

  1. It reads .kiln-extracted.
  2. Matches the hash with the binary’s embedded build stamp.
  3. Skips extraction entirely and boots immediately.