Deployment guide

Node.js on Windows

Overview

Node.js is a JavaScript runtime built on Chrome's V8 engine. It runs JavaScript on the server, so you can build scalable network applications.

This SecureAnyCloud AMI from the AWS Marketplace gives you Node.js on Windows Server, ready to use over Remote Desktop. This guide covers deploying the AMI and using Node.js on it.

What you get:

  • Node.js v20.12.2 with the npm package manager
  • A Node.js desktop shortcut for quick access to the REPL
  • Command Prompt with Node.js in the system PATH
  • Windows Server with Remote Desktop access
  • 24/7 SecureAnyCloud support with a guaranteed 24-hour response SLA

Prerequisites

Before you launch this AMI, make sure that you have:

  • An active AWS account
  • An active subscription to the NodeJS on Windows listing on AWS Marketplace
  • An EC2 key pair for password decryption
  • A Remote Desktop client application

Recommended instance type: t3.medium (2 vCPU, 4 GB RAM) or larger. The minimum requirements are 1 vCPU, 1 GB RAM, and 30 GB of disk space.

1

Launch the AMI

  • Go to the AWS Marketplace and search for "NodeJS Windows SecureAnyCloud".
  • Select Continue to Subscribe, accept the terms, then select Continue to Configuration.
  • Select your preferred Region and Software Version.
  • Select Continue to Launch.
  • Choose Launch through EC2 for full control over the instance configuration.
  • Select your instance type (t3.medium is recommended).
  • Configure storage with a minimum of 30 GB gp3.
  • Configure your Security Group with an inbound rule for port 3389 (TCP) from your IP address. This rule provides Remote Desktop (RDP) access.

Note: Add further port rules based on your application needs, for example port 3000 for Express.js development servers.

  • Select your EC2 key pair and launch the instance.
2

Retrieve the Windows Password

Wait for the EC2 instance to pass 2/2 status checks.

  • Open the AWS Console and go to EC2 > Instances.
  • Select your instance.
  • Select Actions > Security > Get Windows password.
  • Select Browse and upload your EC2 key pair .pem file.
  • Select Decrypt password.
  • Note the Username (Administrator) and the decrypted Password.

Important: The Windows password can take up to 15 minutes after launch to become available.

3

Connect via Remote Desktop

Open your Remote Desktop client.

On Windows:

  • Press Win + R, type mstsc, and press Enter.
  • Enter the public IP address of your instance.
  • Select Connect.

On macOS:

  • Open Microsoft Remote Desktop.
  • Select Add PC and enter the public IP address.
  • Double-click the connection to connect.

When prompted, enter these credentials:

  • Username: Administrator
  • Password: the decrypted value from Step 2

If a certificate warning appears, select Continue to proceed.

4

Verify Node.js Installation

Once connected, open the Node.js desktop shortcut or Command Prompt and verify the installation:

node --version

Expected output:

v20.12.2

Check that npm is available:

npm --version

Launch the Node.js REPL (interactive shell):

node

The interactive prompt appears:

Welcome to Node.js v20.12.2. Type ".help" for more information. >

To exit the REPL, type .exit or press Ctrl + C twice.

5

Create and Run a Node.js Application

Create a simple HTTP server:

  • Create a project directory: cmd mkdir C:\Users\Administrator\Documents\my-app cd C:\Users\Administrator\Documents\my-app
  • Create server.js: cmd notepad server.js
  • Enter the following code: javascript const http = require('http'); const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello from Node.js on SecureAnyCloud AWS!\n'); }); server.listen(3000, () => { console.log('Server running at http://localhost:3000/'); });
  • Run the server: cmd node server.js
  • Open a browser and go to http://localhost:3000.

Using npm

Initialize a new project:

npm init -y

Install a package:

npm install express

Install packages globally:

npm install -g nodemon

Run a script defined in package.json:

npm start

Server Components

  • Node.js: v20.12.2
  • npm: included with Node.js

Filesystem Layout

The C:\ drive is the system drive, with Windows and the Node.js installation.

Key directories:

  • C:\Program Files\nodejs: the Node.js installation
  • C:\Users\Administrator\AppData\Roaming\npm: globally installed npm packages
  • C:\Users\Administrator\Documents: the default working directory

Troubleshooting

Node command not found

    • Open Command Prompt and type node --version.
    • Check that Node.js is in the system PATH: echo %PATH%
    • Restart Command Prompt after any PATH change.

    npm install fails

    • Verify internet connectivity: ping google.com
    • If you are behind a firewall, check the proxy settings: npm config list
    • Clear the npm cache: npm cache clean --force
    • Check the available disk space on C:\.

    Application cannot bind to port

    • Verify that no other process is using the port: netstat -an | findstr <port>
    • If you access the application from outside, ensure that your security group allows the port.
    • Check the Windows Firewall settings.

    Cannot connect via RDP

    • Verify that the instance has passed 2/2 status checks.
    • Check that your security group allows port 3389 from your IP address.
    • Wait up to 15 minutes for the Windows password to become available.

Security Recommendations

  • Change the Administrator password after your first login.
  • Restrict RDP access: allow port 3389 only from your specific IP address.
  • Open only necessary ports: expose only the application ports that need external access.
  • Use environment variables for secrets: never hardcode API keys or passwords in application code.
  • Keep Node.js updated: check for security updates regularly.
  • Enable Windows Update: keep the OS patched with the latest security updates.
  • Audit npm packages: use npm audit to check for known vulnerabilities in dependencies.

Support

If you have any issues with this product, contact SecureAnyCloud support:

  • Email: sales@secureanycloud.com
  • Website: secureanycloud.com
  • Support hours: 24/7 with a guaranteed 24-hour response SLA

Deploy on AWS

Launch NodeJS on Windows with 24/7 support from SecureAnyCloud.

View on Marketplace

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on AWS

Launch NodeJS on Windows with 24/7 support from SecureAnyCloud.

View on Marketplace

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com