Documentation

Deployment

In general you can deploy the application to any hosting provider that supports Node.js, but we recommend using Vercel for the best experience.

Nuxt has a set of predefined hosting providers that allow you to host a project with minimal/zero config: Nuxt Deployment Docs

Deploying to Vercel

Vercel is one of the many ways to deploy Nuxt 3 apps. It has a great DX, lot's of features and is free for hobby projects.

Setup vercel account

To host your project on Vercel you first have to create an account.

Connect your git repository

After signing up you will be promted to import a git repository. Select the git provider of your project and connect your git account with Vercel.

Vercel welcome screen

Now you will see a list of all your projects. Select the project you want to deploy and click on the Import button.

In the Configure Project view expand the Enviornment Variables section and add the following variables one by one (you can copy them from the .env file in your projects root too):

NUXT_PUBLIC_SITE_URL="<YOUR_SITE_URL>"
DATABASE_URL="<YOUR_DATABASE_URL>"

The NUXT_PUBLIC_SITE_URL is the base url of your site, e.g. https://your-app.com.

Vercel project configuration

Then click the Deploy button and your project will be deployed.

On this page