Guides

Deploy a Next.js app

Take a Next.js repo from your editor to a live, operated URL — one prompt, about five minutes, no manifests by hand.

The whole path, end to end: point your coding agent at a Next.js repo and have it live on nyxory in about five minutes. You write one prompt; the nyxory agent does the deploy — build, secrets, image, rollout — and hands back a URL. No Dockerfile to write, no manifests to hand-edit.

Prereqs

  • Your agent is connected to nyxory — see Connect your agent
  • A Next.js repo (Pages Router or App Router, both fine)
  • Some headroom in your account — your agent checks this for you

1. Open the repo, then ask

Open the Next.js project in your connected editor and say what you want:

deploy this Next.js app to nyxory

To send it to a specific project, name it:

deploy this Next.js app to my “widget” project on nyxory

2. Let it work

From here it’s hands-off. Your agent pulls the recipe for a Next.js app and works through the deploy — and you see each step as it happens:

  • it clones the repo into an isolated workspace off your machine (private repo? it hands you a one-time GitHub App install link)
  • it inspects package.json and your environment, and asks which values are secrets versus build-time embeds
  • it builds a container image and rolls it out

Any of these can pause for a quick question — an ambiguous secret, a non-standard build script, an unfamiliar dependency. You’re not driving the deploy; you’re approving it.

3. Watch it land

When the deploy resolves, your agent returns a URL like https://widget-<id>.nyxory.app, and the app appears in the console — live, with its resource usage and traffic. Watch it from whichever side you prefer:

nyx app list                        # everything you're running
nyx app get widget my-nextjs        # one app, including its live host
nyx app logs widget my-nextjs       # container logs, no kubectl hop

Or open Projects → widget → Apps in the console.

4. Verify it’s live

Read the host from nyx app get, then probe it:

nyx app get widget my-nextjs --json | jq -r '.data.domains[0]'
curl -I https://my-nextjs-<namespace>.nyxory.app

Expect 200 OK, or just open it in your browser. (nyx app verify widget my-nextjs runs the probe for you.)

Getting Next.js right

Tip:

  • output: 'standalone' in next.config.js produces a smaller, faster-starting container. Highly recommended — your agent will set it for you if it isn’t already.
  • Env vars as secrets vs build-time embeds. NEXT_PUBLIC_* vars are baked into the client bundle; everything else stays server-side. Your agent asks you which is which when it detects ambiguity in .env.
  • Static asset paths under a path prefix. If you’ve configured basePath or assetPrefix, double-check the ingress host matches — broken images are usually a basePath mismatch.
  • Image optimization. Next’s image loader needs unoptimized: true or a remote loader config if you don’t want runtime image processing in the pod.

Next steps

Ask any AI about nyxory