General Questions
Yes. N99panel does support NodeJS. We support NodeJS with multiple versions 10, 12, 14, 16, 18, 20 along with npm accompanying the corresponding version.
There are two modes under which NodeJS apps can run. Dev. (development) or Prod. (production mode). A typical lifecycle of a NodeJS app would be to first develop/test it in dev. move, and then when you are sure that it runs as per your expectation, then you can setup the prod. mode for your App.
To learn more about dev. mode, please click here
To learn more about prod. mode, please click here
This FAQ article has been updated on 18/Dec/2023
In N99panel we offer multiple versions of NodeJS with associated NPM versions. But there may be a use case or a scenario where you simply need the default NodeJS version. This is especially true when you are trying to deploy Next.js Apps (refer https://n99panel.com/ufaq/how-to-run-a-next-js-on-n99panel/ ).
To setup the default node version along with its accompanying npm and npx versions, please follow the following steps
Step 1 – Log into your N99panel
Step 2 – Click on ‘List Users’ to list all users, and against the user under which you need to change the versions, please click ‘View/Change Node CLI version’
Step 3 – You would be able to see the current CLI version for node and also would be able to change the same.
Once you have changed the version, log in via SSH and type
node -v
This would show the applicable NodeJS’s CLI version.
Next.js can easily be run on N99panel . Before setting up your Next.js App, please ensure that you have gone through the FAQ article : https://n99panel.com/ufaq/does-n99panel-support-nodejs/
Now coming to Next.js, here we would provide by an example of how to set it up. As Next.js requires NodeJS version 18 or above on the command line, kindly follow this article to set your command line NodeJS version to 18 : https://n99panel.com/ufaq/how-to-add-a-default-node-and-npm-command-in-cli-or-ssh/ . Importantly, when you link the App from within N99panel’s console, please use ‘/’ as the value for ‘App Web Path’ . If you plan to run it on sub-url like /app1 , please design your App accordingly.
The example which we are going to follow in this case is mentioned at https://nextjs.org/learn-pages-router/basics/create-nextjs-app/setup . To properly deploy this Next.js app, we need to take these steps.
Step 1 – SSH as the user under whose VHost/Website the Next.js app is to be set. Here we assume the username to be user1
Step 2 – Change directory to node_apps using the command
cd node_apps
Step 3 – Install the App using the command
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"
The above command will install the app under the folder nextjs-blog
Now change the directory to nextjs-blog folder
cd nextjs-blog
Now initially we need to run the App under N99panel’s NodeJS’s Development mode at a port number as specified while linking the App from under N99panel. Here this author assume’s that the port number is 50011 . And later we plan to run this App in N99panel’s NodeJS’s Production mode at port number 40011. Therefore we need to appropriately adjust its package.json as under
{
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev -p 50011",
"start": "next start -p 40011"
},
"dependencies": {
"next": "latest",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"engines": {
"node": ">=18"
}
}
Now we just need to start the App using the command
npm run dev
Now from within N99panel console, link a Node App in development mode using the following values for the concerned fields
App Web Path : /
App Port : 50011
App Mode : Development
If you have properly linked your App from within N99panel’s console, you should be able to see a working App on your App URL which in this case is just /
If the App does not work at this stage, you need to resolve the issues pertaining to it before moving to the next step i.e. running the App in production mode.
Step 4 – If your app is running as mentioned above, you need to stop it in your SSH console use Ctrl+c . And also remove it from within N99panel’s console.
Step 5 – To prepare the App for production mode, you need to prepare it using
npm run build
Step 6 – Now from within N99panel console, link a Node App in Production more using the following values for the concerned fields
App Web Path : /
App Port : 40011
App Mode : Production (npm start)
Prod. filesystem Path : nextjs-blog
Prod. Node Version : 18
Now save it and wait for at-least one min to check via browser whether your App has come online or not.
Conclusion : Here we have seen that it is not that complicated to setup your Next.js App from within N99panel. For any questions/queries, please feel free to reach us at 91-9872263977
Under development mode, the NodeJS app is run via SSH. The port on which your App should run should be in the range of ports made available to the SSH user. To run the app in development mode
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range. If under the port range it shows ‘Requires user rebuild’, rebuild the user from Dashboard -> List Users -> Rebuild (for the desired user) and click ‘Rebuild User’. After rebuilding the user, revert to the ‘Link a Node App’ page.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port entered under should be within the range of the port numbers mentioned in point 3.
- Select the ‘App Mode’. This should be ‘Development’
- And finally click ‘Submit’
With the above steps, you have mapped the web-server to the VHost/Website’s URL part and the port number where we can expect the NodeJS App to be running.
N99panel comes with multiple NodeJS versions i.e. 10, 12, 14, 16, 18, 20. These versions can be referenced from within SSH using the commands node10 , node12 , node14, node16, node18, node20 respectively. The npm’s accompanying these versions can be referenced via npm10 , npm12 , npm14, npm16, npm18, npm20 respectively.
Now to run the App,
- Login into the server/VPS via SSH of the user ID under which the VHost/website is running.
- Though you can run the NodeJS App from any folder, but ideally create a new App folder within the node_apps folder. This would help later also when we shift this App to the Production mode.
- Now assuming that you created a app folder app1 , now under that folder upload all your source files including package.json
- Lets’s say that we wish to user version 16 , to run NPM commands w.r.t. that ideally we will use npm16Â .
- To run the app, we should first ensure that the NodeJS source file creates the Node server at ‘App Port’ number. We’ll explain further via example
- Let’s say the user port range is 50001 to 50010 , and the port we entered under ‘App Port’ is 50001
- Now my app file is say app.js . In my app.js I would need to create the server on port 50001 .
- To now actually run the app, we just need to type
node16 app.js &
Above process would now start the App as a background process. If there are errors, it will simply show the errors and the process would end. And when you fix the errors, you can again try starting the App.
When you believe that you app is running stably and as per your expectations, at that moment you can decide to shift your App to the Production mode. Click here to read about it.
You should run your NodeJS App in production mode only when you are sure that your App will run in a stable way. This you can easily ensure by first running your App in development mode. To run your app in development mode or to install requisite npm modules, please refer to the following link : https://n99panel.com/ufaq/how-to-run-work-with-development-mode-for-nodejs-apps .
Now to run the App in production mode,
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port on which your App creates the server. The value for the App Port should be in the range of 40000 to 50000
- Select the ‘App Mode’. This should be ‘Production (node)’ or ‘Production (npm start)’
- Now enter the reference to the App file in the ‘Prod. filesystem Path’ field. Your app should be in /home/{username}/node_apps . Ideally a separate folder so that you can run multiple apps without disturbing each other’s dependencies. Our app would typically be placed in a folder with /home/{username}/node_apps . Depending upon the ‘App Mode’, following points apply
- Now if our ‘App Mode’ was ‘Production (node)’, then this path should lead to a file. if my app files is app.js , the value entered in ‘Prod. filesystem Path’ will be app1/app.js , if app1 was the folder containing the app.
- But if our ‘App Mode’ was ‘Production (npm start)’, then this path show lead to a folder where your package.json resides. The example value for ‘Prod. filesystem Path’ can be app1 , implying the full path to be /home/{username}/node_apps/app1 .
- Next, select the ‘Prod. Node Version’ . The available versions are 10, 12, 14, 16, 18, 20
- Next if you wish to run a Redis instance alongside your App, enable the same by clicking the checkbox against ‘Redis (Prod. mode only)’
- And finally click ‘Submit’
Please note : Only one app can run on a given VHost/website and App Web path’ . If you were earlier running an app on development mode at that path, unlink that App first from within Dashboard -> Node Apps -> App : Remove Linking , and then link the same app again in production mode.
Before running your app in production mode, kindly test your app in development mode first. Only after extensive testing, you may then use production mode.
To manage the App process, you can do the same from within Node Apps -> App : Manage App State
As earlier mentioned in the FAQ, you can run NodeJS app either in developer mode or in production mode. Refer to this link for more details w.r.t. that.
Now lets say you are running your app as /app1 , the various static assets like images, css, js etc., should be placed under the VHost’s/Website’s folder i.e. /home/{username}/{vhost}_public_html/app1 .
If you were running your app as / or as website root, then all assets should be placed under /home/{username}/vhost_public_html
WordPress
Yes. N99panel does support NodeJS. We support NodeJS with multiple versions 10, 12, 14, 16, 18, 20 along with npm accompanying the corresponding version.
There are two modes under which NodeJS apps can run. Dev. (development) or Prod. (production mode). A typical lifecycle of a NodeJS app would be to first develop/test it in dev. move, and then when you are sure that it runs as per your expectation, then you can setup the prod. mode for your App.
To learn more about dev. mode, please click here
To learn more about prod. mode, please click here
This FAQ article has been updated on 18/Dec/2023
In N99panel we offer multiple versions of NodeJS with associated NPM versions. But there may be a use case or a scenario where you simply need the default NodeJS version. This is especially true when you are trying to deploy Next.js Apps (refer https://n99panel.com/ufaq/how-to-run-a-next-js-on-n99panel/ ).
To setup the default node version along with its accompanying npm and npx versions, please follow the following steps
Step 1 – Log into your N99panel
Step 2 – Click on ‘List Users’ to list all users, and against the user under which you need to change the versions, please click ‘View/Change Node CLI version’
Step 3 – You would be able to see the current CLI version for node and also would be able to change the same.
Once you have changed the version, log in via SSH and type
node -v
This would show the applicable NodeJS’s CLI version.
Next.js can easily be run on N99panel . Before setting up your Next.js App, please ensure that you have gone through the FAQ article : https://n99panel.com/ufaq/does-n99panel-support-nodejs/
Now coming to Next.js, here we would provide by an example of how to set it up. As Next.js requires NodeJS version 18 or above on the command line, kindly follow this article to set your command line NodeJS version to 18 : https://n99panel.com/ufaq/how-to-add-a-default-node-and-npm-command-in-cli-or-ssh/ . Importantly, when you link the App from within N99panel’s console, please use ‘/’ as the value for ‘App Web Path’ . If you plan to run it on sub-url like /app1 , please design your App accordingly.
The example which we are going to follow in this case is mentioned at https://nextjs.org/learn-pages-router/basics/create-nextjs-app/setup . To properly deploy this Next.js app, we need to take these steps.
Step 1 – SSH as the user under whose VHost/Website the Next.js app is to be set. Here we assume the username to be user1
Step 2 – Change directory to node_apps using the command
cd node_apps
Step 3 – Install the App using the command
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"
The above command will install the app under the folder nextjs-blog
Now change the directory to nextjs-blog folder
cd nextjs-blog
Now initially we need to run the App under N99panel’s NodeJS’s Development mode at a port number as specified while linking the App from under N99panel. Here this author assume’s that the port number is 50011 . And later we plan to run this App in N99panel’s NodeJS’s Production mode at port number 40011. Therefore we need to appropriately adjust its package.json as under
{
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev -p 50011",
"start": "next start -p 40011"
},
"dependencies": {
"next": "latest",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"engines": {
"node": ">=18"
}
}
Now we just need to start the App using the command
npm run dev
Now from within N99panel console, link a Node App in development mode using the following values for the concerned fields
App Web Path : /
App Port : 50011
App Mode : Development
If you have properly linked your App from within N99panel’s console, you should be able to see a working App on your App URL which in this case is just /
If the App does not work at this stage, you need to resolve the issues pertaining to it before moving to the next step i.e. running the App in production mode.
Step 4 – If your app is running as mentioned above, you need to stop it in your SSH console use Ctrl+c . And also remove it from within N99panel’s console.
Step 5 – To prepare the App for production mode, you need to prepare it using
npm run build
Step 6 – Now from within N99panel console, link a Node App in Production more using the following values for the concerned fields
App Web Path : /
App Port : 40011
App Mode : Production (npm start)
Prod. filesystem Path : nextjs-blog
Prod. Node Version : 18
Now save it and wait for at-least one min to check via browser whether your App has come online or not.
Conclusion : Here we have seen that it is not that complicated to setup your Next.js App from within N99panel. For any questions/queries, please feel free to reach us at 91-9872263977
Under development mode, the NodeJS app is run via SSH. The port on which your App should run should be in the range of ports made available to the SSH user. To run the app in development mode
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range. If under the port range it shows ‘Requires user rebuild’, rebuild the user from Dashboard -> List Users -> Rebuild (for the desired user) and click ‘Rebuild User’. After rebuilding the user, revert to the ‘Link a Node App’ page.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port entered under should be within the range of the port numbers mentioned in point 3.
- Select the ‘App Mode’. This should be ‘Development’
- And finally click ‘Submit’
With the above steps, you have mapped the web-server to the VHost/Website’s URL part and the port number where we can expect the NodeJS App to be running.
N99panel comes with multiple NodeJS versions i.e. 10, 12, 14, 16, 18, 20. These versions can be referenced from within SSH using the commands node10 , node12 , node14, node16, node18, node20 respectively. The npm’s accompanying these versions can be referenced via npm10 , npm12 , npm14, npm16, npm18, npm20 respectively.
Now to run the App,
- Login into the server/VPS via SSH of the user ID under which the VHost/website is running.
- Though you can run the NodeJS App from any folder, but ideally create a new App folder within the node_apps folder. This would help later also when we shift this App to the Production mode.
- Now assuming that you created a app folder app1 , now under that folder upload all your source files including package.json
- Lets’s say that we wish to user version 16 , to run NPM commands w.r.t. that ideally we will use npm16Â .
- To run the app, we should first ensure that the NodeJS source file creates the Node server at ‘App Port’ number. We’ll explain further via example
- Let’s say the user port range is 50001 to 50010 , and the port we entered under ‘App Port’ is 50001
- Now my app file is say app.js . In my app.js I would need to create the server on port 50001 .
- To now actually run the app, we just need to type
node16 app.js &
Above process would now start the App as a background process. If there are errors, it will simply show the errors and the process would end. And when you fix the errors, you can again try starting the App.
When you believe that you app is running stably and as per your expectations, at that moment you can decide to shift your App to the Production mode. Click here to read about it.
You should run your NodeJS App in production mode only when you are sure that your App will run in a stable way. This you can easily ensure by first running your App in development mode. To run your app in development mode or to install requisite npm modules, please refer to the following link : https://n99panel.com/ufaq/how-to-run-work-with-development-mode-for-nodejs-apps .
Now to run the App in production mode,
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port on which your App creates the server. The value for the App Port should be in the range of 40000 to 50000
- Select the ‘App Mode’. This should be ‘Production (node)’ or ‘Production (npm start)’
- Now enter the reference to the App file in the ‘Prod. filesystem Path’ field. Your app should be in /home/{username}/node_apps . Ideally a separate folder so that you can run multiple apps without disturbing each other’s dependencies. Our app would typically be placed in a folder with /home/{username}/node_apps . Depending upon the ‘App Mode’, following points apply
- Now if our ‘App Mode’ was ‘Production (node)’, then this path should lead to a file. if my app files is app.js , the value entered in ‘Prod. filesystem Path’ will be app1/app.js , if app1 was the folder containing the app.
- But if our ‘App Mode’ was ‘Production (npm start)’, then this path show lead to a folder where your package.json resides. The example value for ‘Prod. filesystem Path’ can be app1 , implying the full path to be /home/{username}/node_apps/app1 .
- Next, select the ‘Prod. Node Version’ . The available versions are 10, 12, 14, 16, 18, 20
- Next if you wish to run a Redis instance alongside your App, enable the same by clicking the checkbox against ‘Redis (Prod. mode only)’
- And finally click ‘Submit’
Please note : Only one app can run on a given VHost/website and App Web path’ . If you were earlier running an app on development mode at that path, unlink that App first from within Dashboard -> Node Apps -> App : Remove Linking , and then link the same app again in production mode.
Before running your app in production mode, kindly test your app in development mode first. Only after extensive testing, you may then use production mode.
To manage the App process, you can do the same from within Node Apps -> App : Manage App State
As earlier mentioned in the FAQ, you can run NodeJS app either in developer mode or in production mode. Refer to this link for more details w.r.t. that.
Now lets say you are running your app as /app1 , the various static assets like images, css, js etc., should be placed under the VHost’s/Website’s folder i.e. /home/{username}/{vhost}_public_html/app1 .
If you were running your app as / or as website root, then all assets should be placed under /home/{username}/vhost_public_html
NodeJS
Yes. N99panel does support NodeJS. We support NodeJS with multiple versions 10, 12, 14, 16, 18, 20 along with npm accompanying the corresponding version.
There are two modes under which NodeJS apps can run. Dev. (development) or Prod. (production mode). A typical lifecycle of a NodeJS app would be to first develop/test it in dev. move, and then when you are sure that it runs as per your expectation, then you can setup the prod. mode for your App.
To learn more about dev. mode, please click here
To learn more about prod. mode, please click here
This FAQ article has been updated on 18/Dec/2023
In N99panel we offer multiple versions of NodeJS with associated NPM versions. But there may be a use case or a scenario where you simply need the default NodeJS version. This is especially true when you are trying to deploy Next.js Apps (refer https://n99panel.com/ufaq/how-to-run-a-next-js-on-n99panel/ ).
To setup the default node version along with its accompanying npm and npx versions, please follow the following steps
Step 1 – Log into your N99panel
Step 2 – Click on ‘List Users’ to list all users, and against the user under which you need to change the versions, please click ‘View/Change Node CLI version’
Step 3 – You would be able to see the current CLI version for node and also would be able to change the same.
Once you have changed the version, log in via SSH and type
node -v
This would show the applicable NodeJS’s CLI version.
Next.js can easily be run on N99panel . Before setting up your Next.js App, please ensure that you have gone through the FAQ article : https://n99panel.com/ufaq/does-n99panel-support-nodejs/
Now coming to Next.js, here we would provide by an example of how to set it up. As Next.js requires NodeJS version 18 or above on the command line, kindly follow this article to set your command line NodeJS version to 18 : https://n99panel.com/ufaq/how-to-add-a-default-node-and-npm-command-in-cli-or-ssh/ . Importantly, when you link the App from within N99panel’s console, please use ‘/’ as the value for ‘App Web Path’ . If you plan to run it on sub-url like /app1 , please design your App accordingly.
The example which we are going to follow in this case is mentioned at https://nextjs.org/learn-pages-router/basics/create-nextjs-app/setup . To properly deploy this Next.js app, we need to take these steps.
Step 1 – SSH as the user under whose VHost/Website the Next.js app is to be set. Here we assume the username to be user1
Step 2 – Change directory to node_apps using the command
cd node_apps
Step 3 – Install the App using the command
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"
The above command will install the app under the folder nextjs-blog
Now change the directory to nextjs-blog folder
cd nextjs-blog
Now initially we need to run the App under N99panel’s NodeJS’s Development mode at a port number as specified while linking the App from under N99panel. Here this author assume’s that the port number is 50011 . And later we plan to run this App in N99panel’s NodeJS’s Production mode at port number 40011. Therefore we need to appropriately adjust its package.json as under
{
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev -p 50011",
"start": "next start -p 40011"
},
"dependencies": {
"next": "latest",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"engines": {
"node": ">=18"
}
}
Now we just need to start the App using the command
npm run dev
Now from within N99panel console, link a Node App in development mode using the following values for the concerned fields
App Web Path : /
App Port : 50011
App Mode : Development
If you have properly linked your App from within N99panel’s console, you should be able to see a working App on your App URL which in this case is just /
If the App does not work at this stage, you need to resolve the issues pertaining to it before moving to the next step i.e. running the App in production mode.
Step 4 – If your app is running as mentioned above, you need to stop it in your SSH console use Ctrl+c . And also remove it from within N99panel’s console.
Step 5 – To prepare the App for production mode, you need to prepare it using
npm run build
Step 6 – Now from within N99panel console, link a Node App in Production more using the following values for the concerned fields
App Web Path : /
App Port : 40011
App Mode : Production (npm start)
Prod. filesystem Path : nextjs-blog
Prod. Node Version : 18
Now save it and wait for at-least one min to check via browser whether your App has come online or not.
Conclusion : Here we have seen that it is not that complicated to setup your Next.js App from within N99panel. For any questions/queries, please feel free to reach us at 91-9872263977
Under development mode, the NodeJS app is run via SSH. The port on which your App should run should be in the range of ports made available to the SSH user. To run the app in development mode
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range. If under the port range it shows ‘Requires user rebuild’, rebuild the user from Dashboard -> List Users -> Rebuild (for the desired user) and click ‘Rebuild User’. After rebuilding the user, revert to the ‘Link a Node App’ page.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port entered under should be within the range of the port numbers mentioned in point 3.
- Select the ‘App Mode’. This should be ‘Development’
- And finally click ‘Submit’
With the above steps, you have mapped the web-server to the VHost/Website’s URL part and the port number where we can expect the NodeJS App to be running.
N99panel comes with multiple NodeJS versions i.e. 10, 12, 14, 16, 18, 20. These versions can be referenced from within SSH using the commands node10 , node12 , node14, node16, node18, node20 respectively. The npm’s accompanying these versions can be referenced via npm10 , npm12 , npm14, npm16, npm18, npm20 respectively.
Now to run the App,
- Login into the server/VPS via SSH of the user ID under which the VHost/website is running.
- Though you can run the NodeJS App from any folder, but ideally create a new App folder within the node_apps folder. This would help later also when we shift this App to the Production mode.
- Now assuming that you created a app folder app1 , now under that folder upload all your source files including package.json
- Lets’s say that we wish to user version 16 , to run NPM commands w.r.t. that ideally we will use npm16Â .
- To run the app, we should first ensure that the NodeJS source file creates the Node server at ‘App Port’ number. We’ll explain further via example
- Let’s say the user port range is 50001 to 50010 , and the port we entered under ‘App Port’ is 50001
- Now my app file is say app.js . In my app.js I would need to create the server on port 50001 .
- To now actually run the app, we just need to type
node16 app.js &
Above process would now start the App as a background process. If there are errors, it will simply show the errors and the process would end. And when you fix the errors, you can again try starting the App.
When you believe that you app is running stably and as per your expectations, at that moment you can decide to shift your App to the Production mode. Click here to read about it.
You should run your NodeJS App in production mode only when you are sure that your App will run in a stable way. This you can easily ensure by first running your App in development mode. To run your app in development mode or to install requisite npm modules, please refer to the following link : https://n99panel.com/ufaq/how-to-run-work-with-development-mode-for-nodejs-apps .
Now to run the App in production mode,
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port on which your App creates the server. The value for the App Port should be in the range of 40000 to 50000
- Select the ‘App Mode’. This should be ‘Production (node)’ or ‘Production (npm start)’
- Now enter the reference to the App file in the ‘Prod. filesystem Path’ field. Your app should be in /home/{username}/node_apps . Ideally a separate folder so that you can run multiple apps without disturbing each other’s dependencies. Our app would typically be placed in a folder with /home/{username}/node_apps . Depending upon the ‘App Mode’, following points apply
- Now if our ‘App Mode’ was ‘Production (node)’, then this path should lead to a file. if my app files is app.js , the value entered in ‘Prod. filesystem Path’ will be app1/app.js , if app1 was the folder containing the app.
- But if our ‘App Mode’ was ‘Production (npm start)’, then this path show lead to a folder where your package.json resides. The example value for ‘Prod. filesystem Path’ can be app1 , implying the full path to be /home/{username}/node_apps/app1 .
- Next, select the ‘Prod. Node Version’ . The available versions are 10, 12, 14, 16, 18, 20
- Next if you wish to run a Redis instance alongside your App, enable the same by clicking the checkbox against ‘Redis (Prod. mode only)’
- And finally click ‘Submit’
Please note : Only one app can run on a given VHost/website and App Web path’ . If you were earlier running an app on development mode at that path, unlink that App first from within Dashboard -> Node Apps -> App : Remove Linking , and then link the same app again in production mode.
Before running your app in production mode, kindly test your app in development mode first. Only after extensive testing, you may then use production mode.
To manage the App process, you can do the same from within Node Apps -> App : Manage App State
As earlier mentioned in the FAQ, you can run NodeJS app either in developer mode or in production mode. Refer to this link for more details w.r.t. that.
Now lets say you are running your app as /app1 , the various static assets like images, css, js etc., should be placed under the VHost’s/Website’s folder i.e. /home/{username}/{vhost}_public_html/app1 .
If you were running your app as / or as website root, then all assets should be placed under /home/{username}/vhost_public_html
MySQL
Yes. N99panel does support NodeJS. We support NodeJS with multiple versions 10, 12, 14, 16, 18, 20 along with npm accompanying the corresponding version.
There are two modes under which NodeJS apps can run. Dev. (development) or Prod. (production mode). A typical lifecycle of a NodeJS app would be to first develop/test it in dev. move, and then when you are sure that it runs as per your expectation, then you can setup the prod. mode for your App.
To learn more about dev. mode, please click here
To learn more about prod. mode, please click here
This FAQ article has been updated on 18/Dec/2023
In N99panel we offer multiple versions of NodeJS with associated NPM versions. But there may be a use case or a scenario where you simply need the default NodeJS version. This is especially true when you are trying to deploy Next.js Apps (refer https://n99panel.com/ufaq/how-to-run-a-next-js-on-n99panel/ ).
To setup the default node version along with its accompanying npm and npx versions, please follow the following steps
Step 1 – Log into your N99panel
Step 2 – Click on ‘List Users’ to list all users, and against the user under which you need to change the versions, please click ‘View/Change Node CLI version’
Step 3 – You would be able to see the current CLI version for node and also would be able to change the same.
Once you have changed the version, log in via SSH and type
node -v
This would show the applicable NodeJS’s CLI version.
Next.js can easily be run on N99panel . Before setting up your Next.js App, please ensure that you have gone through the FAQ article : https://n99panel.com/ufaq/does-n99panel-support-nodejs/
Now coming to Next.js, here we would provide by an example of how to set it up. As Next.js requires NodeJS version 18 or above on the command line, kindly follow this article to set your command line NodeJS version to 18 : https://n99panel.com/ufaq/how-to-add-a-default-node-and-npm-command-in-cli-or-ssh/ . Importantly, when you link the App from within N99panel’s console, please use ‘/’ as the value for ‘App Web Path’ . If you plan to run it on sub-url like /app1 , please design your App accordingly.
The example which we are going to follow in this case is mentioned at https://nextjs.org/learn-pages-router/basics/create-nextjs-app/setup . To properly deploy this Next.js app, we need to take these steps.
Step 1 – SSH as the user under whose VHost/Website the Next.js app is to be set. Here we assume the username to be user1
Step 2 – Change directory to node_apps using the command
cd node_apps
Step 3 – Install the App using the command
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"
The above command will install the app under the folder nextjs-blog
Now change the directory to nextjs-blog folder
cd nextjs-blog
Now initially we need to run the App under N99panel’s NodeJS’s Development mode at a port number as specified while linking the App from under N99panel. Here this author assume’s that the port number is 50011 . And later we plan to run this App in N99panel’s NodeJS’s Production mode at port number 40011. Therefore we need to appropriately adjust its package.json as under
{
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev -p 50011",
"start": "next start -p 40011"
},
"dependencies": {
"next": "latest",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"engines": {
"node": ">=18"
}
}
Now we just need to start the App using the command
npm run dev
Now from within N99panel console, link a Node App in development mode using the following values for the concerned fields
App Web Path : /
App Port : 50011
App Mode : Development
If you have properly linked your App from within N99panel’s console, you should be able to see a working App on your App URL which in this case is just /
If the App does not work at this stage, you need to resolve the issues pertaining to it before moving to the next step i.e. running the App in production mode.
Step 4 – If your app is running as mentioned above, you need to stop it in your SSH console use Ctrl+c . And also remove it from within N99panel’s console.
Step 5 – To prepare the App for production mode, you need to prepare it using
npm run build
Step 6 – Now from within N99panel console, link a Node App in Production more using the following values for the concerned fields
App Web Path : /
App Port : 40011
App Mode : Production (npm start)
Prod. filesystem Path : nextjs-blog
Prod. Node Version : 18
Now save it and wait for at-least one min to check via browser whether your App has come online or not.
Conclusion : Here we have seen that it is not that complicated to setup your Next.js App from within N99panel. For any questions/queries, please feel free to reach us at 91-9872263977
Under development mode, the NodeJS app is run via SSH. The port on which your App should run should be in the range of ports made available to the SSH user. To run the app in development mode
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range. If under the port range it shows ‘Requires user rebuild’, rebuild the user from Dashboard -> List Users -> Rebuild (for the desired user) and click ‘Rebuild User’. After rebuilding the user, revert to the ‘Link a Node App’ page.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port entered under should be within the range of the port numbers mentioned in point 3.
- Select the ‘App Mode’. This should be ‘Development’
- And finally click ‘Submit’
With the above steps, you have mapped the web-server to the VHost/Website’s URL part and the port number where we can expect the NodeJS App to be running.
N99panel comes with multiple NodeJS versions i.e. 10, 12, 14, 16, 18, 20. These versions can be referenced from within SSH using the commands node10 , node12 , node14, node16, node18, node20 respectively. The npm’s accompanying these versions can be referenced via npm10 , npm12 , npm14, npm16, npm18, npm20 respectively.
Now to run the App,
- Login into the server/VPS via SSH of the user ID under which the VHost/website is running.
- Though you can run the NodeJS App from any folder, but ideally create a new App folder within the node_apps folder. This would help later also when we shift this App to the Production mode.
- Now assuming that you created a app folder app1 , now under that folder upload all your source files including package.json
- Lets’s say that we wish to user version 16 , to run NPM commands w.r.t. that ideally we will use npm16Â .
- To run the app, we should first ensure that the NodeJS source file creates the Node server at ‘App Port’ number. We’ll explain further via example
- Let’s say the user port range is 50001 to 50010 , and the port we entered under ‘App Port’ is 50001
- Now my app file is say app.js . In my app.js I would need to create the server on port 50001 .
- To now actually run the app, we just need to type
node16 app.js &
Above process would now start the App as a background process. If there are errors, it will simply show the errors and the process would end. And when you fix the errors, you can again try starting the App.
When you believe that you app is running stably and as per your expectations, at that moment you can decide to shift your App to the Production mode. Click here to read about it.
You should run your NodeJS App in production mode only when you are sure that your App will run in a stable way. This you can easily ensure by first running your App in development mode. To run your app in development mode or to install requisite npm modules, please refer to the following link : https://n99panel.com/ufaq/how-to-run-work-with-development-mode-for-nodejs-apps .
Now to run the App in production mode,
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port on which your App creates the server. The value for the App Port should be in the range of 40000 to 50000
- Select the ‘App Mode’. This should be ‘Production (node)’ or ‘Production (npm start)’
- Now enter the reference to the App file in the ‘Prod. filesystem Path’ field. Your app should be in /home/{username}/node_apps . Ideally a separate folder so that you can run multiple apps without disturbing each other’s dependencies. Our app would typically be placed in a folder with /home/{username}/node_apps . Depending upon the ‘App Mode’, following points apply
- Now if our ‘App Mode’ was ‘Production (node)’, then this path should lead to a file. if my app files is app.js , the value entered in ‘Prod. filesystem Path’ will be app1/app.js , if app1 was the folder containing the app.
- But if our ‘App Mode’ was ‘Production (npm start)’, then this path show lead to a folder where your package.json resides. The example value for ‘Prod. filesystem Path’ can be app1 , implying the full path to be /home/{username}/node_apps/app1 .
- Next, select the ‘Prod. Node Version’ . The available versions are 10, 12, 14, 16, 18, 20
- Next if you wish to run a Redis instance alongside your App, enable the same by clicking the checkbox against ‘Redis (Prod. mode only)’
- And finally click ‘Submit’
Please note : Only one app can run on a given VHost/website and App Web path’ . If you were earlier running an app on development mode at that path, unlink that App first from within Dashboard -> Node Apps -> App : Remove Linking , and then link the same app again in production mode.
Before running your app in production mode, kindly test your app in development mode first. Only after extensive testing, you may then use production mode.
To manage the App process, you can do the same from within Node Apps -> App : Manage App State
As earlier mentioned in the FAQ, you can run NodeJS app either in developer mode or in production mode. Refer to this link for more details w.r.t. that.
Now lets say you are running your app as /app1 , the various static assets like images, css, js etc., should be placed under the VHost’s/Website’s folder i.e. /home/{username}/{vhost}_public_html/app1 .
If you were running your app as / or as website root, then all assets should be placed under /home/{username}/vhost_public_html
Backups and Restorations
Yes. N99panel does support NodeJS. We support NodeJS with multiple versions 10, 12, 14, 16, 18, 20 along with npm accompanying the corresponding version.
There are two modes under which NodeJS apps can run. Dev. (development) or Prod. (production mode). A typical lifecycle of a NodeJS app would be to first develop/test it in dev. move, and then when you are sure that it runs as per your expectation, then you can setup the prod. mode for your App.
To learn more about dev. mode, please click here
To learn more about prod. mode, please click here
This FAQ article has been updated on 18/Dec/2023
In N99panel we offer multiple versions of NodeJS with associated NPM versions. But there may be a use case or a scenario where you simply need the default NodeJS version. This is especially true when you are trying to deploy Next.js Apps (refer https://n99panel.com/ufaq/how-to-run-a-next-js-on-n99panel/ ).
To setup the default node version along with its accompanying npm and npx versions, please follow the following steps
Step 1 – Log into your N99panel
Step 2 – Click on ‘List Users’ to list all users, and against the user under which you need to change the versions, please click ‘View/Change Node CLI version’
Step 3 – You would be able to see the current CLI version for node and also would be able to change the same.
Once you have changed the version, log in via SSH and type
node -v
This would show the applicable NodeJS’s CLI version.
Next.js can easily be run on N99panel . Before setting up your Next.js App, please ensure that you have gone through the FAQ article : https://n99panel.com/ufaq/does-n99panel-support-nodejs/
Now coming to Next.js, here we would provide by an example of how to set it up. As Next.js requires NodeJS version 18 or above on the command line, kindly follow this article to set your command line NodeJS version to 18 : https://n99panel.com/ufaq/how-to-add-a-default-node-and-npm-command-in-cli-or-ssh/ . Importantly, when you link the App from within N99panel’s console, please use ‘/’ as the value for ‘App Web Path’ . If you plan to run it on sub-url like /app1 , please design your App accordingly.
The example which we are going to follow in this case is mentioned at https://nextjs.org/learn-pages-router/basics/create-nextjs-app/setup . To properly deploy this Next.js app, we need to take these steps.
Step 1 – SSH as the user under whose VHost/Website the Next.js app is to be set. Here we assume the username to be user1
Step 2 – Change directory to node_apps using the command
cd node_apps
Step 3 – Install the App using the command
npx create-next-app@latest nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter"
The above command will install the app under the folder nextjs-blog
Now change the directory to nextjs-blog folder
cd nextjs-blog
Now initially we need to run the App under N99panel’s NodeJS’s Development mode at a port number as specified while linking the App from under N99panel. Here this author assume’s that the port number is 50011 . And later we plan to run this App in N99panel’s NodeJS’s Production mode at port number 40011. Therefore we need to appropriately adjust its package.json as under
{
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev -p 50011",
"start": "next start -p 40011"
},
"dependencies": {
"next": "latest",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"engines": {
"node": ">=18"
}
}
Now we just need to start the App using the command
npm run dev
Now from within N99panel console, link a Node App in development mode using the following values for the concerned fields
App Web Path : /
App Port : 50011
App Mode : Development
If you have properly linked your App from within N99panel’s console, you should be able to see a working App on your App URL which in this case is just /
If the App does not work at this stage, you need to resolve the issues pertaining to it before moving to the next step i.e. running the App in production mode.
Step 4 – If your app is running as mentioned above, you need to stop it in your SSH console use Ctrl+c . And also remove it from within N99panel’s console.
Step 5 – To prepare the App for production mode, you need to prepare it using
npm run build
Step 6 – Now from within N99panel console, link a Node App in Production more using the following values for the concerned fields
App Web Path : /
App Port : 40011
App Mode : Production (npm start)
Prod. filesystem Path : nextjs-blog
Prod. Node Version : 18
Now save it and wait for at-least one min to check via browser whether your App has come online or not.
Conclusion : Here we have seen that it is not that complicated to setup your Next.js App from within N99panel. For any questions/queries, please feel free to reach us at 91-9872263977
Under development mode, the NodeJS app is run via SSH. The port on which your App should run should be in the range of ports made available to the SSH user. To run the app in development mode
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range. If under the port range it shows ‘Requires user rebuild’, rebuild the user from Dashboard -> List Users -> Rebuild (for the desired user) and click ‘Rebuild User’. After rebuilding the user, revert to the ‘Link a Node App’ page.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port entered under should be within the range of the port numbers mentioned in point 3.
- Select the ‘App Mode’. This should be ‘Development’
- And finally click ‘Submit’
With the above steps, you have mapped the web-server to the VHost/Website’s URL part and the port number where we can expect the NodeJS App to be running.
N99panel comes with multiple NodeJS versions i.e. 10, 12, 14, 16, 18, 20. These versions can be referenced from within SSH using the commands node10 , node12 , node14, node16, node18, node20 respectively. The npm’s accompanying these versions can be referenced via npm10 , npm12 , npm14, npm16, npm18, npm20 respectively.
Now to run the App,
- Login into the server/VPS via SSH of the user ID under which the VHost/website is running.
- Though you can run the NodeJS App from any folder, but ideally create a new App folder within the node_apps folder. This would help later also when we shift this App to the Production mode.
- Now assuming that you created a app folder app1 , now under that folder upload all your source files including package.json
- Lets’s say that we wish to user version 16 , to run NPM commands w.r.t. that ideally we will use npm16Â .
- To run the app, we should first ensure that the NodeJS source file creates the Node server at ‘App Port’ number. We’ll explain further via example
- Let’s say the user port range is 50001 to 50010 , and the port we entered under ‘App Port’ is 50001
- Now my app file is say app.js . In my app.js I would need to create the server on port 50001 .
- To now actually run the app, we just need to type
node16 app.js &
Above process would now start the App as a background process. If there are errors, it will simply show the errors and the process would end. And when you fix the errors, you can again try starting the App.
When you believe that you app is running stably and as per your expectations, at that moment you can decide to shift your App to the Production mode. Click here to read about it.
You should run your NodeJS App in production mode only when you are sure that your App will run in a stable way. This you can easily ensure by first running your App in development mode. To run your app in development mode or to install requisite npm modules, please refer to the following link : https://n99panel.com/ufaq/how-to-run-work-with-development-mode-for-nodejs-apps .
Now to run the App in production mode,
- Login into the N99panel
- Go to under Dashboard -> Node Apps -> Link a Node App
- Select the VHost (website) mentioned along with the user and the port range.
- Enter the ‘App Web path’ . This would be like /app1 or /app2 or it can even be the website root i.e. /
- Enter the ‘App Port’ . The port on which your App creates the server. The value for the App Port should be in the range of 40000 to 50000
- Select the ‘App Mode’. This should be ‘Production (node)’ or ‘Production (npm start)’
- Now enter the reference to the App file in the ‘Prod. filesystem Path’ field. Your app should be in /home/{username}/node_apps . Ideally a separate folder so that you can run multiple apps without disturbing each other’s dependencies. Our app would typically be placed in a folder with /home/{username}/node_apps . Depending upon the ‘App Mode’, following points apply
- Now if our ‘App Mode’ was ‘Production (node)’, then this path should lead to a file. if my app files is app.js , the value entered in ‘Prod. filesystem Path’ will be app1/app.js , if app1 was the folder containing the app.
- But if our ‘App Mode’ was ‘Production (npm start)’, then this path show lead to a folder where your package.json resides. The example value for ‘Prod. filesystem Path’ can be app1 , implying the full path to be /home/{username}/node_apps/app1 .
- Next, select the ‘Prod. Node Version’ . The available versions are 10, 12, 14, 16, 18, 20
- Next if you wish to run a Redis instance alongside your App, enable the same by clicking the checkbox against ‘Redis (Prod. mode only)’
- And finally click ‘Submit’
Please note : Only one app can run on a given VHost/website and App Web path’ . If you were earlier running an app on development mode at that path, unlink that App first from within Dashboard -> Node Apps -> App : Remove Linking , and then link the same app again in production mode.
Before running your app in production mode, kindly test your app in development mode first. Only after extensive testing, you may then use production mode.
To manage the App process, you can do the same from within Node Apps -> App : Manage App State
As earlier mentioned in the FAQ, you can run NodeJS app either in developer mode or in production mode. Refer to this link for more details w.r.t. that.
Now lets say you are running your app as /app1 , the various static assets like images, css, js etc., should be placed under the VHost’s/Website’s folder i.e. /home/{username}/{vhost}_public_html/app1 .
If you were running your app as / or as website root, then all assets should be placed under /home/{username}/vhost_public_html