All Products
Search
Document Center

Object Storage Service:Install the Node.js SDK

Last Updated:Nov 29, 2025

Install the OSS Node.js SDK to upload, download, store, and manage files in Alibaba Cloud OSS from your Node.js application.

Prerequisites

  • Required environment

    • Node.js 8.0 or later is required.

    • To download and install the required environment, see Node.js installation.

  • View available languages

    • Run the following command to check the Node.js version.

      node -v
    • Run the following command to check the npm version.

      npm -v

Install the SDK

  • Select an SDK version

    • If you are using Node.js 8.0 or later, install the latest official SDK V6.x.

    • If you are using a version earlier than Node.js 8.0, install SDK V4.x.

  • Run the command to install the required SDK version.

    • Install SDK V6.x

      npm install ali-oss@^6.x --save
    • Install SDK V4.x

      npm install ali-oss@^4.x --save

Verify the SDK installation

Run the following command to verify that ali-oss is installed and to check its version.

npm list ali-oss

A successful response, as shown in the following example, indicates that ali-oss is installed.

your-project-name@ /path/to/your/project
└── ali-oss@6.x.x

What to do next

After you install the SDK, configure access credentials. For more information, see Configure access credentials (Node.js SDK).