Stileex

Application stack

Next.js and PostgreSQL server requirements: RAM, CPU and disk, measured by profile

Plan 2.02 GiB of RAM for a server running Next.js and PostgreSQL 16.0.10, system and Docker included: a 4 GB VPS with 1 vCPU held it with 50 simultaneous users, measured on a Simafri VPS Pro on 30 November 2026. Its working memory is 196 MiB at idle, 307 MiB with 10 simultaneous users and 342 MiB with 50 simultaneous users.

How much RAM, CPU and disk does Next.js and PostgreSQL need? To answer, Next.js and PostgreSQL 16.0.10 was installed the official way and measured at idle, with 10 simultaneous users and with 50 simultaneous users, at least two independent runs each, then replayed on a server cut to the smallest size that holds it.

Measured on 30 November 2026, method 1.4

Memory to plan

2.02 GiB

peak of the whole server, 1.62 GiB, plus 25%

Smallest validated size

1 vCPU, 4 GiB

a 4 GB VPS, replayed at that size with 50 simultaneous users

In short: Next.js and PostgreSQL minimum requirements

  • At idle, Next.js and PostgreSQL 16.0.10 uses 196 MiB of working memory for the whole stack, and 0.91% of one vCPU on average.
  • With 10 simultaneous users (light use), its working memory stays at 307 MiB (median) and peaks at 317 MiB; its CPU stays at 12.9% of one vCPU at the 95th percentile.
  • With 50 simultaneous users (sustained use), its working memory stays at 342 MiB (median) and peaks at 361 MiB; its CPU stays at 39.6% of one vCPU at the 95th percentile.
  • Building the application on the server takes 14.2 s and raises the working memory of the whole server to 1.60 GiB at its peak; with the build on the server, plan 2.02 GiB of RAM, and 906 MiB for a server that receives an image built elsewhere.
  • For the whole server, system and Docker included, plan 2.02 GiB of RAM: its highest working memory peak, 1.62 GiB, build of the application included, plus 25%. The smallest size that holds it is 1 vCPU and 4 GiB of memory, a 4 GB VPS, validated by a replay with 50 simultaneous users, build on the server included, on a server cut to that size.

Measured resources, by profile

Each value is the median of the independent runs of the profile, with the lowest and the highest in brackets. Working memory is the memory the processes really hold, without the file cache the system can take back; memory.peak is the highest memory the kernel counted against the server, file cache included.

Idle10 simultaneous users50 simultaneous users
Independent runs 222
Simultaneous users none1050
Reference dataset none1,000 invoices5,000 invoices
Working memory, median 196 MiB (195 to 196)307 MiB (303 to 311)342 MiB (336 to 347)
Working memory, 95th percentile 196 MiB313 MiB (310 to 317)358 MiB (348 to 367)
Working memory, peak 200 MiB317 MiB (312 to 321)361 MiB (352 to 371)
CPU, average 0.91% of one vCPU (0.9 to 0.91)4.87% of one vCPU (4.83 to 4.91)23.8% of one vCPU (23.4 to 24.1)
CPU, 95th percentile 4.5% of one vCPU (4.49 to 4.51)12.9% of one vCPU39.6% of one vCPU (38.9 to 40.3)
Disk reads, average 174 KiB/s173 KiB/s (173 to 174)173 KiB/s
Disk writes, average 0.46 KiB/s (0.38 to 0.54)4.04 KiB/s (4.03 to 4.05)15.3 KiB/s (15.2 to 15.5)
Whole server, system included, median 545 MiB (544 to 546)657 MiB (653 to 661)686 MiB
Whole server, working memory peak 554 MiB (554 to 555)671 MiB (666 to 676)715 MiB (705 to 725)
Whole server, memory.peak 558 MiB (557 to 560)675 MiB (672 to 678)719 MiB (710 to 729)
Memory to plan (peak of the server plus 25%) 1.99 GiB2.02 GiB2.01 GiB
Scenario response time, 95th percentile none23 ms38 ms (37 to 40)
Errors none0%0%

RAM of each service of Next.js and PostgreSQL

The median working memory of each service over the measurement window, then its average CPU, with the lowest and the highest of the runs in brackets.

Service Idle10 simultaneous users50 simultaneous users
Next.js 16 (next start, Node.js 22) 140 MiB (140 to 141), 0.0% of one vCPU242 MiB (238 to 246), 3.58% of one vCPU (3.54 to 3.61)267 MiB (262 to 273), 15.4% of one vCPU (15.2 to 15.7)
PostgreSQL 18 55.2 MiB, 0.91% of one vCPU (0.9 to 0.91)64.6 MiB (64.6 to 64.7), 1.3% of one vCPU (1.29 to 1.3)74.5 MiB (74.4 to 74.6), 8.32% of one vCPU (8.18 to 8.45)

Which server for Next.js and PostgreSQL: the smallest VPS that held

For the whole server, system and Docker included, plan 2.02 GiB of RAM: its highest working memory peak, 1.62 GiB, build of the application included, plus 25%. The smallest size that holds it is 1 vCPU and 4 GiB of memory, a 4 GB VPS, validated by a replay with 50 simultaneous users, build on the server included, on a server cut to that size.

Measured and validated on a Simafri VPS Pro. On Simafri, the plan that holds Next.js and PostgreSQL is the VPS Pro 2 (2 vCPU, 4 GB of RAM, 50 GB of disk), self-managed, or managed by Simafri, who runs the server for you.

The memory to plan is the highest working memory peak of the whole server, system, Docker and the application together, over every run and its first start and the build of the application on the server, plus 25%. The candidate size is the smallest one of the scale (memory of 512 MiB, 1, 2, 4, 8 or 16 GiB, and 1, 2, 4 or 8 vCPU, each on its own axis) that holds that memory and where CPU stays under 70% of its vCPU. It is validated only once the sustained profile has been played again on a server cut to exactly that size, and held.

Building the application on the server

Next.js and PostgreSQL builds the application it deploys on the server it runs on. The build is measured apart, from the start of the deployment to the application answering: it often decides the smallest server. Building the application on the server takes 14.2 s and raises the working memory of the whole server to 1.60 GiB at its peak; with the build on the server, plan 2.02 GiB of RAM, and 906 MiB for a server that receives an image built elsewhere.

Profiles that build the application on the server
Idle, 10 simultaneous users, 50 simultaneous users
Builds measured
6
Duration of the build
14.2 s (14.0 to 15.0)
Peak working memory of the whole server during the build
1.60 GiB (1.46 to 1.62)
memory.peak of the whole server during the build
1.62 GiB (1.59 to 1.64)
Peak working memory of the services during the build
1.31 GiB (1.16 to 1.33)
CPU of the whole server during the build, 95th percentile
379% of one vCPU (367 to 388)
Memory to plan for the build (its peak plus 25%)
2.02 GiB
Memory to plan without the build, for an image built elsewhere
906 MiB

Installation and disk

First healthy response after the start of the application
1.74 s (1.71 to 1.9)
Peak working memory of the stack during the first start and the migrations
52.0 MiB (51.8 to 54.5)
Peak working memory of the whole server during the first start
316 MiB (312 to 321)
Size of the images
400 MiB
Data on disk after installation
51.3 MiB
Disk growth per 1,000 invoices
0.33 MiB

The three profiles

The names of the profiles are the same for every application; their content is written for each one, in its own unit, and played the same way on every run.

Idle

Installed as the documentation describes, the first account created, no data: 10 minutes of rest, then 15 minutes measured.

10 simultaneous users (light use)

10 simultaneous users, simulated by k6 from another server, after a reference dataset of 1,000 invoices: 5 minutes of warm-up, then 30 minutes measured.

50 simultaneous users (sustained use)

50 simultaneous users, simulated by k6 from another server, after a reference dataset of 5,000 invoices: 5 minutes of warm-up, then 30 minutes measured.

Next.js and PostgreSQL run side by side on one server, nothing in front of them. The application is the final example of the official Next.js course, an invoice dashboard with sign-in, server components and server actions, the same one as on the Coolify page; it runs as the Next.js self-hosting guide describes it for a Node.js server, built with next build, then started with next start, in the official Node.js image, next to PostgreSQL in the official image. One simulated user is an employee with an account of the dashboard:

  • the build happens on the measured server, in every profile, after the data, since the dashboard is prerendered from the database; it is measured apart, from the start of the build to the application answering;
  • PostgreSQL runs with SSL on, as its image’s documentation shows it, since the application connects with SSL required, as on the hosted database the course uses;
  • each employee signs in through the form, then opens a view about every 5 seconds: the overview, a page of the invoice list, a search in the invoices, the customers, and 15% of the time creates an invoice through the form; each view is a full page load, and the scripts, styles and images it references are fetched the first time, as a browser cache does.

The response time is the time of each request of the views, sign-in and invoice creation included, straight to the Node.js server.

the placeholder data of the course, then one account and 100 invoices per simulated user, loaded into PostgreSQL before the build.

What the official documentation says about minimum requirements

Read on 30 November 2026, for version 16.0.10.

  • The documentation publishes no minimum memory, CPU or disk for Next.js and PostgreSQL. Source

Method, bench and data

Method 1.4. Bench: Simafri VPS Pro (LXC), Intel(R) Xeon(R) E-2388G CPU @ 3.20GHz, Linux 7.0.14-28-pve, Proxmox VE 9.2.26, Ubuntu 24.04.5 LTS, Docker 29.10.1, Compose 5.8.1, k6 v2.4.0.

Image measured: postgres:16.0.10@sha256:e742a2668255221388004f3a42b6150a2103f5054ab3a4a93ae9e4f01e551c35, node:16.0.10@sha256:be979e5523c76fa4d5ca4ebd3099078f220aa47ec39c48ad5b5df9314debd6eb

The method in full JSON

Data under the CC BY 4.0 license: you may reuse it, citing Stileex and linking to this page.

Cite this page: Stileex, "Next.js and PostgreSQL server requirements, measured", 30 November 2026, method 1.4, https://stileex.xyz/en/apps/nextjs-postgresql

Badge for the Next.js and PostgreSQL README

Measured by Stileex: 1 vCPU, 4 GiB

Markdown, to copy:

[![Measured by Stileex](https://stileex.xyz/apps/nextjs-postgresql/badge.svg)](https://stileex.xyz/en/apps/nextjs-postgresql)

Frequently asked questions

How much RAM does Next.js and PostgreSQL need?

Next.js and PostgreSQL 16.0.10, measured on 30 November 2026: 196 MiB of working memory at idle, 307 MiB with 10 simultaneous users and 342 MiB with 50 simultaneous users, for the whole stack. For the whole server, system and Docker included, plan 2.02 GiB of RAM; a 4 GB VPS with 1 vCPU held it with 50 simultaneous users, replayed on a server cut to that size.

Is 1 GB enough for Next.js and PostgreSQL?

Next.js and PostgreSQL 16.0.10, measured on 30 November 2026: plan 2.02 GiB of RAM for the whole server, system and Docker included; the smallest server that held it with 50 simultaneous users is a 4 GB VPS with 1 vCPU.

Can Next.js and PostgreSQL run on a 512 MB VPS?

Next.js and PostgreSQL 16.0.10, measured on 30 November 2026: the whole server, system and Docker included, needs 2.02 GiB of RAM, and the smallest server that held it with 50 simultaneous users is a 4 GB VPS with 1 vCPU.

How many users can Next.js and PostgreSQL handle on 1 GB?

Next.js and PostgreSQL 16.0.10, measured on 30 November 2026: The memory to plan for the whole server, system and Docker included, is 2.02 GiB with 10 simultaneous users and 2.01 GiB with 50 simultaneous users; the smallest server that held it with 50 simultaneous users is a 4 GB VPS with 1 vCPU.

How much RAM does building an application on Next.js and PostgreSQL take?

Next.js and PostgreSQL 16.0.10, measured on 30 November 2026: Building the application on the server takes 14.2 s and raises the working memory of the whole server to 1.60 GiB at its peak; with the build on the server, plan 2.02 GiB of RAM, and 906 MiB for a server that receives an image built elsewhere.

How much CPU does Next.js and PostgreSQL use?

On average 0.91% of one vCPU at idle and 23.8% of one vCPU with 50 simultaneous users, with 39.6% of one vCPU at the 95th percentile.

Which server should I choose for Next.js and PostgreSQL?

For the whole server, system and Docker included, plan 2.02 GiB of RAM: its highest working memory peak, 1.62 GiB, build of the application included, plus 25%. The smallest size that holds it is 1 vCPU and 4 GiB of memory, a 4 GB VPS, validated by a replay with 50 simultaneous users, build on the server included, on a server cut to that size. Every criterion held at that size: errors, response time, no stop for lack of memory, no page in swap, no restart. Measured and validated on a Simafri VPS Pro. On Simafri, the plan that holds Next.js and PostgreSQL is the VPS Pro 2 (2 vCPU, 4 GB of RAM, 50 GB of disk), self-managed, or managed by Simafri, who runs the server for you.

How were these figures measured?

On a dedicated bench, with the official installation, three profiles (idle, 10 simultaneous users and 50 simultaneous users) and at least two independent runs each, the memory and CPU of every service of the application read once per second in cgroup v2, then a replay at the smallest size that holds it. Method 1.4; the data and the scripts are public.