Skip to main content

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_DIR is the executable directory in production
  • SVR_SERVER_FILES_DIR defaults to <exec-dir>/files

From there, the server defines:

  • SVR_SERVER_ASSETS_DIR as <files-dir>/assets
  • SVR_SERVER_LOGS_DIR as <files-dir>/logs
  • SVR_SERVER_DATABASE_PATH as <files-dir>/local.db

Most Important Persistent Paths

These are the primary durable runtime paths in a normal deployment:

  • files/local.db
  • files/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_DIR on every deployed system
  • back up the persistent data, not just the build
  • validate mounted storage after upgrades or redeploys

Storage Layout 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.