RedisVFS keeps a filesystem in Redis: every file is one key under
key_prefix, and the tree is whatever commands write. Files persist across
processes, and every workspace pointed at the same URL and prefix sees them.
Set up the server as in Redis setup.
Install
Configure
capacity="100MB" caps the bytes the files hold; see
capacity. A mount takes MountMode.READ,
WRITE or EXEC.
Fields
Authentication
The password goes in the URL,redis://:<password>@<host>:6379/0, or
rediss:// for TLS. An Upstash database works with
the rediss:// URL its console prints.
Layout
/redis/logs/app.log is the key <prefix>file:/logs/app.log. Folders live in
the set <prefix>dir, and modified times in <prefix>modified:<path>.
Behavior
- Key prefix: a different
key_prefixkeeps one workspace’s files apart from another’s, and from other data in the same database. - Shared database: the Node, browser and Cloudflare mounts use the same key layout, so all of them can mount one database at the same time.
Integration
Redis answers these commands through its own API, so fewer keys are read. See Integration.find: one recursive listing.du: one recursive listing.ls -Randtree: one recursive listing.
VFS.md
The VFS.md an agent reads with Redis mounted at/<path>.
<mode> is the mount’s mode: read, write or exec. The commands shown are
those of a write mount.
- Rendered
- Raw
Virtual Filesystem
Supported Unix Commands for VFSUnix commands work on each path as on a local filesystem, as far as the path supports them:
Limitations of Unix Commands for VFSWhere a path differs from a local filesystem:
Run
man <cmd> or <cmd> --help for one command’s usage.