All Products
Search
Document Center

Elastic Compute Service:Alibaba Cloud managed instances

Last Updated:Sep 07, 2026

Register a third-party server as an Alibaba Cloud managed instance to manage it with various Alibaba Cloud services, such as Cloud Assistant, CloudOps Orchestration Service (OOS), and Alibaba Cloud DevOps. For example, you can use Cloud Assistant to manage the server without logging on to it.

Limitations

  • Third-party server requirements

    • Supported operating systems:

      • Alibaba Cloud Linux 2 and 3

      • CentOS 6 and later

      • CoreOS and OpenSUSE

      • Debian 8, 9, 10, and later

      • Red Hat Enterprise Linux (RHEL) 5, 6, 7, and later

      • SUSE Linux Enterprise Server (SLES) 11, 12, 15, and later

      • Ubuntu 12, 14, 16, 18, and later

      • Windows Server 2012, 2016, 2019, and later

    • The server must have access to the public network.

  • Region availability

    This feature is available only in the following regions:

    China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), Germany (Frankfurt), UK (London), US (Silicon Valley), US (Virginia), UAE (Dubai), and Saudi Arabia (Riyadh).

Billing

  • The managed instance feature is a free service.

  • After registering a third-party server as a managed instance, you may incur charges for other Alibaba Cloud services that you use. For billing details, see the documentation for those services.

Step 1: Create a registration code

To register a third-party server as an Alibaba Cloud managed instance, you must create a registration code (also known as an activation code) and apply it to the server. A registration code is a credential that verifies the identity of a server and ensures that only authorized servers can be registered as managed instances.

Important
  • You can use one registration code to register up to 1,000 managed instances.

  • You can have a maximum of 5,000 registration codes in a region.

  • If you have more than 1,000 registration codes, you can create new codes only if more than 50% of your existing codes are in use.

    On the ECS Cloud Assistant page, on the Manage Instances tab, click Register Instance. You can view the usage data of your registration codes in the Registered Instances/Registration Quota column.

  1. Go to ECS console - Cloud Assistant.

  2. In the upper-left corner of the page, select a region and resource group.

    Important

    The registration code and the managed instances registered with it belong to the selected region.

    We recommend that you select the region with the fastest network connection. You can run the ping command on your third-party server to test connection speeds and select the fastest region. You can obtain the region ID for <RegionID> from Regions and zones.

    ping -c 4 <RegionID>.axt.aliyuncs.com
  3. On the Manage Instances tab, create a registration code.

    • Scenario 1: If no managed instances are registered in the current region, a guide appears at the bottom of the page. Click Create Registration Code and then proceed to Step 4.

    • Scenario 2: If instances are already registered in the current region, click Register Instance. In the Register Instance panel, click Create Registration Code.

      Alternatively, on the Cloud Assistant page, click the Managed Instances tab, click View Registration Codes, and then click Create Registration Code.

  4. In the Create Registration Code panel, configure the parameters for the managed instance.

    Parameter

    Description

    Instance Name Prefix

    The prefix for the names of managed instances. We recommend specifying a prefix to simplify management.

    Source IP Address

    The IP address or CIDR block of the managed instance.

    • Specify the public IP address or CIDR block of the server. Only servers with an IP address within the specified range can be registered.

    • If you leave this parameter empty, no IP address restrictions are applied.

    Instance Quota

    The maximum number of instances that can be registered with the code.

    Valid values: 1 to 1,000. Default value: 10.

    Validity Period

    The period during which the registration code is valid. An expired code cannot be used to register new servers. You must create a new registration code.

    Default value: 4 hours.

    Description

    A description of the registration code, such as its purpose, for easy management.

    Tag

    Set a Tag Key and Value for the registration code to facilitate categorization and maintenance.

    Important

    Managed instances that are registered with this code are automatically assigned the code's Tag Key and Value.

    Resource Group

    Select a resource group to manage your managed instances based on factors such as purpose and permissions.

    Important
  5. Click Generate Registration Code.

    An installation script to be run on the third-party server is generated.

    The script includes steps to automatically download and install the aliyun_assist component and run registration commands based on the system architecture. By default, the Install Cloud Monitor Agent option is selected below the script.

  6. Obtain the installation script.

    Select the operating system of your server and click Download or Copy to save the script to your local machine.

    • rpm: for operating systems such as Alibaba Cloud Linux, CentOS, RHEL, and SUSE Linux.

    • deb: for operating systems such as Debian and Ubuntu.

    • exe: for Windows Server operating systems.

    Important
    • After the registration code is generated, the installation script is displayed only once. You must save it to your local machine. For example, save it as installAssistant.sh to use in subsequent steps.

    • If you have servers that run different operating systems, you must download the installation script for each operating system.

Step 2: Install Cloud Assistant Agent and register instance

Run the installation script from Step 1 to register the server as a managed instance.

Linux servers

Public network

  1. Log on to your third-party server.

  2. Create an installation script on the server.

    1. Run the following command to create a script file, and copy the installation script from Step 6 into the script file.

      vim installAssistant.sh
    2. Press the Esc key, enter :wq, and then press the Enter key to save the file.

  3. Run the following command to make the installation script executable.

    sudo chmod 755 installAssistant.sh
  4. Run the following command to install the Cloud Assistant Agent on the server.

    sudo ./installAssistant.sh

    If the following information is returned, the installation is successful.

    register ok
    instance id: mi-hz018g48xxx
    Process completed.
    Process completed.
    restart service

Proxy server

This section uses CentOS 7.8 as an example to describe how to install the Cloud Assistant Agent and register a managed instance through a proxy server.

  1. Log on to the server by using a method such as SSH.

    For more information, see Connection methods.

  2. Run the following command to download the Cloud Assistant Agent through the proxy server.

    x86-based architecture:

    sudo https_proxy=<http://your_proxy_address> && wget https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm

    ARM-based architecture:

    sudo https_proxy=<http://your_proxy_address> && wget https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm
    Important

    Replace <http://your_proxy_address> with the address of your proxy server.

  3. Run the following command to install the Cloud Assistant Agent.

    x86-based architecture:

    sudo rpm -ivh aliyun_assist_latest.rpm --force

    ARM-based architecture:

    sudo rpm -ivh aliyun-assist-latest-1.aarch64.rpm --force
  4. Configure a proxy for the Cloud Assistant service.

    1. Modify the Cloud Assistant service configuration file.

      Modify the Cloud Assistant service configuration file to set the ALIYUN_ASSIST_PROXY environment variable.

      1. Use a text editor such as Vim to create the /etc/sysconfig/aliyun file.

        sudo vim /etc/sysconfig/aliyun
      2. Enter the following content, and then save and exit the file.

        ALIYUN_ASSIST_PROXY=<http://your_proxy_address>
        Important

        Replace <http://your_proxy_address> with the address of your proxy server.

    2. Run the following command to reload the systemd configuration.

      sudo systemctl daemon-reload
    3. Run the following command to restart the Cloud Assistant service.

       sudo systemctl restart aliyun.service

      After the Cloud Assistant service starts, check the Cloud Assistant log file. By default, the log file is stored in the /usr/local/share/aliyun-assist/{version}/log/aliyun_assist_main.log path. If the log file contains the Detected environment variable ALIYUN_ASSIST_PROXY for proxy setting message, a proxy is configured for the Cloud Assistant service.

  5. Run the following commands to register the managed instance through the proxy server.

    1. Run the following command to configure the proxy server.

      export ALIYUN_ASSIST_PROXY=<http://your_proxy_address>
      Important

      Replace <http://your_proxy_address> with the address of your proxy server.

    2. Run the following command to register the server as a managed instance.

      Important

      This is provided as an example only. You need to directly copy the code that is generated in the console in Step 6.

      sudo aliyun-service --register --RegionId "cn-hangzhou" \
         --ActivationCode "a-hz0f5KlGmF/TsM5uBuq7Eqor+****" \
         --ActivationId "045CE381-0404-4F42-A44B-CC232B3E****"

Express Connect to VPC

This topic uses CentOS as an example to describe how to install the Cloud Assistant Agent by using Express Connect and then register a managed instance within a VPC.

  1. Log on to the server by using a method such as SSH.

    For more information, see Connection methods.

  2. Run the following script to register the managed instance over the VPC internal network.

    The sample code is as follows. Replace the values of RegionId, ActivationCode, and ActivationId with the values from the script that is automatically generated in Step 6.

    CentOS

    #/bin/bash
    ## Note: Set the region ID.
    regionId="cn-hangzhou"
    if [[ -n $regionId ]]; then
        bucket="aliyun-client-assist-${regionId}.oss-${regionId}-internal.aliyuncs.com"
        ## Download the Cloud Assistant Agent.
        wget -q https://${bucket}/linux/aliyun_assist_latest.rpm
        ## Install the Cloud Assistant Agent.
        sudo rpm -ivh aliyun_assist_latest.rpm --force
    fi
    ## Register the managed instance over a VPC internal network. **Note: You must set the NetworkMode parameter to "vpc".**
    ## Copy the values of the RegionId, ActivationCode, and ActivationId parameters from the registration code creation page in the console.
    sudo aliyun-service --register \
      --NetworkMode "vpc" \
      --RegionId "${regionId}" \
      --ActivationCode "a-hz0f5KlGmF/TsM5uBuq7Eqor+****" \
      --ActivationId "2C217D35-FE6C-5636-BC3C-CC480D3*****"

    Debian and other Linux

    #!/bin/bash
    ## Note: Set the region ID.
    regionId="cn-hangzhou"
    if [[ -n $regionId ]]; then
        bucket="aliyun-client-assist-${regionId}.oss-${regionId}-internal.aliyuncs.com"
        ## Download the Cloud Assistant Agent.
        wget -q https://${bucket}/linux/aliyun_assist_latest.deb
        ## Install the Cloud Assistant Agent.
        sudo dpkg -i aliyun_assist_latest.deb
    fi
    ## Register the managed instance over a VPC internal network. **Note: You must set the NetworkMode parameter to "vpc".**
    ## Copy the values of the RegionId, ActivationCode, and ActivationId parameters from the registration code creation page in the console.
    sudo aliyun-service --register \
      --NetworkMode "vpc" \
      --RegionId "${regionId}" \
      --ActivationCode "a-hz0f5KlGmF/TsM5uBuq7Eqor+****" \
      --ActivationId "2C217D35-FE6C-5636-BC3C-CC480D3*****"

Windows servers

Public network

  1. Remotely log on to the server by using a method such as Remote Desktop Connection.

    For more information, see Connection methods.

  2. Upload the installation script to the server.

    The installation script is the script generated in Step 6 when you create a registration code.

    Note

    Remote Desktop Connection allows you to directly copy script files to the server. If your network environment restricts direct copying, you can use other tools such as FTP to upload the script.

  3. Right-click the installation script and select Run with PowerShell to install the Cloud Assistant Agent.

Proxy server

This section uses Windows Server 2016 Datacenter Edition as an example to describe how to install the Cloud Assistant Agent and register a managed instance through a proxy server.

  1. Remotely log on to the server by using a method such as Remote Desktop Connection.

    For more information, see Connection methods.

  2. Configure the proxy server for your browser.

    1. From the Start > Control Panel.

    2. Click Network and Internet.

    3. Click Network and Sharing Center.

    4. In the lower-left corner, click Internet Options.

    5. On the Connect tab, click LAN settings.

    6. In the Proxy server section, set the address and port of your proxy server, and then click OK.

  3. Download the Cloud Assistant Agent installation package.

    1. From the Start menu, select Windows PowerShell > Windows PowerShell.

    2. Right-click Windows PowerShell and select Run as administrator.

    3. In the Windows PowerShell dialog box, run the following command to download the Cloud Assistant Agent installation package.

      Invoke-WebRequest -Uri 'https://aliyun-client-assist.oss-accelerate.aliyuncs.com/windows/aliyun_agent_latest_setup.exe' -OutFile 'C:\\aliyun_agent_latest_setup.exe'
  4. After the download is complete, install the Cloud Assistant Agent.

    1. Go to the C:\ drive.

    2. Double-click aliyun_agent_latest_setup.exe and follow the installation wizard to install the Cloud Assistant Agent.

  5. Set a proxy server for Cloud Assistant.

    1. From the Start > Control Panel.

    2. Click System and Security.

    3. Click System.

    4. In the navigation pane on the left, click Advanced system settings.

    5. On the Premium tab, click Environment Variable.

    6. In the System Variable section, click New Resources.

    7. Set the Variable Name and Variable value, and then click OK.

      • Variable Name: Set to ALIYUN_ASSIST_PROXY.

      • Variable value: Set to your proxy server.

    8. In Windows PowerShell, run the following commands to restart the Cloud Assistant service.

      1. Run the following command to stop the Cloud Assistant service.

        net stop AliyunService
      2. Run the following command to restart the Cloud Assistant service.

        net start AliyunService
  6. In Windows PowerShell, register the managed instance through the proxy server.

    1. Run the following command to go to the Cloud Assistant installation directory.

      cd C:\ProgramData\aliyun\assist\{version}
      Important

      Replace {version} with the version number of the installed Cloud Assistant Agent.

    2. Run the following command to register the server as a managed instance.

      An example of the command is as follows. Replace the values of RegionId, ActivationCode, and ActivationId with the values from the script that is automatically generated in Step 6.

       .\aliyun_assist_service.exe  --register  --RegionId="cn-hangzhou" --ActivationCode="a-hz0f6dB8Fg6hhtK0A5n9xqqdH****" --ActivationId="0A2E5ECE-5C71-4FA3-807B-05962C25****"

Express Connect to VPC

This topic uses Windows Server 2016 Datacenter Edition as an example to describe how to use Express Connect to install Cloud Assistant Agent and then register a managed instance.

  1. Remotely log on to the server by using a method such as Remote Desktop Connection.

    For more information, see Connection methods.

  2. From the Start menu, select Windows PowerShell > Windows PowerShell.

  3. Right-click Windows PowerShell and select Run as administrator.

  4. In the Windows PowerShell dialog box, run the following command.

    The following is a command example. Replace the values of RegionId, ActivationCode, and ActivationId with the values from the script that is automatically generated in Step 6.

    $RegionId = "cn-hangzhou"
    $Bucket = "aliyun-client-assist-${RegionId}.oss-${RegionId}-internal.aliyuncs.com"
    Invoke-WebRequest -Uri "https://${Bucket}/windows/aliyun_agent_latest_setup.exe" `
    -OutFile 'C:\\aliyun_agent_latest_setup.exe'
    &"C:\\aliyun_agent_latest_setup.exe" '/S' '--register' `
    '--NetworkMode="vpc"' '--RegionId="cn-hangzhou"' `
    '--ActivationCode="a-hz0f6dB8Fg6hhtK0A5n9xqqdH****"' `
    '--ActivationId="0A2E5ECE-5C71-4FA3-807B-05962C25****"'
    type C:\ProgramData\aliyun\assist\hybrid\instance-id
    Start-Sleep -s 30
    net stop AliyunService
    net start AliyunService

Step 3: Verify the registration

After installing the Cloud Assistant Agent and registering the instance on your server, return to the ECS console to check the connection status of the managed instance. If the connection status is Running, the third-party server is successfully registered as a managed instance.

  1. Go to ECS console - Cloud Assistant.

  2. In the upper-left corner of the page, select a region and resource group.

  3. On the Manage Instances tab, view the list of managed instances.

    By default, all resources under your Alibaba Cloud account are displayed. In the upper-left corner of the Cloud Assistant console, you can select a resource group from the All Account Resources drop-down list to view the managed instances and registration codes in the target resource group.

    If the Connection Status of the managed instance is Normal, the registration is successful.

After your third-party server is successfully registered as a managed instance, you can use Cloud Assistant to manage this server without logging on to it. For more information about how to use Cloud Assistant, see Create and run a command and Send a local file to an ECS instance.

(Optional) Deregister a third-party server

If you no longer want to manage your third-party server by using Alibaba Cloud, you can deregister the managed instance, and then stop and uninstall the Cloud Assistant components.

Linux servers

  1. Log on to the server by using a method such as SSH.

    For more information, see Connection methods.

  2. Run the following command to deregister the managed instance.

    sudo aliyun-service --deregister
  3. Stop and uninstall the Cloud Assistant daemon.

    1. Run the following command to stop the Cloud Assistant daemon.

      sudo /usr/local/share/assist-daemon/assist_daemon --stop
      Note

      The default path of the Cloud Assistant daemon is /usr/local/share/assist-daemon/assist_daemon.

    2. Run the following command to uninstall the Cloud Assistant daemon.

      sudo /usr/local/share/assist-daemon/assist_daemon --delete
  4. Run the following command to stop the Cloud Assistant Agent.

    Note

    Different Linux kernel versions use different init services. Linux distributions with newer kernels, such as Ubuntu 18.04, typically use the systemd init service. This section uses the systemd init service as an example. For instructions on other init services, see Stop and uninstall the Cloud Assistant Agent.

    sudo systemctl stop aliyun.service
  5. Run the following command to uninstall the Cloud Assistant Agent.

    • For RPM-based package management systems:

      sudo rpm -qa | grep aliyun_assist | xargs sudo rpm -e
    • For DEB-based package management systems:

      sudo dpkg -r aliyun-assist
  6. Delete the directories of the Cloud Assistant daemon and the Cloud Assistant Agent.

    1. Run the following command to delete the Cloud Assistant daemon directory.

      sudo rm -rf /usr/local/share/assist-daemon
    2. Run the following command to delete the Cloud Assistant Agent directory.

      sudo rm -rf /usr/local/share/aliyun-assist

Windows servers

Note

This section uses Windows Server 2019 as an example. The paths for Windows PowerShell and services may differ on other Windows versions. Adjust the steps accordingly for your environment.

  1. Remotely log on to the server by using Remote Desktop Connection.

    For more information, see Connection methods.

  2. Run Windows PowerShell.

    1. Click the Start menu.

    2. Select Windows PowerShell > Windows PowerShell.

    3. Right-click Windows PowerShell and select Run as administrator.

  3. In the Windows PowerShell window, run the following command to deregister the managed instance.

    aliyun-service --deregister
  4. Open the Services management window.

    1. Click the Start menu.

    2. Select Windows Administrative Tools > Service

  5. Find Aliyun Assist Service and click Stop this service.

FAQ

Why is my managed instance disconnected?

If the status of Cloud Assistant is abnormal or disconnected, the issue may be related to the running status of the Cloud Assistant Agent. Log on to the managed server and run the systemctl status aliyun.service command to check the running status of Cloud Assistant.

  • A status of running indicates that the Cloud Assistant Agent is running as expected.

  • If the status is not running, run systemctl restart aliyun.service to restart the Cloud Assistant Agent. For more information about related issues, see Check the status of Cloud Assistant Agent and troubleshoot exceptions.

  • For other issues, collect the logs from /usr/local/share/aliyun-assist/<version>/log and contact Alibaba Cloud technical support.

How do I view existing registration codes?

Click Register Instance. In the Register Instance panel, you can view the list of existing registration codes and create new ones. On the Register New Instance page, you can view the created registration codes and their associated instance information. The table columns include Registration Code, Tags, Default Instance Name, Description, Registered Count/Registration Limit, and Actions. For example, the Default Instance Name is doctest, the Description is doctest description, the Registered Count/Registration Limit is 1/10, and in the Actions column, you can perform Disable or Delete.

Troubleshooting expired activation codes

  • When you create a registration code, if you receive the message Activation TTL exceeds limit. with the error code ActivationTTL.ExceedLimit, the specified Validity Period is invalid. Reduce the value for the Validity Period parameter and try again. The default Validity Period of a registration code is 4 hours.

  • If registration fails due to an expired code and returns the error code activation_has_expired, the registration code is no longer valid. Create a new registration code and register the server again.

Related topics

  • After successfully registering a managed instance, you can use various online services from Alibaba Cloud. Examples include Cloud Assistant, CloudOps Orchestration Service (OOS), and Alibaba Cloud DevOps:

    • Cloud Assistant: Automates O&M tasks such as running scripts, polling processes, installing or uninstalling software, starting or stopping services, and installing patches or security updates. For more information, see Cloud Assistant.

    • CloudOps Orchestration Service: Automates the management and execution of O&M tasks. For more information, see What is OOS?.

  • You can also call the following Cloud Assistant API operations to manage activation codes and managed instances.