How to host your Shopify apps on Cloudflare/Vercel

Topic summary

Developers are encountering difficulties deploying Shopify Remix apps to Cloudflare Workers and Vercel, primarily receiving Error forwarding web request: AggregateError when following existing tutorials. The main challenge stems from incompatibility between Shopify’s Vite-based template and older deployment guides.

Key Solutions Identified:

  • Cloudflare deployment: One user successfully created a working template using D1 database with automated CI/CD deployment via GitHub (gruntlord6’s repo). Another tutorial covers adapting the official Shopify Remix template for Cloudflare Workers.

  • Vercel deployment: Requires disabling “Vercel Authentication” in deployment protection settings to prevent 401 errors from iframe requests. Database location and message file bundling (using dynamic imports instead of file system reads) also need special handling.

Development Workflow Limitation:

A significant constraint is the inability to use Shopify’s live preview tunneling (shopify app dev) with cloud deployments. The recommended workaround is maintaining a separate “appname-dev” deployment for testing changes before pushing to production, relying on Git-based CI/CD rather than local hot-reload development within the Shopify admin panel.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Make a second app called “appname-dev” and deploy that. Use that for testing. When you are ready to deploy code, push it to your actual app “appname”.

You can’t test a cloud environment in vite using the shopify cli, they don’t have any support for that. They would need to add support for it as its not something I or anyone else has control over.