Back to blog
Guides1 min read

Deploy a Next.js app on your own server

From an empty server to a Next.js app on HTTPS with automatic deploys from GitHub, without writing a Dockerfile.

This guide takes an empty server to a Next.js app on HTTPS, deployed on every push to GitHub. You will not write a Dockerfile.

Before you start

You need a server with a public IP, a domain you can edit, and a Next.js repository on GitHub.

1. Install Deplo

Run the installer on the server as root:

Shell
curl -fsSL https://deplo.build/install.sh | bash

When it finishes it prints the address of the dashboard. Open it and create the first account: that account owns the instance.

2. Connect GitHub

From Git providers, connect your GitHub account and pick the repositories Deplo may read. Nothing else in your account is visible to it.

3. Create the app

Choose the repository and the branch. Deplo reads package.json, recognises Next.js and fills in the build for you:

Setting

Detected value

Install

bun install

Build

next build

Start

next start

Port

3000

You can change any of them before the first deploy.

4. Add the domain

Add your domain to the app and create an A record that points at the server. The certificate is issued as soon as the record resolves.

5. Ship

Push to the branch. Deplo builds the new version, checks that it answers, and only then moves the traffic to it.

TypeScript
// app/api/health/route.ts: what the health check calls
export function GET() {
  return Response.json({ ok: true });
}

That is the whole loop. Everything after this is a git push.

Ten minutes from now,
it's live.

Answer three questions and pick a host, or install Deplo on a server you already have. It's free, and leaving is as easy as arriving. What you do with the money you save is your business.

Deploy a Next.js app on your own server - Deplo