> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coral.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Terminate on Alibaba Cloud

> How to permanently release an ECS instance running OpenClaw on Alibaba Cloud

This guide covers releasing (terminating) an Alibaba Cloud ECS (Elastic Compute Service) instance. Releasing an instance permanently deletes it and its associated system disk. Data disks are not deleted unless you explicitly select that option.

<Note>
  Alibaba Cloud calls this operation "release" (释放) rather than "terminate." The result is the same: the instance is permanently deleted and billing stops.
</Note>

<Warning>
  Complete the [pre-termination checklist](/security/terminate-instance#pre-termination-checklist) before proceeding. Releasing an instance is irreversible.
</Warning>

***

## Before you start: check Release Protection

If Release Protection is enabled on the instance, the release operation will fail. Check and disable it first:

1. In the ECS console, click the instance name to open its details.
2. In the **Instance Details** tab, look for **Release Protection** under the Settings section.
3. If enabled, click the edit icon and switch it off.

**Official documentation:** [Enable or disable release protection](https://www.alibabacloud.com/help/en/ecs/user-guide/enable-or-disable-release-protection-for-ecs-instances)

***

## Option 1: Alibaba Cloud Console

<Steps>
  <Step title="Open the ECS console">
    Sign in to the [Alibaba Cloud ECS Console](https://ecs.console.aliyun.com/) and navigate to **Instances & Images → Instances**.
  </Step>

  <Step title="Select the correct region">
    Use the region dropdown at the top to select the region where your instance is running.
  </Step>

  <Step title="Select your instance">
    Locate the ECS instance running OpenClaw. Confirm the correct instance by checking its public IP address against what appeared on the watchboard.
  </Step>

  <Step title="Release the instance">
    Click **More → Instance Status → Release**. In the dialog, choose **Release Now**. Optionally check **Release attached data disks** if you also want to delete data disks.

    Click **Next → OK** to confirm.
  </Step>
</Steps>

**Official Alibaba Cloud documentation:** [Release an instance](https://www.alibabacloud.com/help/en/ecs/user-guide/release-an-instance)

***

## Option 2: Alibaba Cloud CLI (aliyun)

If you have the [Alibaba Cloud CLI](https://www.alibabacloud.com/help/en/alibaba-cloud-cli/) installed:

```bash theme={null}
# List instances to find the instance ID
aliyun ecs DescribeInstances \
  --RegionId cn-REGION \
  --output cols=InstanceId,PublicIpAddress,Status rows=Instances.Instance[]

# Release (delete) the instance
aliyun ecs DeleteInstance \
  --InstanceId i-XXXXXXXXXXXXXXXXX \
  --RegionId cn-REGION
```

To also release attached data disks:

```bash theme={null}
aliyun ecs DeleteInstance \
  --InstanceId i-XXXXXXXXXXXXXXXXX \
  --RegionId cn-REGION \
  --TerminateSubscription true
```

**Official API reference:** [DeleteInstance](https://www.alibabacloud.com/help/en/ecs/developer-reference/api-ecs-2014-05-26-deleteinstances)

***

## Post-termination cleanup

### Delete unattached data disks

Data disks that were not deleted during instance release continue to incur charges. In the ECS console, navigate to **Storage & Snapshots → Disks**, filter by **Status = Available**, and release them.

```bash theme={null}
aliyun ecs DeleteDisk --DiskId d-XXXXXXXXXXXXXXXXX
```

### Delete snapshots

```bash theme={null}
# List snapshots
aliyun ecs DescribeSnapshots --RegionId cn-REGION

# Delete a snapshot
aliyun ecs DeleteSnapshot --SnapshotId s-XXXXXXXXXXXXXXXXX
```

### Release Elastic IPs (EIPs)

Unassociated EIPs incur charges. In the console, navigate to **VPC → Elastic IP Addresses** and release them.

```bash theme={null}
aliyun vpc ReleaseEipAddress \
  --AllocationId eip-XXXXXXXXXXXXXXXXX \
  --RegionId cn-REGION
```

### Delete custom images

```bash theme={null}
# List custom images
aliyun ecs DescribeImages --ImageOwnerAlias self --RegionId cn-REGION

# Delete an image
aliyun ecs DeleteImage --ImageId img-XXXXXXXXXXXXXXXXX --RegionId cn-REGION
```

***

## Rotate credentials

After releasing the instance, rotate everything the agent had access to. See the [post-termination checklist](/security/terminate-instance#post-termination-checklist) for the full list.
