the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

exec s3fs directly

+5 -8
+5 -8
apps/cf-sandbox/src/providers/cloudflare/index.ts
··· 92 92 async mount(path: string, prefix?: string): Promise<void> { 93 93 try { 94 94 await this.mkdir(path); 95 - await this.sandbox.mountBucket(env.VOLUME_BUCKET, path, { 96 - endpoint: `https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com`, 97 - prefix, 98 - credentials: { 99 - accessKeyId: env.R2_ACCESS_KEY_ID, 100 - secretAccessKey: env.R2_SECRET_ACCESS_KEY, 101 - }, 102 - }); 95 + const passwdFile = `/tmp/.passwd-s3fs-${crypto.randomUUID()}`; 96 + await this.writeFile(passwdFile, `${env.R2_ACCESS_KEY_ID}:${env.R2_SECRET_ACCESS_KEY}`); 97 + await this.sh`chmod 0600 '${passwdFile}'`; 98 + const bucketPath = prefix ? `${env.VOLUME_BUCKET}:${prefix}` : env.VOLUME_BUCKET; 99 + await this.sh`s3fs '${bucketPath}' '${path}' -o 'passwd_file=${passwdFile},nomixupload,url=https://${env.ACCOUNT_ID}.r2.cloudflarestorage.com'`; 103 100 } catch (e) { 104 101 console.log(e); 105 102 }