Cloudflare DevelopersCD
Cloudflare Developers3mo ago
1 reply
Ben

Mount R2 buckets with FUSE

Hi! I'm using Cloudflare Containers with the R2 FUSE mount example from the docs:
https://developers.cloudflare.com/containers/examples/r2-fuse-mount/

Everything works great when deployed to Cloudflare, but local development with wrangler dev fails. The FUSE mount doesn't work inside the container locally.

What I've found: When I run the same Docker image manually with docker run
--privileged
, the FUSE mount works. This makes me think that wrangler dev isn't passing the
--privileged
flag or
--cap-add SYS_ADMIN \ --device /dev/fuse


My question: Is there a way to configure wrangler dev to run containers with privileged mode or the necessary FUSE capabilities for local testing? Or is there a recommended workaround for local development with FUSE-based containers?

Thanks!
Cloudflare Docs
Mount R2 buckets as filesystems using FUSE in Containers
Mount R2 buckets with FUSE
Was this page helpful?