Blog · Deploy guides

How to deploy a Nuxt app in 2026: one command, a Node server and HTTPS

By the Pethost team · · 8 min read

You have a Nuxt app that runs with npm run dev, and you want it online at an address with HTTPS, rendering on the server. On Pethost that is one command, pethost deploy, run in the folder that has package.json. It writes the Dockerfile for you, runs nuxt build and starts the server that the build wrote. Nuxt's own starter was built and started in 53 seconds the first time.

In short
  • One command: pethost deploy in the folder that has package.json. There is no preset to choose and no start script to add.
  • What it does: finds nuxt and the script that runs nuxt build, writes a Dockerfile that runs it, and starts node .output/server/index.mjs.
  • The port: the Nuxt server listens on 3000. Pethost finds that and sends the address there, over HTTPS.
  • The address: https://nuxt-app.yourname.pethost.app at once. Your own domain is one DNS record.
  • The price: €9.99 a month for a machine of 2 vCPU, 3 GB and 30 GB that runs this app and every other project you have. There is no free tier.

What you need to deploy a Nuxt app in 2026

Three things: the app, the pethost command and a Pethost account.

The app here is what Nuxt's installation page leaves, with the minimal template and npm:

npm create nuxt@latest nuxt-app

It writes nuxt.config.ts, the app/ folder and a package.json with these scripts. None of them is a start script, and none is needed:

"scripts": {
  "build": "nuxt build",
  "dev": "nuxt dev",
  "generate": "nuxt generate",
  "preview": "nuxt preview",
  "postinstall": "nuxt prepare"
}

The command is one program, installed by one line. Every command it has is in the CLI's reference.

curl -fsSL https://pethost.dev/install.sh | sh      # macOS, Linux
irm https://pethost.dev/install.ps1 | iex           # Windows, in PowerShell

The account needs a plan. If you are not signed in, pethost deploy opens your browser and signs you in. If you have no plan yet, it shows you where to choose one, and waits.

Deploy the Nuxt app with one command

Go to the folder that has package.json and run pethost deploy. This is the whole screen, for the starter:

$ cd nuxt-app
$ pethost deploy
Name it [nuxt-app]:    it will live at https://nuxt-app.sam.pethost.app
✓ Packed 45 files, 450 KB   (left out node_modules)
✓ Uploaded straight to your machine
✗ /compose.yaml: the project directory has no compose.yaml at its root: add one
✓ Nuxt project detected, wrote Dockerfile.
✓ Packed 46 files, 451 KB   (left out node_modules)
✓ Uploaded straight to your machine
✓ Built and started in 53 s
  · wrote compose.yaml for the Dockerfile: the service app, reading .env
✓ app listens on 3000 → https://nuxt-app.sam.pethost.app
  It answers 200.

https://nuxt-app.sam.pethost.app

Wrote .pethost (commit it). Next:   pethost logs -f   ·   pethost open
  1. It asks one thing The project's name, which is the first word of its address. Enter takes the folder's name.
  2. The machine finds nothing to run The folder goes straight to your machine, without node_modules. The line with the cross is its answer: a project runs from a Dockerfile or a Compose file, and the folder has neither yet.
  3. pethost writes the Dockerfile It saw nuxt in package.json and a script that runs nuxt build, and uploads the folder again.
  4. The machine builds and starts it It sees that the server listens on 3000 and sends the address there. Then pethost asks the address itself, and prints what it answered: 200.

The file .pethost says which project this folder is. Commit it with the Dockerfile, and the next deploy asks nothing.

The Dockerfile that pethost writes for Nuxt

This is the file as it was written into the starter's folder, whole:

# Written by pethost deploy for this Nuxt project: Node 24 (no .nvmrc names another),
# npm installs it (package-lock.json), package.json builds it with "nuxt build", node
# runs .output/server/index.mjs (package.json has no start script).
# It is yours now: change it as you like. pethost does not write it again.

FROM node:24
WORKDIR /app

COPY . .

# Every dependency: what builds the project, and may start it, is among the ones for
# development.
RUN --mount=type=cache,target=/root/.npm \
    npm install

RUN npm run build

ENV NODE_ENV=production
CMD ["node", ".output/server/index.mjs"]

Its first lines say what pethost read in your folder. Three things come from there:

The running starter took 30 MB of memory. If the machine cannot build or start the Dockerfile pethost wrote, pethost takes the file back out of your folder and says what failed.

Runtime config and environment variables

Nuxt reads its runtime config from variables that begin with NUXT_ when the server starts. On Pethost a variable is one command. It goes into the project's .env file on the machine, which the service reads and every later deploy keeps:

pethost env set NUXT_PUBLIC_API_BASE=https://api.example.com
pethost env set NUXT_API_SECRET          # asks for the value without showing it

The app starts again with the new value. pethost env lists the names, and pethost env --show prints the file with its values.

Change a page and deploy again

Edit app/app.vue and run the same command. The second deploy of the starter took 12 seconds, because the machine keeps the build's layers and npm's cache:

$ pethost deploy
nuxt-app (.pethost)
✓ Packed 47 files · uploaded · built and started in 12 s
  · wrote compose.yaml for the Dockerfile: the service app, reading .env
  · kept the project's x-pethost
  It answers 200.
https://nuxt-app.sam.pethost.app

To deploy on every push instead, connect the repository once:

pethost github sam/nuxt-app          # from now on, every push deploys itself

Pethost reads only the repositories you gave its GitHub App. If a deploy goes wrong, pethost rollback puts the version before it back, and your machine keeps the three versions before the current one. An AI agent can do all of this for you through Pethost's MCP server: how an agent deploys and looks after a project.

Use your own domain for the Nuxt app

Any name under your account's domain is an address at once, with HTTPS. A domain you own takes one command and one DNS record:

pethost domain add app.example.com

The command prints the record to make: a CNAME from your name to your machine's name. The certificate comes by itself once the name resolves, and renews itself. pethost password puts a password page in front of the whole app, for one that is not public yet.

What you get for the price

Pethost is €9.99 a month for everything you host, on 2 vCPU, 3 GB of memory and 30 GB of disk. The starter's server took 30 MB of that memory, so the machine has room for the API the app calls, its database and your other projects. There is no fee per project and nothing metered: server rendering is not billed by the request.

What is already done on it: HTTPS with certificates that renew themselves, deploys from GitHub, nightly backups kept for 14 days, SSH into any container, and every request counted, with the busiest paths and the error rate of the last 30 days. The machine is always on, so a page never waits for a cold start. The plans are on the pricing part of the first page.

What each project takes. The capacity page: every project with its memory, CPU and disk.
The Pethost panel's capacity page: each project with its memory, CPU and disk.

Pethost is the best pick for

  • Vue developers with a full-stack app: the Nuxt server, its API routes and its database on one machine, on one bill
  • Solo developers with several side projects, each at an address of its own
  • People whose agent deploys for them: Claude Code or Codex puts the app online and reads its logs
  • Early startups who want a fixed monthly cost while the product is small

Look elsewhere if

  • Your application needs several regions or autoscaling

Questions

Does a Nuxt app need a Dockerfile to deploy?

On Pethost a project runs from a Dockerfile or a Compose file, and you do not have to write it: in a folder that has neither, pethost deploy writes the Dockerfile for a Nuxt project and deploys it. The file stays in your folder, and you can change it.

Which Nitro preset does Nuxt need on Pethost?

None has to be set. nuxt build writes a Node server into .output by default, and the Dockerfile starts it with node .output/server/index.mjs.

Which port does the Nuxt server listen on?

3000 by default. Pethost finds the port the running server listens on and sends the address there, over HTTPS, so there is no port to declare.

How do I set environment variables for a Nuxt app in production?

Run pethost env set NUXT_API_SECRET in the app's folder. It asks for the value without showing it and puts it into the project's .env file on the machine. Nuxt reads variables that begin with NUXT_ into its runtime config when the server starts.

Can I deploy a Nuxt app from GitHub on every push?

Yes. Deploy the folder once with pethost deploy, then run pethost github owner/repository. From then on every push to the repository deploys itself, and pethost rollback goes back to an earlier commit.

What does it cost to host a Nuxt app on Pethost?

€9.99 a month for the Starter machine of 2 vCPU, 3 GB and 30 GB, with no fee per project and no charge per request: the same machine runs your other apps, sites and databases. There is no free tier. Prices are without VAT.

The screens are deploys of the app that npm create nuxt@latest writes from its minimal template, with Nuxt 4.6.1 and pethost 0.2.1, on a test machine of ours. The account in them is the example one, sam.

  1. Nuxt: installation
  2. Nuxt: deployment
  3. Nuxt: runtime config
  4. pethost, the command line of Pethost

Put your projects online today

A machine of your own, as many projects as fit, one flat price. Nothing metered, nothing billed on top.

Host all your projects for €9.99/mo