Updated on 2026-08-27 GMT+08:00

Using Node.js to Run Node.js Programs (Historical Version)

Scenarios

Node.js is an open-source project management software. It provides functions such as project management, Wiki, and news, and integrates tools such as GIT, SVN, and CVS. The Node.js application image is running Ubuntu 24.04 and deployed with Docker. It comes pre-installed with Node.js and all required runtime environments. This section describes how to use a Node.js application image to run a Node.js application.

This practice applies to FlexusL instances with a Node.js application image purchased before August 28, 2026. For best practices of the new image version, see Using Node.js to Run Node.js Programs.

To update the image version, change the OS. This operation will clear the data on the original system disk. Back up the data in advance.

Prerequisites

You have purchased a FlexusL instance with a legacy Node.js application image.

Step 1: Configure Security Groups

Add inbound security group rules to allow traffic from ports 80, 443, 9000, and 9001 to access the application.

  1. Log in to the FlexusL console and click the target resource card or instance name to go to the instance details page.
  2. In the navigation pane on the left, choose Cloud Servers and click the target server name to view its details.

  3. On the Security Groups tab, click Add Rule to add the rules listed in the following table.

    The following only lists common rules. You can add more rules as needed.

    Table 1 Security group rules

    Priority

    Action

    Type

    Protocol & Port

    Source

    Description

    1

    Allow

    IPv4

    TCP: 80

    0.0.0.0/0

    Specifies the internal forwarding port of an application.

    1

    Allow

    IPv4

    TCP: 443

    0.0.0.0/0

    Allows HTTPS traffic to FlexusL instances.

    1

    Allow

    IPv4

    TCP: 9000

    0.0.0.0/0

    Allows external access to the application O&M page.

    1

    Allow

    IPv4

    TCP: 9001

    0.0.0.0/0

    Allows external access to the application dashboard.

Step 2: Run the Node.js Program

  1. In the address bar of a local browser, enter http://EIP:9000 and enter the username and password to log in to the application O&M page.
    • The username of the O&M page is root.
    • The password of the O&M page is the same as that of the FlexusL instance. The FlexusL instance does not have an initial password. Reset the password of the FlexusL instance. For details about how to reset the password, see Resetting the Password for a FlexusL Instance.
  2. Choose My Apps and click the App icon.
  3. Select Compose and click Prompt Adjustment.

  4. On the dashboard, open the cmd.sh file in the src folder.

  5. After releasing the code in the file, click Commit Changes to submit the code.

  6. On the Compose page, click Redeploy App.

  7. On the displayed page, retain the default settings and click Redeploy.

  8. In the address bar of a local browser, enter http://EIP:9001 to check the program execution results.