Storage And File Layout
This page documents the important storage paths in an SVRunner deployment. For operations and recovery, the most important concept is that runtime data lives separately from the application build.
Default Runtime Layout
The server derives its runtime storage paths from SVR_SERVER_EXEC_DIR and SVR_SERVER_FILES_DIR.
By default:
SVR_SERVER_EXEC_DIRis the executable directory in productionSVR_SERVER_FILES_DIRdefaults to<exec-dir>/files
From there, the server defines:
SVR_SERVER_ASSETS_DIRas<files-dir>/assetsSVR_SERVER_LOGS_DIRas<files-dir>/logsSVR_SERVER_DATABASE_PATHas<files-dir>/local.db
Most Important Persistent Paths
These are the primary durable runtime paths in a normal deployment:
files/local.dbfiles/assets/files/logs/
These are the paths that matter most for backup, restore, and upgrades.
Configuration File Location
If a .env file is used, the server loads it from:
<exec-dir>/.env
This file should be treated as deployment configuration and preserved accordingly.
Served Build Content
At runtime, the server also serves built application content for:
- the main client app
- the docs site
- the preview app
Those built assets are usually replaceable as part of an upgrade and are not the primary backup target compared with the persistent files/ data.
Static Asset Serving
The /static route is backed by SVR_SERVER_ASSETS_DIR.
This means uploaded media becomes part of the persistent runtime storage and is then exposed through the server's static asset route.
Deployment Variants
Host Install
In a direct host install, the files/ directory is usually adjacent to the deployed server runtime.
Docker Install
In Docker, the same logical layout still matters, but the files/ path should be backed by a mounted volume or bind mount.
Managed Platforms
In managed deployments such as Fly.io, the existing notes point to installation data under /usr/src/svrunner/files.
Operational Guidance
- know the real path for
SVR_SERVER_FILES_DIRon every deployed system - back up the persistent data, not just the build
- validate mounted storage after upgrades or redeploys
Stub screenshot: deployment file tree or terminal listing showing the executable directory, .env, and files/ layout together. Save final image at packages/docs/screenshots/architecture-storage-layout.png.