Deployment
Hydrogen app
You can use Oxygen to deploy your Hydrogen app for free using the Shopify’s official hosting solution. If you have added the Hydrogen channel to your Shopify store and if you want to deploy your app to Oxygen, read the official Shopify guide.
You can use Vercel to deploy your Hydrogen app to their global edge network with zero configuration. This guide includes instructions for deploying to Vercel through the website UI or Vercel’s CLI.
Website UI Deployment
- Push your code to your online Git repository (GitHub, GitLab, BitBucket).
- Import your project into Vercel.
- Vercel will automatically detect Remix and configure the right settings.
- Copy paste your environment variables.
- Your application is deployed!
After your project has been imported and deployed, all subsequent pushes to branches will generate Preview Deployments, and all changes made to the Production Branch (commonly “main”) will result in a Production Deployment.
CLI Deployment
- Install the Vercel CLI and run
vercel
to deploy.
- Vercel will automatically detect Remix and configure the right settings.
- When asked
Want to override the settings? [y/N]
, chooseN
. - Your application is now deployed, but still need to configure your environment variables using the Vercel website UI.
Troubleshooting
Oxygen deployment
If you try to deploy Fluid to Oxygen using pnpm
as a dependency manager, deployment might fail with the following error:
When deploying to Oxygen, Shopify will automatically create a Pull Request with the following Github Action:
Unfortunately, this Github Action will fail if your repo is using pnpm
because it is looking for a package-lock.json
lockfile.
To fix this you can update your Github Action as follows (don’t forget to update the Oxygen Storefront ID):