Remote data
When developing Workers applications, you can use Wrangler's remote development mode (via wrangler dev --remote) to test your code on Cloudflare's global network before
deploying to production. Remote development is not supported in the Vite plugin.
npx wrangler dev --remotepnpm wrangler dev --remoteyarn wrangler dev --remoteThe wrangler dev --remote command creates a temporary preview deployment on Cloudflare's infrastructure, allowing you to test your Worker in an environment that closely mirrors production.
When you run wrangler dev --remote:
- Your code is uploaded to a temporary preview environment on Cloudflare's infrastructure.
 - Changes to your code are automatically uploaded as you save.
 - All requests and execution happen on Cloudflare's global network
 - The preview automatically terminates when you exit the command
 
- You need to develop using bindings that don't work locally (such as Browser Rendering).
 - You need to verify behavior specifically on Cloudflare's infrastructure.
 - You want to work with preview resources that mirror production.
 
To protect production data, you can specify preview resources in your Wrangler configuration, such as:
- Preview namespaces for KV stores:
preview_id.- This option is required when using 
wrangler dev --remote. 
 - This option is required when using 
 - Preview buckets for R2 storage: 
preview_bucket_name. - Preview database IDs for D1: 
preview_database_id 
This separation ensures your development activities don't impact production data while still providing a realistic testing environment.
- When you run a remote development session using the 
--remoteflag, a limit of 50 routes per zone is enforced. Learn more in Workers platform limits. 
Was this helpful?
- Resources
 - API
 - New to Cloudflare?
 - Products
 - Sponsorships
 - Open Source
 
- Support
 - Help Center
 - System Status
 - Compliance
 - GDPR
 
- Company
 - cloudflare.com
 - Our team
 - Careers
 
- 2025 Cloudflare, Inc.
 - Privacy Policy
 - Terms of Use
 - Report Security Issues
 - Trademark