E-Commerce15 min read•Updated November 2026

VPS Hosting for Shopify Headless Commerce

Quick answer

In headless Shopify, Shopify still manages products, inventory, orders and checkout, while you build and host a custom storefront that fetches data through the Shopify Storefront API. A VPS is a good place to host that storefront when you want full control, Indian hosting and predictable costs: run a framework such as Next.js, Remix or Nuxt with Node.js under PM2 or Docker behind Nginx with HTTPS, cache product and collection data with revalidation triggered by Shopify webhooks, keep API tokens in environment variables, send shoppers to Shopify's checkout, and put a CDN in front for static assets. 2 vCores / 8 GB suits most single storefronts.

Shopify's standard themes cover most stores, but brands that want unusual designs, content-heavy experiences, very fast pages or integration with other systems often go "headless": they keep Shopify as the commerce engine and build their own frontend. Shopify offers its own hosting option for its Hydrogen framework, and many teams deploy to serverless platforms, but a VPS is a strong alternative when you want control over the runtime, caching and location, or to host several services together. This guide covers hosting a headless Shopify storefront on a VPS.

What Headless Commerce Means

LayerWho handles it
Products, inventory, pricing, ordersShopify
Checkout and paymentsShopify checkout
Storefront design and pagesYour custom frontend
Content (blogs, landing pages)Shopify or a separate CMS
Hosting the frontendYour VPS

The frontend communicates with Shopify through the Storefront API (GraphQL), using a public or private access token depending on the architecture. Server-side code can also use the Admin API for internal tasks, with stricter secret handling.

Choosing a Frontend Framework

  • Next.js: widely used React framework with server rendering, static generation and incremental revalidation; runs on Node.js on a VPS.
  • Hydrogen: Shopify's React framework built on Remix, designed for Shopify's Oxygen hosting but deployable elsewhere with an appropriate adapter.
  • Remix, Nuxt, SvelteKit or Astro: all can build Shopify storefronts with the Storefront API.

Pick the framework your team knows well; hosting needs are similar. Our Next.js on VPS guide covers running Next.js in production.

VPS Architecture

  1. Nginx terminates HTTPS, compresses responses and proxies to the Node.js app.
  2. Node.js app runs under PM2 or in Docker, with one process per CPU core where the framework allows.
  3. Cache layer: the framework's data cache, plus Redis when several processes need a shared cache.
  4. Worker process for webhook handling, search indexing or syncing to other systems.
  5. CDN in front for static assets and, where safe, cached pages.

Caching and Revalidation

Calling the Storefront API on every request adds latency and risks rate limits. Cache product, collection and content data on your server and refresh it when it changes:

  • Statically generate or cache product and collection pages with a revalidation interval.
  • Subscribe to Shopify webhooks for product, inventory and collection updates, and revalidate the affected pages when they fire.
  • Never cache cart contents or customer account pages across users.
  • Show live inventory or price checks at the cart step if your catalogue changes quickly.

Handling Webhooks

Expose a webhook endpoint over HTTPS, verify each webhook's HMAC signature using your app's secret, respond quickly, and do heavier work in a background worker. Log deliveries and handle retries idempotently, since Shopify can deliver the same webhook more than once. Our background workers guide covers queues.

Cart and Checkout

The Storefront API manages carts; when shoppers check out, they are sent to Shopify's hosted checkout, which handles payments, taxes and order creation. That keeps card data and payment compliance with Shopify and your payment providers rather than on your VPS. Make sure your domain setup and any checkout customisation follow Shopify's current requirements.

Secrets and Tokens

  • Store API tokens and webhook secrets in environment variables or a secrets file outside the repository.
  • Use the public Storefront token only where browser exposure is intended; keep private tokens and Admin API credentials server-side.
  • Grant API scopes that match what the storefront needs, nothing more.
  • Rotate tokens when team members leave or if exposure is suspected.

Deployment

Build the application in CI, then deploy the built output to the VPS and restart processes with zero downtime (PM2 reload or rolling container replacement). Self-hosted platforms such as Coolify can automate builds and HTTPS (see our Coolify guide). Keep a previous build so you can roll back quickly.

Performance

  • Use optimised images from Shopify's CDN with appropriate sizes and modern formats.
  • Stream or server-render above-the-fold content.
  • Minimise client-side JavaScript; heavy bundles slow mobile shoppers.
  • Host the frontend near your customers (an Indian VPS for Indian shoppers).
  • Cache aggressively and revalidate on change.

SEO Considerations

Server-render product and collection pages with proper titles, descriptions, canonical URLs and structured data, generate a sitemap from your catalogue, and set redirects for old URLs when migrating from a standard Shopify theme. Make sure the old storefront domain redirects correctly to avoid duplicate content.

Monitoring

Monitor response times, error rates, Node.js memory, cache hit rates and Storefront API errors or throttling. Alert on webhook failures, since stale data can show wrong prices or stock. Run external uptime checks on key pages and the cart.

Sizing

SetupSuggested resources
Single storefront, moderate traffic2 vCores / 8 GB
Busy storefront or several storefronts4 vCores / 16 GB
Storefronts plus CMS, search and other services8 vCores / 32 GB

Example: A D2C Beauty Brand

A beauty brand built a Next.js storefront on Shopify's Storefront API with editorial content from a headless CMS. The storefront runs on a 4 vCore / 16 GB VPS in Noida under PM2 behind Nginx, with Redis caching shared across processes. Product webhooks trigger page revalidation, a worker syncs reviews, and a CDN serves static assets. Checkout runs on Shopify, so payment handling stays with Shopify and the brand's payment providers.

Common Mistakes

  • Calling the Storefront API on every request with no caching.
  • Ignoring webhook signature verification.
  • Exposing private tokens in browser code.
  • Caching carts or account pages across users.
  • Losing SEO by not redirecting old URLs.

In Short

Headless Shopify keeps commerce and checkout on Shopify while you host a custom storefront. On a VPS, run your framework under PM2 or Docker behind Nginx, cache and revalidate with webhooks, protect tokens, use Shopify's checkout, add a CDN and monitor API errors.

SkyRainCloud Plans for This Workload

A headless storefront with server rendering runs well on 2 vCores / 8 GB; busy stores or several storefronts are more comfortable on 4 vCores / 16 GB, with a CDN in front.

AMD EPYC 7C13 VPS

Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.

PlanvCoresRAMStorageNetworkPriceGood forBuy
VPS 1 — AMD28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹649/monthWebsites, small APIs, bots, staging and VPN serversOrder
VPS 2 — AMD416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,299/monthWooCommerce, Node.js/Python backends, Docker Compose stacks, CI runnersOrder
VPS 3 — AMD832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,499/monthProduction databases, high-traffic sites, multi-container appsOrder
VPS 4 — AMD1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,899/monthLarge production workloads, SaaS platforms, analytics, in-memory cachesOrder

Intel Xeon Platinum 8269CY VPS

KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.

PlanvCoresRAMStorageNetworkPriceGood forBuy
VPS 1 — Intel28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹649/monthBusiness websites, small apps, scheduled jobs and botsOrder
VPS 2 — Intel416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,169/monthBusiness software, mid-size databases, several sites on one serverCheck stock
VPS 3 — Intel832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,249/monthERP/CRM stacks, heavier databases, multiple production appsCheck stock
VPS 4 — Intel1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,299/monthHigh-memory workloads and consolidated production serversCheck stock

Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.

Frequently Asked Questions

What is headless Shopify?
Shopify manages products, orders and checkout while a custom frontend displays the store via the Storefront API.
Can I host a headless Shopify storefront on a VPS?
Yes, frameworks such as Next.js, Remix or Nuxt run on Node.js on a VPS.
Does checkout run on my VPS?
No, shoppers use Shopify's hosted checkout, which handles payments.
How do I keep product data fresh?
Cache pages and revalidate them when Shopify webhooks report changes.
How should I secure API tokens?
Keep private tokens server-side in environment variables and grant minimal scopes.
Do I need to verify webhooks?
Yes, check each webhook's HMAC signature before processing it.
Which framework is best for headless Shopify?
Next.js and Hydrogen are common; choose what your team knows.
What VPS size do I need?
2 vCores / 8 GB for most single storefronts.
Should I use a CDN?
Yes, for static assets and faster delivery.
How do I protect SEO when going headless?
Server-render pages with metadata and redirect old URLs.
Instant UPI • ₹649/mo
Fast KVM Cloud Provisioning