1. Quickstarts
  2. Shopify

Deploy a Shopify App

You can deploy a custom Shopify app to Render to extend Shopify’s core functionality. A Shopify app might add features to an existing Shopify store, introduce new admin capabilities, or pull in Shopify merchant data for processing and analysis.

Getting started

You can clone our example repository if you already have your Shopify API and Secret values and you know which scopes you want to use. Otherwise, follow the steps below to create a new Shopify app and deploy it to Render.

Create your project with the Shopify CLI

Following the steps in Shopify’s App tutorial, let’s create a new app from your terminal using the Shopify CLI. Note that the steps differ slightly depending on whether you’re building an “app” or an “extension”, so make sure to create the right project for your use case. The process to deploy to Render is similar in either case.

Before you begin these steps, make sure you have recent versions of Node.js and npm installed on your system. See additional requirements.

  1. Run npm init @shopify/app@latest

    This prompts you for an app name, asks whether you want to use Remix, and asks whether to use JavaScript or TypeScript. A folder is created with the name you provide, and the app is initialized in that folder.

    The final output should show you that the process succeeded:

    ╭─ success ──────────────────────────────────────────────────────────────╮
    │                                                                        │
    │  render-sample-app is ready for you to build!                          │
    │                                                                        │
    │  Next steps                                                            │
    │    • Run `cd render-sample-app`                                        │
    │    • For extensions, run `npm run generate extension`                  │
    │    • To see your app, run `npm run dev`                                │
    │                                                                        │
    │  Reference                                                             │
    │    • Shopify docs                                                      │
    │    • For an overview of commands, run `npm run shopify app -- --help`  │
    │                                                                        │
  2. Run npm run dev to continue building the app. (If you’re building an extension, use npm run generate extension instead.)

    This command creates a local SQLite database, along with its database migration schema.

    The command also prompts you to associate the project with a registered Shopify app. You can choose to create a new app, or associate the project with an existing app (Shopify displays a list of your existing apps). This step may require authentication to Shopify.

    Pay close attention to the terminal output as you go through these steps. It provides helpful information about accessing your application, resetting your database, and more.

  3. Once the app is running in development mode, press p in the terminal prompt to open the app in your browser. If this succeeds, you can press q to quit the development mode runtime and continue.

    Your Shopify app uses a local SQLite database by default. On Render, locally stored files are lost with each deploy of your service. We strongly recommend that you configure your app to use PostgreSQL instead. Learn how to set up PostgreSQL on Render, and see the Shopify CLI docs for more information on connecting to a dedicated database.

  4. Fetch your Shopify API details and scopes using npm run shopify app env show.

    This outputs a few lines of text showing you your SHOPIFY_API_KEY, SHOPIFY_API_SECRET, and SCOPES variables. You’ll need to add these values to your Render service for it to connect to Shopify successfully.

Prepare your Render deployment

  1. Commit your code and push it to a repository on GitHub or GitLab. You’ll connect this repo to your Render service.
  2. In the Render Dashboard, click New > Web Service.
  3. In the service creation flow, connect your project’s Git repository and give the service a name.
    • Render assigns your web service an onrender.com subdomain based on its name (e.g., a name of “My App” might produce https://my-app.onrender.com). You will need this URL later.
  4. Select Docker as your service’s runtime and choose an instance type (such as Free or Starter).
  5. Click Create Web Service.

Render kicks off your service’s first deploy. This deploy will fail because we haven’t set some important configuration values yet! Let’s do that next.

Configure your web service

After your web service is created, go to its Environment page and define the following environment variables for it:

Variable NameValue
SHOPIFY_API_KEYObtain by running npm run shopify app env show
SHOPIFY_API_SECRETObtain by running npm run shopify app env show
SCOPESObtain by running npm run shopify app env show
SHOPIFY_APP_URLProvide your Render web service’s URL from above (e.g., https://my-app.onrender.com)
NODE_ENVSet this to production.

After you set these variables, Render redeploys your service to incorporate the new configuration. You can also click Manual Deploy > Deploy latest commit to trigger a redeploy manually.

You’re all done! Your Docker container successfully deploys on Render within a few minutes. From your service’s page in the Render Dashboard, click the onrender.com URL to view your running app. As you continue to build, you can push updates to your GitHub/GitLab repository and Render will automatically redeploy your service with the updated code.