docs/core/virtual-sidecars.mdx
The Virtual Sidecar System (VSS) manages derivative data associated with your files - thumbnails, OCR text, video transcripts, embeddings, and other metadata-rich artifacts.
Content-Scoped: Sidecars are linked to file content, not paths. Multiple copies of the same file share one set of sidecars.
Non-Destructive: Spacedrive never modifies your original files during indexing.
Portable: All managed sidecars live in .sdlibrary/sidecars, making your entire setup portable.
The VSS handles two types of sidecars:
Managed Sidecars - Spacedrive-generated derivatives stored in .sdlibrary/sidecars/:
.webp).mp4).json).srt)Reference Sidecars - Pre-existing files treated as sidecars:
source_entry_id in databaseAll sidecars are stored in a sidecars directory within the .sdlibrary. The path to a sidecar is deterministic and is derived from the content UUID of the file it is associated with, the kind of sidecar, and a variant.
A typical path looks like this:
.sdlibrary/
sidecars/
content/
{h0}/{h1}/{content_uuid}/
thumbs/{variant}.webp
proxies/{profile}.mp4
transcript/{variant}.srt
ocr/default.json
{h0}/{h1}: These are the first two byte-pairs of the content UUID, used for sharding the directory structure to ensure good filesystem performance at scale.{content_uuid}: The unique identifier of the content the sidecar is associated with.thumbs/{variant}.webp: An example of a thumbnail sidecar.The VSS uses two tables in the Spacedrive database:
sidecars: This table tracks all the sidecars that have been generated or are pending generation. It stores information like the content UUID, kind, variant, format, path, size, and status.sidecar_availability: This table tracks which devices in your library have a copy of a particular sidecar. This is used to avoid regenerating sidecars that already exist on another device.1. Identification
sidecars tablesidecar record with source_entry_id pointing to original file2. Generation
3. Recording
sidecar_availability table for current device4. Syncing
The VSS is partially implemented. Here is a summary of the current status:
SidecarManager service.sidecars and sidecar_availability.bootstrap_scan function to synchronize the database with the filesystem.sidecars directory is needed for real-time updates.The SidecarManager provides a set of APIs for interacting with the VSS. These are primarily for internal use by other Spacedrive services, but they can also be used for development and debugging.
sidecars.presence(content_uuids, kind, variants): Checks for the presence of sidecars for a given set of content UUIDs.sidecars.path(content_uuid, kind, variant): Gets the local path to a sidecar, or enqueues it for generation if it doesn't exist.sidecars.reconcile(): Triggers a bootstrap scan to reconcile the database with the filesystem..sdlibrary can be moved/backed up as one unit