nextdeploy

module
v0.14.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT

README

NextDeploy

Deploy Next.js apps to a VPS, AWS Lambda, or Cloudflare Workers from one config file and one command. Open source, self-hosted, no vendor lock-in.

curl -fsSL https://nextdeploy.org/install.sh | bash

Windows: download install.bat from https://nextdeploy.org/install.bat.

Questions, bug reports, or just want to follow along? Join the community on Discord.

Quick start

nextdeploy init     # scaffold nextdeploy.yml in your Next.js repo
nextdeploy plan     # show what will happen, change nothing
nextdeploy ship     # build + push + deploy to your target
nextdeploy logs -f  # tail production logs

nextdeploy.yml holds everything — target type, domain, server, secrets provider. See sample.nextdeploy.yml in this repo for the full schema.

Targets

Target Status What it gives you
VPS stable Caddy + the nextdeployd daemon over SSH
AWS stable Lambda + S3 + CloudFront, full SSR/ISR/image opt
Cloudflare beta Workers + R2 + KV via the nextcompile adapter

Build from source

git clone https://github.com/aynaash/NextDeploy
cd NextDeploy
go build -o nextdeploy ./cli

Requires Go 1.25+. The release binaries on GitHub are built with GoReleaser; see .goreleaser.yml.

Repository layout

cli/                       Cobra CLI entry, all top-level commands
daemon/                    nextdeployd — the agent that runs on each VPS
shared/nextcompile/        Build-time compiler + JS runtime for CF Workers
shared/nextcore/           Next.js project introspection (config, routes, deps)
cli/internal/serverless/   AWS adapter (Lambda, S3, CloudFront, ACM)
sample.nextdeploy.yml      Annotated reference config

Documentation

Contributing

Issues and PRs welcome. Run go test ./... before pushing — the release pipeline is gated on a green test run. For larger changes, open an issue first so we can align on direction. The Discord is the fastest place to get a yes/no on direction before you spend time on a PR.

License

MIT — see LICENSE.

Directories

Path Synopsis
cli
NextDeploy CLI is a command-line interface for interacting with and managing Next.js app deployments across self-hosted infrastructure.
NextDeploy CLI is a command-line interface for interacting with and managing Next.js app deployments across self-hosted infrastructure.
cmd
NextDeploy - A clean and powerful CLI for Next.js deployments
NextDeploy - A clean and powerful CLI for Next.js deployments
internal/buildflow
Package buildflow is the single entry point for "prepare a Next.js project for deployment".
Package buildflow is the single entry point for "prepare a Next.js project for deployment".
internal/infrasniff
Package infrasniff inspects a Next.js project's source tree and package.json to infer which Cloudflare resources it needs (D1, R2, KV, Workers AI, Hyperdrive, Vectorize, Queues), which server-side secrets it references, and whether it has an auth layer worth protecting.
Package infrasniff inspects a Next.js project's source tree and package.json to infer which Cloudflare resources it needs (D1, R2, KV, Workers AI, Hyperdrive, Vectorize, Queues), which server-side secrets it references, and whether it has an auth layer worth protecting.
internal/scaffold
Package scaffold generates a Cloudflare-ready fullstack Next.js starter (App Router + Drizzle + better-auth + R2 + Workers AI + proxy.ts guard) from embedded templates.
Package scaffold generates a Cloudflare-ready fullstack Next.js starter (App Router + Drizzle + better-auth + R2 + Workers AI + proxy.ts guard) from embedded templates.
internal/serverless/cfstate
Package cfstate is the persistent, encrypted record of the Cloudflare resources NextDeploy has provisioned (D1, KV, Hyperdrive, Queues, Vectorize, …) keyed by kind+name → real CF ID.
Package cfstate is the persistent, encrypted record of the Cloudflare resources NextDeploy has provisioned (D1, KV, Hyperdrive, Queues, Vectorize, …) keyed by kind+name → real CF ID.
cmd
imgopt command
revalidator command
daemon
cmd/decrypt command
cmd/nextdeployd command
internal
credstore
Package credstore stores cloud-provider credentials at rest, encrypted with a per-machine master key.
Package credstore stores cloud-provider credentials at rest, encrypted with a per-machine master key.
fs
git
nextbuild
Package nextbuild owns the `next build` invocation so the CLI can guarantee the build flags are correct for the chosen deployment target.
Package nextbuild owns the `next build` invocation so the CLI can guarantee the build flags are correct for the chosen deployment target.
nextcompile
Package nextcompile transforms a Next.js standalone build into a runtime-native Worker/Lambda bundle by analyzing the compiled output and emitting a dispatch table + manifest that a minimal JS runtime consumes at request time.
Package nextcompile transforms a Next.js standalone build into a runtime-native Worker/Lambda bundle by analyzing the compiled output and emitting a dispatch table + manifest that a minimal JS runtime consumes at request time.
protection
Package protection builds the edge-guard runtime config from a user's protection spec.
Package protection builds the edge-guard runtime config from a user's protection spec.
sanitizer
Package sanitizer provides security-focused sanitization functions to prevent common vulnerabilities like command injection, path traversal, and other security issues.
Package sanitizer provides security-focused sanitization functions to prevent common vulnerabilities like command injection, path traversal, and other security issues.
secenv
Package secenv enforces a secure split between non-sensitive *vars* and *secrets*, and provides commit-safety + redaction helpers.
Package secenv enforces a secure split between non-sensitive *vars* and *secrets*, and provides commit-safety + redaction helpers.
sensitive
Package sensitive holds a process-wide registry of secret values that must never appear in any log line, error message, or stdout output.
Package sensitive holds a process-wide registry of secret values that must never appear in any log line, error message, or stdout output.
telemetry
Package telemetry sends a single anonymous "a project shipped" event on a successful deploy.
Package telemetry sends a single anonymous "a project shipped" event on a successful deploy.
utils
This package stores all util functions
This package stores all util functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL