Shopify Oxygen: hosting for Hydrogen storefronts
Shopify's edge hosting for Hydrogen. Included, close to the commerce data, and opinionated in ways that mostly help.
6 min read · Headless & architecture ·
Oxygen is Shopify's hosting for Hydrogen storefronts. It runs your front end at the edge, close to visitors, and it's included with your Shopify plan rather than being a separate bill.
If you build with Hydrogen, Oxygen is the default answer to where it runs.
What it gives you
- Edge deployment, globally, so server-rendered pages come from near the visitor.
- No infrastructure to manage. No servers, no scaling configuration, no patching.
- Included in your plan, which removes a line item that would otherwise be real money.
- Deploy previews per branch, so a pull request gets a URL somebody can look at.
- Environments — production and preview, with their own variables.
- Caching tuned for commerce, which is more useful than it sounds; caching product and cart data correctly is easy to get wrong.
- Integrated with the Shopify admin, so the storefront appears as a sales channel rather than a separate system.
The deploy flow
Push to your repository, and Oxygen builds and deploys. Branch deploys get their own preview URL; the production branch goes live.
Environment variables are set per environment in the Shopify admin, which keeps the Storefront API tokens out of the codebase.
Straightforward, and deliberately unopinionated about your workflow beyond "it's in git".
The constraints
Honest about the trade-offs:
- Hydrogen only. A Next.js storefront hosts elsewhere.
- It's a runtime, not a server. Edge workers, with the limits that implies — execution time, memory, and no long-running background jobs.
- Background work belongs elsewhere. Scheduled jobs, queues and anything talking to an ERP need their own home. Oxygen renders the storefront; it isn't your backend.
- You're on Shopify's platform for hosting as well as commerce. For most stores that's the point; for some it's a consideration.
That third constraint is the one teams discover late. A headless storefront frequently needs a small service alongside it for things the edge can't do.
Caching
The part worth understanding, because it's where headless storefronts are made fast or slow.
Hydrogen gives you cache controls per query, with sensible commerce defaults: product and collection data cached at the edge, cart and customer data never. Get this right and pages come from cache in milliseconds; get it wrong and you either serve stale prices or hit the Storefront API on every request.
Two rules that prevent most problems: never cache anything customer-specific, and cache catalogue data aggressively but purge on change.
When to host elsewhere
- You're not using Hydrogen.
- The storefront is part of a larger application already deployed somewhere.
- You need runtime capabilities the edge doesn't provide.
- Corporate infrastructure requirements dictate where things run.
None of these are unusual. Oxygen is the convenient default, not a requirement of going headless.
What it doesn't change
Hosting is one decision among several, and the harder ones are unaffected:
- You still own SEO — server-side rendering, metadata, structured data — headless SEO.
- You still lose the theme editor unless you build editing capability.
- Apps still need evaluating one by one.
- Checkout is still Shopify's, and you hand off to it.
- You still maintain a codebase.
Those are the costs of headless, and no hosting choice removes them — is headless worth it.
The cost angle
Oxygen being included is a genuine saving compared with hosting a Next.js storefront on a commercial platform, particularly at traffic. It's rarely the deciding factor, but it belongs in the comparison — what headless costs.
Oxygen removes the infrastructure question from a Hydrogen build. It doesn't remove any of the reasons headless is a bigger commitment than a theme.
Is this the problem you’re looking at?
Send me the link to your store and a line about what is going wrong. You get a straight answer within one business day — no pitch, no obligation.
mario@clicksandcarts.coOr see what I do around Shopify: services, work beyond the theme, selected work.