What is NextDeploy? Architecture, Runtime Models, and Complete Installation Guide
The foundational guide to NextDeploy: what it is, its dual-binary Go architecture, zero-downtime execution models across Linux VPS and Edge, and step-by-step installation instructions for Linux, macOS, and Windows.
NextDeploy is an open-source, compiled Go deployment toolkit and runtime designed specifically for Next.js 15+ App Router applications. It bridges the gap between the zero-friction developer experience of proprietary PaaS platforms and the cost efficiency, sovereignty, and control of deploying to your own infrastructure.
The velocity and polish of modern cloud platforms, with the pricing and independence of your own servers. Zero Docker overhead, zero Kubernetes complexity, and zero vendor lock-in.
What is NextDeploy?
For years, fullstack Next.js teams have been forced to choose between two painful extremes: accept steep vendor markup for bandwidth and serverless executions, or wrestle with sprawling Dockerfiles, brittle Docker daemon sockets, reverse proxies, and manual SSL certificate management on raw Linux servers.
NextDeploy eliminates this trade-off with a single, statically compiled Go binary (nextdeploy) paired with a lightweight host daemon (nextdeployd). It treats your Next.js application as a first-class production workload with native understanding of App Router streaming, Server Actions, React Server Component (.rsc) Flight payloads, Incremental Static Regeneration (ISR), and static chunk caching.
How NextDeploy Works: The Dual-Binary Architecture
NextDeploy divides responsibilities cleanly between your local development environment (or CI/CD runner) and the target production infrastructure:
Key Architectural Invariants & Guarantees
NextDeploy is built around rigorous production guarantees that ensure your site never experiences downtime, broken asset requests, or memory exhaustion:
Installation Guide: Installing NextDeploy
Because NextDeploy is a single Go binary, installation requires no Node.js package managers, global npm permissions, or complex system dependencies.
Method 1: One-Line Install Script (Linux & macOS — Recommended)
The fastest way to install or update NextDeploy:
curl -fsSL https://hersi.dev/install.sh | bashThis script detects your operating system and CPU architecture (x86_64 or ARM64 / Apple Silicon), downloads the latest binary into ~/.local/bin/nextdeploy, and ensures it is accessible on your system PATH.
Method 2: Windows PowerShell Installation
On Windows, execute the installer in PowerShell:
irm https://hersi.dev/install.ps1 | iexMethod 3: Direct Manual Binary Download
To inspect and download the release binary manually from GitHub:
1# Query latest GitHub tag and detect architecture
2TAG=$(curl -s https://api.github.com/repos/aynaash/NextDeploy/releases/latest | jq -r .tag_name)
3VERSION=${TAG#v}
4ARCH=$(uname -m); [ "$ARCH" = "x86_64" ] && ARCH=amd64; [ "$ARCH" = "aarch64" ] && ARCH=arm64
5OS=$(uname | tr '[:upper:]' '[:lower:]')
6
7# Download and unpack binary to ~/.local/bin
8mkdir -p ~/.local/bin
9curl -L "https://github.com/aynaash/NextDeploy/releases/download/${TAG}/nextdeploy_${VERSION}_${OS}_${ARCH}.tar.gz" \
10 | tar -xz -C ~/.local/bin nextdeploy
11chmod +x ~/.local/bin/nextdeploy
12
13# Add ~/.local/bin to PATH in your shell profile
14echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrcMethod 4: Compile from Source (Go 1.25+)
If you prefer building from the source repository:
1git clone https://github.com/aynaash/NextDeploy.git
2cd NextDeploy
3go build -o nextdeploy ./cli
4sudo mv nextdeploy /usr/local/bin/Verifying Your Installation
Confirm that the CLI is correctly installed and accessible:
nextdeploy versionQuick Start: Deploy Your First Next.js App
Deploying an application with NextDeploy takes just three simple steps:
Step 1: Initialize Manifest
Run nextdeploy init at the root of your Next.js project to generate nextdeploy.yml:
1cd my-nextjs-app
2nextdeploy initStep 2: Choose Your Target Configuration
Open nextdeploy.yml and configure your target:
1# Option A: Linux VPS with Caddy and automatic HTTPS
2version: "1.0"
3target_type: vps
4
5app:
6 name: my-app
7 domain: app.example.com
8 port: 3000
9
10servers:
11 - name: production
12 host: 203.0.113.10
13 username: ubuntu
14 key_path: ~/.ssh/id_ed25519
15
16# Option B: Serverless Cloudflare Edge
17# target_type: serverless
18# app:
19# name: my-edge-app
20# domain: edge.example.com
21# serverless:
22# provider: cloudflare
23# cloudflare:
24# bindings:
25# d1:
26# - { name: DB, id: <d1-database-id> }
27# r2:
28# - { name: ASSETS, bucket: my-app-assets }Step 3: Prepare & Ship
For a new VPS, prepare the server once, then ship anytime with zero downtime:
1# One-time host setup (provisions Caddy, Node.js, firewall & nextdeployd)
2nextdeploy prepare
3
4# Ship zero-downtime release with secrets
5doppler run -- nextdeploy shipWith NextDeploy, your infrastructure is deterministic, cost-effective, and fully automated. The next guide in this series dives deep into VPS zero-downtime Linux releases.