Migration runbook

Migrate Next.js from Vercel to DigitalOcean

Move Next.js from Vercel to a DigitalOcean Droplet with a Cloud Firewall, monitoring, backups, production validation, and reversible DNS cutover.

By HostNextJS Editorial TeamReviewed by HostNextJS Technical Review Published Updated
01Typemigration
02Last reviewed
03Update policyReview every 90 days and after material DigitalOcean Droplet, backup, firewall, or Next.js self-hosting changes.
Controlled change

Migration controls

01

Inventory

  • Target region, Droplet plan, image, VPC, public or Reserved IP, project, tags, Cloud Firewall, monitoring, and backup plan
  • Vercel domains, TTLs, environment scopes, managed services, integration variables, and rollback deployment
  • Database, object storage, cache, cron, email, identity, webhooks, analytics, and data transfer paths
  • Capacity, availability, recovery, compliance, and operator access requirements
02

Validation

  • The Cloud Firewall is attached by Droplet or stable tag and does not accidentally union with a broader allow rule
  • The VPC path, public proxy, TLS renewal, health checks, monitoring, logs, and backup restoration are tested
  • Critical routes, authentication, payments, uploads, email, webhooks, scheduled work, and analytics pass
  • CPU, memory, disk, transfer, latency, errors, and critical business outcomes stay within thresholds
03

Rollback

  • Keep the prior Vercel deployment, integrations, and original DNS values available
  • Define one rollback decision owner and measurable technical and business triggers
  • Restore the original DNS target and verify recovery from more than one resolver or region
  • Reconcile target-window writes, uploads, webhook deliveries, jobs, and messages before retrying
  1. 01

    Provision the Droplet safely

    Choose the region and plan, attach SSH keys, enable improved metrics, decide the backup policy, and apply a tag-based Cloud Firewall before public traffic.

  2. 02

    Install the production path

    Configure the supported runtime, non-root service account, process supervisor, reverse proxy, TLS, logs, alerts, and immutable release directories.

  3. 03

    Test the candidate endpoint

    Run production-hostname checks against the Droplet or Reserved IP, including dynamic routes, images, streaming, cache behavior, integrations, and graceful shutdown.

  4. 04

    Move traffic reversibly

    Lower TTL, freeze unrelated changes, update the authoritative A or AAAA record, observe written thresholds, and retain Vercel until reconciliation finishes.

A DigitalOcean Droplet is a Linux virtual machine, not a managed Next.js runtime. The move succeeds when the team deliberately replaces Vercel’s deployment, scaling, networking, observability, and service integrations, not when a Node process merely starts on port 3000.

Provision for replacement, not repair in place

Choose the region near users and stateful dependencies. Use SSH keys, attach the Droplet to the intended VPC, enable improved metrics, and apply a Cloud Firewall by stable resource tag when replacement instances should inherit policy. Review every firewall attached to the Droplet because DigitalOcean applies the union of their allow rules.

Run Next.js as an unprivileged supervised process behind a reverse proxy. Keep immutable release directories or images so rollback does not depend on rebuilding during an incident. Decide whether a Reserved IP, load balancer, or DNS record is the stable traffic boundary before cutover.

Prove operations and recovery

Trigger alerts, stop and restart the process, validate TLS renewal, and restore a backup to a separate Droplet. Provider monitoring and disk images are useful controls, but they do not replace application logs, transaction checks, database recovery, or external service reconciliation.

Test the candidate using the production hostname before changing public DNS. Verify streamed responses are not buffered, image optimization has enough memory, caches survive as intended, and shutdown drains in-flight work.

Cut over with a written abort rule

Record the exact old and new DNS values, lower TTL early, and assign one decision owner. Watch resource saturation and user outcomes after the switch. A rollback restores traffic to Vercel; it does not automatically undo writes or external events created while the Droplet was active, so reconciliation is part of the runbook.

Methodology

How this resource was produced

The runbook maps DigitalOcean Droplet, VPC, Cloud Firewall, monitoring, backup, and DNS controls to a portable Next.js Node.js deployment. It treats Droplets as operator-managed infrastructure and preserves Vercel as the traffic rollback target.

Limitations
  • 01

    This guide covers a Droplet, not DigitalOcean App Platform; their deployment and operating models differ.

  • 02

    Droplet backups and snapshots do not protect external services or guarantee application-consistent recovery.

FAQ

Questions about migrate next.js from vercel to digitalocean.

No fog. Just the practical details developers need before moving a production app.

Does a Reserved IP eliminate DNS rollback?

No. It can simplify replacement within DigitalOcean, but returning traffic to Vercel still requires the documented DNS or routing action.

Are DigitalOcean backups enough for a database?

Not by themselves. Use database-aware backups and test restoration according to the application's recovery objectives.

Next step

Turn the resource into a deployment decision.

Review a DigitalOcean cutover