---
title: "Installation"
description: "Install and configure @yan-ad/nuxt-shopify in your Nuxt application."
canonical_url: "https://shopify.yan.ad/getting-started/installation"
---
# Installation

> Install and configure @yan-ad/nuxt-shopify in your Nuxt application.

## Quick Start

<steps>

### Install the module

Add `@yan-ad/nuxt-shopify` to your Nuxt application:

<code-group>

```bash [bun]
bun add @yan-ad/nuxt-shopify
```

```bash [npm]
npm install @yan-ad/nuxt-shopify
```

```bash [yarn]
yarn add @yan-ad/nuxt-shopify
```

</code-group>

### Configure `nuxt.config.ts`

Add `@yan-ad/nuxt-shopify` to the `modules` section and configure your Shopify credentials:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['@yan-ad/nuxt-shopify'],

  shopify: {
    apiKey: 'ApiKeyFromPartnersDashboard',
    apiSecretKey: 'ApiSecretKeyFromPartnersDashboard',
    appUrl: 'https://your-app-url.com'
  }
})
```

All values can also be set via environment variables:

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Env Variable
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        apiKey
      </code>
    </td>
    
    <td>
      <code>
        NUXT_SHOPIFY_API_KEY
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        apiSecretKey
      </code>
    </td>
    
    <td>
      <code>
        NUXT_SHOPIFY_API_SECRET_KEY
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        appUrl
      </code>
    </td>
    
    <td>
      <code>
        NUXT_SHOPIFY_APP_URL
      </code>
    </td>
  </tr>
</tbody>
</table>

### Set up session storage (optional)

By default, the module provides an in-memory session storage (`MemorySessionStorage`) that works out of the box — no configuration needed. For production, use a persistent adapter.

Create a Nitro server plugin to override session storage or configure lifecycle hooks:

```ts [server/plugins/shopify.ts]
import { configureShopify } from '#shopify/server'
import { PrismaSessionStorage } from '@shopify/shopify-app-session-storage-prisma'
import { prisma } from '~/server/utils/prisma'

export default defineNitroPlugin(() => {
  configureShopify({
    sessionStorage: new PrismaSessionStorage(prisma),
    hooks: {
      afterAuth: async ({ session, admin }) => {
        // Register webhooks, seed data, etc.
      }
    }
  })
})
```

<tip>

Any config passed to `configureShopify()` is merged with the defaults — you only need to specify what you want to override.

</tip>

### Start your dev server

Use the [Shopify CLI](https://shopify.dev/docs/apps/tools/cli) to start your development server with a tunnel:

```bash [Terminal]
shopify app dev
```

Or start the Nuxt dev server directly:

```bash [Terminal]
bun run dev
```

Your app will be running at `http://localhost:3000`.

</steps>

## Loading your app in Shopify Admin

To load your app within the Shopify Admin:

1. Update your app's URL in the [Partners Dashboard](https://partners.shopify.com) app setup page to your app URL (e.g., `https://your-app-url.com`)
2. Update the callback URL to `https://your-app-url.com/_shopify/auth/callback`
3. Go to **Test your app** in Partners Dashboard and select your development store

<tip>

In development, the Shopify CLI creates a Cloudflare tunnel automatically. Use the tunnel URL as your `appUrl`.

</tip>


## Sitemap

See the full [sitemap](https://shopify.yan.ad/sitemap.md) for all pages.
