For the complete Render documentation index, fetch https://render.com/llms.txt. Every docs page is also available as Markdown at https://render.com/docs/{slug}.md.

  • Docs
  • Changelog
Sign in
Get started

Shared Filesystems (SFS)

Mount persistent, unified storage across multiple sandboxes.

View as Markdown
Open in ChatGPT
Open in Claude

Shared filesystems are in private alpha. They currently only support sandboxes.

During the alpha period:

  • Avoid using shared filesystems for mission-critical workloads.
  • All limits and APIs are subject to change.

Request accessRequest access

You can mount a shared filesystem (SFS) to multiple Render Sandboxes so they can read and write to the same persistent storage:

Whenever a sandbox makes changes to an SFS, those changes are reflected across all other mounting sandboxes in near real-time.

Shared filesystems are ideal for multi-agent collaboration. They persist beyond the lifetime of any individual sandbox. Under the hood, each SFS is backed by Render-managed volumes in the same region as the sandboxes that mount it.

  • Shared filesystems are compatible with most tools like Git and SQLite that use file-based locks to coordinate concurrent access.
    • Mechanisms that require sharing memory across clients (such as SQLite's WAL mode) are not supported and might result in data corruption.
  • For custom tooling, you can coordinate concurrent access with the flock utility. See details below.

Setup

After your workspace is added to the shared filesystems private alpha, you can start creating shared filesystems with the following steps.

1. Install the Render CLI or SDK

You can create shared filesystems using the Render CLI or SDK.

Shared filesystems require Render CLI version 2.41.0 or later.

Use any of the following methods to install the Render CLI or upgrade to the latest version:

Homebrew installation

Run the following commands:

WinGet installation

Run the following command:

Installing with curl

Run the following command:

Direct download
  1. Open the CLI's GitHub releases page.
  2. Download the executable that corresponds to your system's architecture.

If you use an architecture besides those provided, you can build from source instead.

Building from source

We recommend building from source only if no other installation method works for your system.

  1. Install the Go programming language if you haven't already.

  2. Clone and build the CLI project with the following commands:

After installation completes, open a new terminal tab and run render with no arguments to confirm.

From your TypeScript project directory:

(Or pnpm install, bun add, etc.)

If you already have the SDK installed, make sure you're using version 1.13.0 or later:

After installing, make sure @renderinc/sdk is listed as a dependency in your package.json file at version ^1.13.0 or later.

From your Python project directory:

If you already have the SDK installed, make sure you're using version 1.13.0 or later:

After installing, make sure to add render>=1.13.0 as a dependency in your application's requirements.txt, pyproject.toml, or equivalent.

2. Create an API key

  1. Expand the steps below to create a Render API key with at least the following permissions:

    PermissionLevelPurpose

    Shared filesystems

    Read & write

    Enables creating shared filesystems.

    Enables mounting a shared filesystem in a new sandbox.

    Sandbox lifecycle and snapshots

    Read & write

    Enables sandbox creation.

    Sandbox execution and file transfer

    Execute

    Enables command execution within a sandbox.

    Show API key creation steps
    1. Go to your Account Settings page in the Render Dashboard and click Create API key.

      The API Keys page in the Render Dashboard

    2. Give your key a name.

    3. Select the workspace your key can access.

    4. Grant your key permissions. For details, see Permissions.

      • You can also set permissions for all workspace resources at once:

        Buttons to change the permissions for all resource types at once in the API key creation form

        • All: Grants every permission your member role allows for every resource.
        • Read only: Grants Read access to every applicable resource.
        • Clear all: Removes all permissions from the key.
    5. Click Generate API key. Your key is shown in full only once:

      The API key created dialog showing the new key with a button to copy it

    API keys are secret credentials!

    Don't publicly post your API key, commit it to version control, or otherwise share it with anyone outside your organization. If you believe an API key has been compromised, revoke it.

    2. Make your first request

    To test your key, call a Render API endpoint it has permission to access.

    For example, a key with Read access to services can call the List services endpoint. Replace {API_KEY} with your key and run the following:

    If your API key is valid, the request returns a 200 response and an array of services.

  2. Configure your API key and workspace ID for your chosen tool (CLI or SDK), as described in this section.

3. Create a shared filesystem

You can create a shared filesystem in either of the following ways:

MethodDescription

Standalone

Create an SFS without mounting it to any sandboxes.

See Standalone creation below.

With a sandbox

Create an SFS while creating the first sandbox that mounts it.

Proceed directly to 4. Mount the SFS in a new sandbox.

Standalone creation

The following example creates an SFS named agent-data in your workspace:

Requires Render CLI version 2.41.0 or later.
Requires SDK version 1.13.0 or later.
Requires SDK version 1.13.0 or later.
Requires SDK version 1.13.0 or later.

After creating the SFS, you can mount it in multiple sandboxes.

4. Mount the SFS in a new sandbox

When creating a sandbox, you can provide a name and an absolute mount path for a shared filesystem. If no SFS with the provided name exists in your workspace, Render creates it.

The following example mounts an SFS named agent-data at path /data:

  • Any number of sandboxes can mount the same SFS.
  • It is not currently possible to mount an SFS to an already running sandbox (only during creation).
  • Each sandbox can currently mount a maximum of one SFS.

5. Write to the SFS

After a sandbox finishes spinning up, you can start executing commands that read and write to the shared filesystem. The following example creates a file under /data (the mount path provided in the previous step) and reads it back.

Replace sbx-abc123 with the ID returned when you created the sandbox in step 4.

Handling concurrent operations

A shared filesystem doesn't automatically lock files when a sandbox reads or writes them. Without coordination, writes from one sandbox might immediately overwrite writes from another:

Concurrently appending to the same SFS file from different sandboxes might result in data loss or corruption.

This is true even if all writers open the file with O_APPEND.

To append safely, do one of the following:

  • Use a single writer per file.
  • Require every writer to hold an exclusive lock on the same lockfile while appending.

Popular tools like Git and SQLite use file-based locks to coordinate concurrent access. Git uses lockfiles to coordinate updates, and SQLite uses file locks in its default rollback journal mode. These locks can coordinate access across sandboxes that mount the same SFS, without any additional configuration.

SQLite’s WAL mode requires shared memory across clients. Because sandboxes do not share a memory space, this mode is not supported and might result in data corruption. The same is true for other mechanisms that rely on shared memory.

Coordinating access with flock

If you're writing custom code that handles its own locking, you can use the Linux flock utility to coordinate reads and writes across sandboxes. Have each sandbox acquire an advisory lock on the same lockfile before it reads or updates a set of related files. This helps prevent a reader from seeing a partially completed update.

Important considerations:

  • Always write lockfiles to the same SFS as the files they lock.

    If you write a lockfile to a sandbox's local filesystem, it's invisible to all other sandboxes, preventing them from coordinating.

  • Advisory locks only coordinate clients that honor them.

    Your sandboxes must all coordinate their operations through the same set of lockfiles. A sandbox that skips the appropriate locks might read or write files while another sandbox's update is in progress.

  • Keep lockfiles in place while any sandbox might be using them.

    Deleting or replacing a lockfile might result in two sandboxes acquiring locks on different files at the same path.

Interactions with sandbox snapshots

You can capture snapshots of a sandbox to preserve its local filesystem, along with its memory and CPU state. When using both shared filesystems and snapshots with a given sandbox, note the following:

  • Neither kind of snapshot includes the sandbox's shared filesystem, if it mounts one.
  • Whenever you restore a sandbox from a runtime snapshot:
    • The new sandbox must mount the exact same shared filesystem at the exact same mount path as the source sandbox, if it mounted any.
    • The new sandbox may mount a shared filesystem as desired, if the source sandbox did not mount one.
  • Mounting a shared filesystem when restoring from a snapshot does not revert the filesystem to its state at the time of the snapshot.

Storage limits

All SFS limits are subject to change during the alpha period:

ItemLimit

Max storage per SFS

100 GB

Max SFS storage per workspace

200 GB (combined across all SFS in a workspace)

Pricing

Shared filesystems are not billed during the private alpha period.

Full pricing details will be published prior to the start of the first active billing period for shared filesystems.

Alpha limitations

We plan to address these known limitations of shared filesystems following the alpha period:

  • Shared filesystems are only available in the Oregon region.
    • This is also currently true for sandboxes.
  • Render service types besides sandboxes cannot mount an SFS.
  • You cannot mount an SFS to an already running sandbox (only during creation).
  • Each sandbox can mount a maximum of one SFS.
  • It is not possible to delete an SFS.

FAQ

Can sandboxes in different sandbox groups mount the same SFS?

Yes. A sandbox can mount an SFS as long as it's in the same region and belongs to the same workspace.

What happens if I mount an SFS over an existing local directory?

If an SFS path collides with an existing directory on a sandbox's local filesystem, all file operations in the sandbox see the SFS contents at that path.

Files in the local filesystem are preserved. Any snapshots captured of the sandbox include local filesystem files hidden beneath the mount.

Do shared filesystems support file-change notifications?

Not fully. If a particular sandbox uses inotify to monitor a shared file, it receives notifications only for changes made by processes in that sandbox. SFS changes made by other sandboxes do not trigger notifications.

How can I back up SFS data?

Mount the SFS in a sandbox, then execute commands in the sandbox to copy SFS files to separate storage.

Note that sandbox snapshots exclude SFS data.

View as Markdown
Open in ChatGPT
Open in Claude
Shared Filesystems (SFS)
  • Setup
    • 1. Install the Render CLI or SDK
    • 2. Create an API key
    • 3. Create a shared filesystem
    • 4. Mount the SFS in a new sandbox
    • 5. Write to the SFS
  • Handling concurrent operations
    • Coordinating access with flock
  • Interactions with sandbox snapshots
  • Storage limits
  • Pricing
  • Alpha limitations
  • FAQ
    • Home
    • Your first deploy
    • Free instances
    • Platform features by plan
    • Use with coding agents
    • FAQ
    • Templates
      • Migrate from…
        • Heroku
        • Railway
    • Compute plans
    • SandboxesBeta
      • Service types
        • Which to use?
        • Static sites
        • Web services
        • Private services
        • Background workers
        • Cron jobs
        • Workflows
        • Multi-service architectures
      • Data storage
        • Render Postgres
        • Render Key Value (Redis®-compatible)
        • Shared filesystemsAlpha
        • Persistent disks
    • How deploys work
    • Supported languages
    • Git providers (GitHub, etc.)
    • Build pipeline
    • Deploy hooks
    • Monorepo support
    • Troubleshooting deploys
      • Previewing changes
        • Single-service previews
        • Preview environments (multi-service)
      • Docker deploys
        • Overview
        • Deploy a registered image
        • Using secrets
      • Runtime
        • Native runtimes
        • Environment variables & secrets
        • Default environment variables
    • Intro to sandboxes
    • Limits & pricing
      • How to…
        • Create & configure sandboxes
        • Execute commands
        • Upload & download files
        • Manage snapshots
        • Mount a shared filesystemAlpha
      • Use with…
        • Claude Managed Agents
        • Cursor Cloud Agents
        • OpenAI Agents API
      • SDK/CLI reference
        • TypeScript SDK
        • Python SDK
        • CLI commands
    • Intro to workflows
    • Tutorial
    • Limits & pricing
      • How to…
        • Define tasks
        • Define flowsNew
        • Trigger runs
        • Develop locally
      • SDK/CLI reference
        • TypeScript SDK
        • Python SDK
        • CLI commands
      • Example workflows
        • TypeScript examples
        • Python examples
    • Overview
    • Create & connect
    • Database credentials
    • Extensions
    • Version upgrades
    • Logical replication
    • Legacy instance types
      • Database recovery
        • Recovery & backups
        • High availability
      • Database performance
        • Read replicas
        • Connection pooling
        • Admin apps
        • Repacking tables
        • Troubleshooting performance
    • Regions
    • Inbound IP rules
    • Edge caching
    • WebSockets
    • TLS certificates
      • Custom domains
        • Overview
        • Cloudflare
        • Namecheap
        • Other DNS providers
      • Internal traffic
        • Private network
        • Private links
      • Outbound traffic
        • Default IP ranges
        • Dedicated IP addresses
        • Outbound bandwidth
        • Handling network changes
      • Static site config
        • Custom response headers
        • Redirects & rewrites
    • The Render Dashboard
    • SSH / Shell access
    • Projects & environments
      • Service actions
        • Scaling
        • Rollbacks
        • Maintenance mode
        • One-off jobs
      • Infrastructure as code
        • Blueprints overview
        • render.yaml reference
        • Terraform provider
    • In-dashboard metrics
    • Health checks
    • Uptime best practices
      • Logging
        • In-dashboard logs
        • Log streams (syslog/HTTPS)
      • OpenTelemetry (OTel) metrics
        • Provider setup
        • Metrics reference
      • Notifications
        • Webhooks
        • Email / Slack
    • API keys
    • MCP Server
      • Render CLI
        • Overview
        • Command reference
      • REST API
        • Overview
        • API reference
      • Third-party connections
        • OIDC support
        • Datadog
    • Workspaces, members, & roles
    • Login settings
    • Audit logs
      • Organizations
        • Overview
        • SAML SSO
    • DDoS protection
    • Platform maintenance
      • Compliance
        • Overview
        • HIPAA (US health data)
        • HIPAA best practices
        • Shared responsibility model
        • Pentest policy
    • Heroku vs Render
    • Vercel vs Render
All Systems Operational
© Render Inc. All rights reserved.