Data Storage
Everything SeqDesk does with sequencing files hangs off one setting: the sequencing data directory. It is the root that file discovery scans, the root that uploads are written into, and the boundary that every file path is validated against. Until it is set, sequencing files cannot be discovered, linked to samples, uploaded, or fed to a pipeline — which is why the sidebar’s Infrastructure entry flags a missing data path as required.
The screen is Data Storage (/admin/data-storage). It has no sidebar entry
of its own; reach it from Settings → Infrastructure, or from the Data
Storage button on Pipeline Runtime.
Configure it from the server shell
The local SeqDesk command is the shortest post-install path. The installer
creates $HOME/seqdesk/data as a writable starting directory; replace it with
the existing absolute directory used by your facility when appropriate:
seqdesk storage configure "$HOME/seqdesk/data"
seqdesk storage statusconfigure rejects relative paths, the filesystem root, files, unreadable
directories, and missing directories. It does not copy or move existing
sequencing data. Use --create only when a deliberately selected local
directory does not exist:
seqdesk storage configure /srv/seqdesk-data --createThe command updates the active settings.json value and the database
SiteSettings.dataBasePath together, then reports the effective source.
storage status exits non-zero until the configured directory is usable, so it
can also gate deployment automation:
seqdesk storage configure /srv/seqdesk-data --yes --json
seqdesk storage status --jsonThe installer normally records the selected installation, so --dir is not
needed. On a host with multiple installations, select one explicitly:
seqdesk storage status --dir /opt/seqdesk/appA service-level SEQDESK_DATA_PATH remains authoritative. Change or remove
that environment variable and restart the service instead of expecting either
the CLI or Admin page to override it.
How the path is resolved
The value shown in the UI is not necessarily the value the application uses. SeqDesk resolves the directory in this order and stops at the first hit:
Environment or config file
If site.dataBasePath came from SEQDESK_DATA_PATH or from settings.json,
that value wins outright.
The database
Otherwise the value saved by this admin screen is used.
The local development fallback
Otherwise, and only on macOS with NODE_ENV=development, SeqDesk looks for
SEQDESK_LOCAL_TESTDATA_PATH and then ~/testdata, using whichever exists.
The page shows an amber banner when this implicit fallback is in play. This
never happens on a production Linux server.
Nothing
Otherwise the path is unset and file features stay disabled.
The page reports the effective source and does not pretend that a lower priority database value replaced an environment-managed path. Confirm the source under Info → Configuration sources. For a settings-file-managed installation, the CLI keeps the file and database values synchronized.
Setting it up in Admin
Enter the directory
Under Required Configuration, put an absolute path in Sequencing Data
Directory — for example /mnt/sequencing/data. Relative paths are interpreted
differently by shells and service managers, so the current validation accepts
only absolute paths.
Test it
Press Test Path. On success the resolved absolute path and a file count are shown.
Save
Press Save Data Settings.
What Test Path actually checks
It is a cheap sanity check, not a preview of discovery:
- the path exists and is a directory
- the process can read it (
R_OK) - how many files sit directly in the root of that directory, and how many of those match the allowed extensions
Test Path does not recurse. A perfectly good layout of
<base>/run_001/*.fastq.gz reports
No sequencing files found yet because the root itself holds no
matching files. That is not an error — discovery will still find them, at the
configured scan depth.
Failures are reported verbatim: Directory does not exist or is not accessible, Directory is not readable (permission denied), or Path exists but is not a directory.
What SeqDesk writes underneath the path
The directory is not read-only. Plan permissions and backups accordingly.
| Path | Written by | Contents |
|---|---|---|
<base>/… (your own layout) | Nobody — SeqDesk only reads | Sequencer output you place there |
<base>/_uploads/orders/<orderId>/_tmp/ | Resumable upload API | Partial .part chunks while an upload is in flight |
<base>/_uploads/orders/<orderId>/samples/<sample>/reads/ | Browser upload of read files | Finalised uploaded FASTQ files |
<base>/_uploads/orders/<orderId>/samples/<sample>/artifacts/<stage>/ | Artifact upload | Per-sample artifacts such as QC reports |
<base>/_uploads/orders/<orderId>/order-artifacts/<stage>/ | Artifact upload | Order-level artifacts |
<base>/workbench/cache/<provider>/<hash>/ | Workbench imports | Cached provider downloads, reused by content hash |
<base>/workbench/jobs/<jobId>/import.log | Workbench imports | Per-job import log |
Workbench explicitly asserts write access at start-up and fails with
Data base path is not configured. Set it in Admin > Infrastructure before starting Workbench imports. when the path is missing. Filenames written by
SeqDesk are sanitised — anything outside A–Z a–z 0–9 . _ - becomes _, and
each path segment is capped at 120 characters.
Deletion is possible, and it is permanent
Facility admins can bulk-delete sequencing files through
POST /api/files/delete. For each path the endpoint validates that it stays
inside the base directory, clears or removes the Read records that reference
it, then removes the file from disk with fs.rm. There is no trash, no soft
delete, and no undo. Sequencing data is only as safe as your backups.
How discovery scans
Discovery is driven by five settings. Only two of them are editable in the
admin UI; the rest come from settings.json or the environment.
| Setting | UI | Config key | Env variable | Default |
|---|---|---|---|---|
| Sequencing Data Directory | Yes | site.dataBasePath | SEQDESK_DATA_PATH | ./data |
| Allowed File Extensions | Yes, under Advanced Configuration | sequencingFiles.extensions | SEQDESK_FILES_EXTENSIONS | .fastq.gz, .fq.gz, .fastq, .fq |
| Scan depth | No | sequencingFiles.scanDepth | SEQDESK_FILES_SCAN_DEPTH | 2 |
| Ignore patterns | No | sequencingFiles.ignorePatterns | — | **/tmp/**, **/undetermined/** |
| Allow single-end | No | sequencingFiles.allowSingleEnd | SEQDESK_FILES_SINGLE_END | Forced to true |
The Advanced Configuration block is collapsed behind a Show button and
contains only the extensions field. Entries are trimmed, de-duplicated, and get
a leading dot added if you omit one, so typing fastq.gz, fq.gz is fine.
Scan depth
Depth counts the base directory as level 1:
| Depth | Reaches |
|---|---|
1 | files directly in the base directory |
2 (default) | plus one level of subdirectories, e.g. <base>/run_001/sample.fastq.gz |
3 | plus a second level, e.g. <base>/2026/run_001/sample.fastq.gz |
up to 10 | the maximum the loader accepts |
A value outside 1–10 is rejected by config validation with
sequencingFiles.scanDepth must be a number between 1 and 10. Deeper scans
touch more of the filesystem, so raise it only as far as your layout needs.
Ignore patterns
Simple globs matched case-insensitively against the path relative to the
base: ** matches any run of characters, * matches within one path segment.
The defaults skip **/tmp/** and **/undetermined/**, which keeps
demultiplexing leftovers out of the sample-linking UI.
Three behaviours that surprise people
Symlinks are skipped. The scanner reads directory entries without following links, so a symlinked file is neither a file nor a directory to it and is passed over. Mount or copy data into the tree instead of linking it in.
- Files younger than 30 seconds are skipped. Anything whose modification time is within the active-write window is left alone so a half-written file from a running sequencer is never linked to a sample. Rescan a moment later and it appears.
- Scan results are cached for 5 minutes. Repeated scans of the same base path, extensions, depth and ignore patterns are served from an in-memory cache. Newly copied files can take up to five minutes to show up unless the caller forces a refresh. The cache is per-process and is cleared by a restart.
Single-end reads are always included: allowSingleEnd is forced to true when
the setting is read and when it is written, so it cannot be turned off from
the UI, the API, or the config file.
Changing the path after data exists
This is the one genuinely risky operation on this page.
SeqDesk stores file references as paths relative to the base directory. So:
- Moving the whole tree to a new mount point and updating the path keeps every reference valid, because the relative paths are unchanged.
- Pointing at a different tree silently invalidates every stored reference.
Samples keep their
Readrows, but the files behind them no longer resolve; downloads, previews, checksums and pipeline launches fail for existing data.
Before repointing:
Move, do not re-import
Copy or move the existing tree so that the relative layout under the new base is byte-for-byte the same.
Update the path
Change the field, Test Path, and save.
Force a rescan
The five-minute scan cache is keyed on the base path, so a new path is a new cache key and no stale entry survives. Existing pipeline runs already in flight keep the paths they resolved at launch.
Spot-check
Open a sequencing order that already had linked files and confirm the reads still preview and download.
Security model
Path handling is deliberately conservative:
- Every relative path is joined through a helper that rejects absolute paths and
any path containing
.., then verifies the resolved result is inside the base directory. Escaping raisesPath traversal detected: … escapes base path. - File-serving endpoints only serve paths with an allowed extension.
- Symlinks are not traversed, so a link cannot be used to reach outside the base.
- The delete endpoint applies the same containment check before removing anything.
What that model does not give you: per-user file permissions. Any facility admin can read, download and delete anything under the base path, and with department sharing enabled a researcher’s list widens to their department. Use filesystem permissions and a dedicated service account if you need stronger isolation.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Directory does not exist or is not accessible | Wrong path, or not visible from the app host | Check the path on the server; on a container, check the mount |
Directory is not readable (permission denied) | The service account lacks read permission | chmod/chown the tree for the account running SeqDesk |
| Test Path says “No sequencing files found yet” | The test only counts the root | Normal for nested layouts — check discovery instead |
| Files on disk never appear | Below the scan depth, matched by an ignore pattern, an unlisted extension, a symlink, or younger than 30 seconds | Raise the depth, adjust patterns or extensions, replace symlinks, or wait |
| A file appears minutes late | The 5-minute scan cache | Wait it out or restart the app |
| The saved path has no effect | SEQDESK_DATA_PATH or settings.json outranks the database | Change it at the layer that is winning; see Configuration Sources |
| An amber “local macOS development fallback” banner | No explicit path is configured and ~/testdata exists | Enter a real path and save |
| Workbench refuses to start an import | The path is unset, or not writable | Set it, and grant write access |
| Previously linked reads stopped resolving | The base path was repointed at a different tree | Restore the old path, or move the data so the relative layout matches |
See also
- Sequencing Files — how discovered files are linked to samples
- Pipeline Runtime — the run directory, which is a separate path
- Configuration Sources — which layer wins
- Environment Variables — the full
SEQDESK_FILES_*reference