---
title: "Nuxt"
description: "Use nuxt-convex in a Nuxt app for server-rendered live queries, authenticated SSR, server helpers, auto-imports, storage and integrations."
canonical_url: "https://nuxt-convex.onmax.me/nuxt"
---
# Nuxt

> Use nuxt-convex in a Nuxt app for server-rendered live queries, authenticated SSR, server helpers, auto-imports, storage and integrations.

Use this track when your app runs on Nuxt and you want the framework wrapper around the shared Vue runtime. Queries you `await` render on the server, hydrate from the payload, and then stay live over the WebSocket.

## Set up in three steps

<steps level="3">

### Install the module

```bash [Terminal]
pnpm add nuxt-convex convex
```

### Register it

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['nuxt-convex'],
})
```

### Query from a page

Run `npx convex dev` to create a deployment and generate `convex/_generated/`. The module reads the URL it writes to `.env.local`, so you can await your first query right away.

```vue [app/pages/index.vue]
<script setup lang="ts">
import { api } from '#convex/api'

const { data: tasks } = await useConvexQuery(api.tasks.list)
</script>
```

</steps>

## What the module owns

`nuxt-convex` owns the Nuxt-facing contract:

- server rendering of awaited queries, hydrated from the payload
- the request's user on the server, through Better Auth or your own `convex:token` hook
- server helpers for Nitro routes, such as `serverConvexQuery` and `requireConvexAuth`
- `#convex/*` aliases, generated API access through `#convex/api`, and auto-imports
- optional storage scaffolding, and the Better Auth and Cloudflare R2 integrations

The composables themselves (queries, mutations, pagination, auth state) are shared with plain Vue; their guides live in the [Vue track](https://nuxt-convex.onmax.me/vue). In a Nuxt app, keep the auto-imports and `#convex/*` aliases.

## Start with the Nuxt path

Open the page that matches your job.

<card-group>
<card icon="i-lucide-server" title="Render on the server" to="https://nuxt-convex.onmax.me/nuxt-module/ssr-and-hydration">

How awaited queries render, hydrate, and stay live.

</card>

<card icon="i-lucide-shield-check" title="Render signed-in pages" to="https://nuxt-convex.onmax.me/nuxt-module/authenticated-ssr">

Resolve the user's token on the server with Better Auth or your own provider.

</card>

<card icon="i-lucide-route" title="Call Convex from server routes" to="https://nuxt-convex.onmax.me/nuxt-module/server-routes">

Run queries, mutations and actions as the request's user from Nitro.

</card>

<card icon="i-lucide-book-open-text" title="Look up the public API" to="https://nuxt-convex.onmax.me/api-reference/module-configuration">

Check config keys, environment variables, aliases and runtime config.

</card>
</card-group>

## What stays shared

The Nuxt module does not replace the shared data layer. These behaviors still come from the underlying Vue package:

- query and multi-query subscriptions
- mutations and actions
- paginated queries
- auth state primitives
- connection-state tracking
- the advanced controller and raw client helpers

## Next step

Open [Nuxt Module](https://nuxt-convex.onmax.me/nuxt-module) for every guide, or [Deployment](https://nuxt-convex.onmax.me/nuxt-module/deployment) when you're ready to ship.


## Sitemap

See the full [sitemap](https://nuxt-convex.onmax.me/sitemap.md) for all pages.
