Host Shopify Hydrogen on Heroku

Learn how to have your headless Shopify store hosted on Heroku in easy steps.

As a developer I know that the local environment is not enough, we need an environment to show the store live to project managers, clients, and investors. One of my favorite ways to quickly have an app running is by hosting on Heroku, so that’s what we’re going to talk about in this post. This is part of what I teach in my Shopify Hydrogen Course, check it out!

Having Heroku setup

The initial step to having your Shopify Hydrogen on Heroku is setting up your Heroku account. I recommend installing the Heroku CLI at this point too.

You will be able to install the Heroku CLI via this official documentation: The Heroku CLI.

Then you can create your Shopify Hydrogen project on your account based on Node.js as the base framework.

Shopify Hydrogen on Heroku

Shopify Hydrogen on Heroku

As I already had a project in my local, I had to set up the remote Heroku environment to my local using this method below.

By doing that, I’m able to push my project to Heroku.

Custom domain

Your store custom domain can be easily adjusted inside your Heroku panel, as you can see in the image below.

Your main domain needs to be pointing to your Heroku instance, when you click on “Add domain” you will receive a CNAME and A record to use.

Your store on Shopify doesn’t need to be Shopify Plus, your Shopify store will keep the same domain, for example, example.myshopify.com.

Shopify Hydrogen custom domain

Thank you for reading it, if you want to make sure your store is fully optimized, contact me and I can help you with it.

About me

Rafael Corrêa Gomes

Senior e-commerce developer and architect based in Montreal, Canada. More than ten years of experience developing e-commerces, saas products and managing teams working with Magento, Shopify, PHP, JavaScript, and NodeJS.
Exit mobile version