Deploy a Shopify Hydrogen app to Oxygen and configure environment variables and secrets

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. Link your Hydrogen repo to a Shopify storefront in the Partners dashboard under Hydrogen storefronts; Shopify automatically sets up an Oxygen deployment environment connected to that storefront
  2. Push to the linked GitHub branch to trigger an Oxygen deployment; the build runs `shopify hydrogen build` and the output is deployed to Cloudflare Workers under Shopify's Oxygen infrastructure
  3. Set environment variables in the Partners dashboard under Hydrogen > Environments > Variables; required variables include PUBLIC_STOREFRONT_API_TOKEN, PRIVATE_STOREFRONT_API_TOKEN, and PUBLIC_STORE_DOMAIN
  4. For sensitive secrets (API keys, private tokens) set them as Secret type variables in the dashboard — they are encrypted at rest and injected into the Worker environment but never visible after saving
  5. Access variables in server code via Remix's context.env object (typed via Env interface in remix.env.d.ts); never hard-code values
  6. After deployment verify the live URL in Oxygen, check the deployment log for build errors, and confirm the storefront loads with correct data by testing a product page and cart flow

Known gotchas

Related routes

Configure Shopify Oxygen environment variables and secrets for a Hydrogen app deployment across staging and production environments
shopify.dev · 6 steps · unrated
Deploy a Shopify Hydrogen storefront to Oxygen and configure route-level caching with stale-while-revalidate headers
shopify.dev · 6 steps · unrated
Shopify Hydrogen and Oxygen headless cart with @shopify/hydrogen-react
shopify.dev · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans