Whatβs New in PM2
Release highlights of the latest PM2 major versions. The complete list lives in the CHANGELOG and on the GitHub releases page.
PM2 7
The current major version. Check your version with pm2 -v and upgrade with npm install pm2@latest -g && pm2 update.
PM2 7.1
Breaking Changes
filter_env: trueworks again (7.1.2, was ignored since 4.4.1): apps only inheritPATH,HOME,USER, locales and a few OS variables besides theirenvβNODE_ENV,NODE_OPTIONS,HTTP_PROXYβ¦ must be declared inenv. It also applies to--update-envrestart/reload and to cluster workers. Apps started before 7.1.2 or withoutfilter_env(dump.pm2included) keep the env they already received:pm2 deletethem and start them again β see Environment Variables- Shell variables named like a PM2 option (
name,namespace,instances,port,time,watchβ¦) no longer override the app configuration nor reach fork mode apps (7.1.0): declare them inenv:β see Application Declaration - PM2.io agent:
PM2_PROXYsupport removed (broken since 7.0.0)
Features & Fixes
pm2 monit/pm2 dashpreload the last 200 log lines of every process (--lines <n>for more); Ctrl+Up / Ctrl+Down (and PageUp / PageDown) scroll the focused log paneexec_mode: clusteron a non Node.js/Bun script (bash, python, binary) falls back to fork mode with a warning- Cluster mode: output bypassing
process.stdout.write(pino,npm start, inherited stdio) now goes to the app log files instead ofpm2.log pm2 start --containeruses thekeymetrics/pm2:<node>-trixieimage β see Docker Integration
PM2 7.0.x
- Bun-only machines (no Node.js) need
nodesymlinked tobun:sudo ln -s $(which bun) /usr/local/bin/node(7.0.1) - TypeScript without Bun (7.0.4):
.tsapps run with Node.js native type stripping when bun is not installed (Node.js >= 22.18 / 23.6,--experimental-strip-typesadded automatically on 22.6+) β see Bun, Deno & other Runtimes - Built-in host metrics (7.0.2): the
pm2-sysmonitmodule is replaced by a built-in collector (Linux/macOS);pm2 lsshows a host-metrics line (CPU, RAM, disks, active network interfaces, GPU). Disable withpm2 set pm2:sysmonit false && pm2 update pm2 lsadaptive layout: picks the widest of full, condensed ormini(id Β· name Β· status Β· cpu Β· mem) that fits the terminal
PM2 7.0.0
Breaking Changes
- Requires Node.js >= 18 (Node.js 16 support dropped)
Runtime & Core
- Native Bun support: dedicated process containers for Bun in fork and cluster mode β see Bun, Deno & other Runtimes
- Major supply-chain surface reduction:
pm2-axon,pm2-axon-rpc,pm2-io-bpm,pm2-io-agent,fcloneand other dependencies internalized as local modules;needle,enquirer,promptly,mkdirp,source-map-support,sprintf-jsandfcloneremoved from npm dependencies in favor of native Node.js APIs - Rewritten TreeKill: a single process-snapshot with in-memory tree build eliminates race conditions when stopping process trees; SIGKILL escalation now targets surviving children directly
- OpenTelemetry tracing available via
pm2 install-oteland--trace
Security
- Fixed CVE-2025-5891 (ReDoS in configuration parsing) and CVE-2026-27699 (updated proxy-agent and basic-ftp)
- Fixed command injection vectors in
open()helpers (exec()replaced byexecFile(),SUDO_USERvalidated) - Fixed prototype pollution in
pm2 set/pm2 unsetvia__proto__key traversal
Features & Fixes
pm2 serve --ftpfor directory listing (pythonhttp.serverstyle)- Fixed environment variables leaking as
[object Object]to fork-mode subprocesses - Windows fixes: home path resolution via
os.homedir(), TreeKill callback consistency - Source maps handled natively by Node.js (
.mapauto-detection dropped) β see Source Maps
PM2 6.x Highlights
- Bun support landed in 6.0.5 (
pm2 start app.tsruns with Bun) - Git metadata parsing disabled by default (faster starts on large repositories)
- Smaller dependency footprint (
chalkreplaced,npm-shrinkwrapdropped in favor of fixed dependency versions) - Module updates from tarballs and namespaced NPM modules (
@org/module-name)
Staying Up To Date
npm install pm2@latest -g
pm2 update # replace the in-memory daemon, keeps your processes
See Update PM2 for details.
Contribute to this page