Connect and use Grunt on a remote server

I've installed node.js, grunt.js plugin and a less plugin on my own computer, and now I'm about to connect it to a remote server and use it there. I have a couple of newbie (perhaps some of them are dumb) questions regarding this:

  1. Do I have to install node.js, grunt.js etc. in a remote server folder also? Or is it enough that it's installed on my own computer?

  2. I use windows 8.1 (if that is relevant) and I wish to connect to a FTP-server, or a SSH-server (I've been provided with the server name, the FTP-Port number and the SSH-port). Which type of port should I use?

  3. The actual script file that is going to be executed by the npm, should they be placed in a folder on that remote server as well?

You local development environment is indeed completely separate from your remote server environment.

  1. Yes, in order to run node scripts or grunt tasks, it is required that your remote server environment also has node and grunt installed.
  2. FTP is commonly port 21 while SFTP is commonly port 22. However, you should probably be using an IDE or FTP client that supports your development transactions. IE: uploading new code to a remote server. You should also consider version control and/or continuous integration / code deployment routines.
  3. Yes, you should essentially mimic your local environment on your remote server environment. While they may not always be 1 for 1, especially depending on what operating system your remote server is, ultimately they are completely separate. You might be interested in vmware, virtualbox, vagrant, or docker.