I can’t change the Node.js version in Nginx Unit.

adiar

New member
Joined
Dec 26, 2025
Messages
1
1766754017586.png
1766754059202.png

I’m confused because when creating a new application (such as Java, Python, or Ruby), there is an option to choose or change the runtime version. However, for Node.js, there is no such option.


I’ve tried several workarounds, including using a bash script and modifying the PATH to point to an NVM-managed Node.js version:
batuah@server:~$ which node
/home/batuah/.nvm/versions/node/v25.1.0/bin/node
But it still doesn’t work—the application returns a 503 error on the web.

Is there any way to solve this?
My role on the server is only as a regular user, not an administrator.
 
With Nginx Unit you can use only 1 version of NodeJS and there is no way to select the version you want.
But if you want to use specific version of NodeJS there, please refer to this page:


In any way NodeJS 25 is not in the list of supported versions yet. Currently you can use any of these versions:
Code:
da [root@server2 ~]# da build opt_help | grep node
nodejs_provider: distro, custom, nodesource-20, nodesource-22, nodesource-24. Current value: nodesource-24. Default value: distro.
[root@server2 ~]#
But if you have NodeJS 25 already installed as your own version, you can try to select/use "custom" value for "nodejs_provider" option and then rebuild Nginx Unit:
Code:
 da build unit
 
p.s. I'm not sure if nvm is safe enought when installed for global usage as "root" account.

Install nvm, nodejs then create symlink at "/usr/local/bin/{node , npm}" to nodejs binary.


Since you're not admin, so it's end here. No more reply.
 
Back
Top