Back to all templates
Next.js logo

Next.js

Development512MB+ RAM

Production-ready Next.js application (requires existing Next.js project with package.json)

developmentframeworksnextjsopen-sourceself-hosteddocker

Deploy Next.js in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Next.js

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
Terminal Deployment

Next.js CLI Deployment

Deploy Next.js the traditional way with SSH and Docker Compose.

1

SSH into Your Server

Launch your preferred terminal and connect to your VPS using SSH.

terminal
# Log into your server
ssh root@<your-server-ip>

# If using key-based auth
ssh -i ~/.ssh/my-key root@<your-server-ip>

First time? Docker not installed? Run: curl -fsSL https://get.docker.com | sh

2

Create Working Directory

Prepare a directory for your application files and configuration.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/nextjs
cd ~/apps/nextjs
3

Configure Your Containers

Create the Docker Compose configuration file with these contents:

docker-compose.yml
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - PORT=3000
      - HOSTNAME=0.0.0.0
      - NEXT_TELEMETRY_DISABLED=1
    restart: unless-stopped
Deployment Settings
PORTHost port to expose(default: 3000)
4

Deploy with Docker Compose

Launch the application stack using Docker Compose.

terminal
# Deploy the application
docker compose up -d

# Check container health
docker compose ps

# Monitor logs
docker compose logs -f --tail=100
5

Open Required Ports

Enable external access by opening the necessary port.

terminal
# Allow the application port through firewall
sudo ufw allow 3000/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:3000
Skip the Terminal

There's an easier way. Meet Server Compass.

Server Compass makes deploying Next.js effortless. Visual setup, one-click deploy, done.

  • Intuitive dashboard
  • Deploy in 3 minutes
  • Free SSL included
  • Blue-green deploys
  • Real-time logs
  • Version history
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Next.js with Server Compass, complete these steps to finish setup

1

Test the application

2

Set up reverse proxy for HTTPS

Need help? Check out our documentation for detailed guides.

Next.js FAQ

Common questions about self-hosting Next.js

How do I deploy Next.js with Server Compass?

Simply download Server Compass, connect to your VPS, and select Next.js from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for Next.js?

Next.js requires a minimum of 512MB RAM. We recommend a VPS with at least 1024MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing Next.js data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Next.js backup and restore procedures.

How do I update Next.js to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Next.js image will be pulled and deployed with zero downtime.

Is Next.js free to self-host?

Next.js is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host Next.js?

Download Server Compass and deploy Next.js to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass