Skip to Content

Deploy Nuxt

1. Initialize

cd my-nuxt-app espacetech init
espacetech.json
{ "name": "my-nuxt-app", "framework": "nuxt", "build_command": "npm run build", "start_command": "node .output/server/index.mjs", "port": 3000 }

2. Configure for Production

Nuxt 3 builds to .output/ by default, which is already optimized for production.

nuxt.config.ts
export default defineNuxtConfig({ nitro: { preset: "node-server", }, });

3. Deploy

espacetech deploy

Environment Variables

espacetech env set NUXT_PUBLIC_API_URL=https://api.example.com DATABASE_URL=postgres://...

Variables prefixed with NUXT_PUBLIC_ are available client-side. Set them before building.