Docs / Programming & Development / How to Deploy a Nuxt.js Application on a VPS

How to Deploy a Nuxt.js Application on a VPS

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 26 views · 1 min read

What Is Nuxt.js?

Nuxt.js is a Vue.js framework that supports server-side rendering, static site generation, and hybrid rendering modes. Deploying Nuxt on your Breeze gives you full control over performance and configuration.

Prerequisites

  • A Breeze running Ubuntu 22.04 or later
  • Node.js 18+ installed
  • Nginx installed
  • A domain name pointed to your Breeze

Step 1: Build the Application

cd /var/www/nuxt-app
npm install
npm run build

For Nuxt 3, this generates the .output directory containing the production server.

Step 2: Run with PM2

sudo npm install -g pm2
pm2 start .output/server/index.mjs --name "nuxt-app"
pm2 save
pm2 startup

Step 3: Configure Nginx

server {
    listen 80;
    server_name yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
sudo ln -s /etc/nginx/sites-available/nuxt /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

Step 4: Enable SSL

sudo certbot --nginx -d yourdomain.com

Static Generation Alternative

If your site is fully static, run npx nuxi generate instead. This creates a .output/public directory you can serve directly with Nginx without a Node.js process, reducing resource usage on your Breeze.

Was this article helpful?