Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can node.js run in any hosting provider?

Sorry for this newbie question. Can node.js run in any hosting provider like Fastdomain? We have an account in fastdomain where we upload our Website made in PHP. I allowed SSH in our host and tried installing node.js but it didn't work. I've been searching the internet but there is no exact answer to this.

like image 200
Orvyl Avatar asked May 14 '13 23:05

Orvyl


3 Answers

No, you can not run Node.js on every hosting provider. You need certain base capabilities. If your hosting provider doesn't directly support Node.js (like Heroku does), then you need to be able to shell into your server. You also need access to a C compiler to build Node.js or the ability to install packages for your system.

Once you get Node.js installed then you need root access to be able to run it on port 80. You can get around this if your provider provides reverse proxy service.

The fact that you can shell in is a good start. It might be possible on Fastdomain, but to be sure you should contact Fastdomain support. Every hosting provider is different and if you have shared hosting then the answer is most likely no. You generally need dedicated hosting to run Node.js.

like image 72
Daniel Avatar answered Oct 31 '22 07:10

Daniel


No, Node can't run on any hosting providers, you can however deploy Nodejs projects in PAAS sites as Heroku and Linode that offer a plataform for you to deploy your app or on Cloud Hosting Providers.

The PAAS model puts the provider as responsible for infrastructure and for configuring the OS and the overall infrastructure, and you only have to worry with develop and deploy.

On other hand Nodejs can be deployed on any Cloud Hosting, once you have acess to a virtual or dedicated server you can install nodejs and the dependencies to start offering your application, in this case you are responsible for Install Nodejs, Databases, Webservers (if you don't wanna use Node's Http server).

Cloud Hosting are usually more expensive but offer more control over infrastructure, PAAS are often more easy to use from a developer point of view once that is only develop and deploy (sometimes configure like domains and other account settings).

like image 20
ooredroxoo Avatar answered Oct 31 '22 07:10

ooredroxoo


I was able to install node on my shared hosting plan using nvm. You can take a look here for more information: https://heynode.com/tutorial/install-nodejs-locally-nvm/#:~:text=Using%20nvm%20(Node.,on%20a%20single%20local%20environment.

like image 36
Fariman Kashani Avatar answered Oct 31 '22 07:10

Fariman Kashani