# Transfer container lease ownership · Chromia Docs (concept)

> This guide provides a comprehensive overview of how to transfer ownership of a container lease from one user to another, ensuring the original owner no longer…

Source: https://docs.chromia.com/ecosystem/providers/container-management/transfer-container-ownership/

# Transfer container lease ownership

On this page

* [Prerequisites](#prerequisites)
* [Process overview](#process-overview)
* [Step 1: Create a transfer offer](#step-1-create-a-transfer-offer)
* [Step 2: Accept the transfer offer](#step-2-accept-the-transfer-offer)
* [Error recovery](#error-recovery)

This guide provides a comprehensive overview of how to transfer ownership of a container lease from one user to another,
ensuring the original owner no longer has access.

## Prerequisites

Before starting, make sure you have completed the following:

* [Install and configure the Chromia CLI](https://docs.chromia.com/get-started/installation/).

## Process overview

Transferring container lease ownership consists of two main steps:

1. The current owner creates a transfer offer.
2. The new owner accepts that transfer offer.

### Step 1: Create a transfer offer

To successfully create a transfer offer, the current lease owner should follow these steps:

1. **Locate the `DIRECTORY_CHAIN_RID`:**  
   Use the [explorer](https://explorer.chromia.com/mainnet/cluster/system) to find the `DIRECTORY_CHAIN_RID`, which is
   needed to identify the relevant blockchain.
2. **Obtain the `ECONOMY_CHAIN_RID`:**  
   Execute the following command to retrieve the `ECONOMY_CHAIN_RID` for the directory chain:

   Terminal

   ```
   chr query --blockchain-rid ${DIRECTORY_CHAIN_RID} get_economy_chain_rid
   ```
3. **Issue the transfer offer:**  
   Run the command below to create the transfer offer for the container lease:

   Terminal

   ```
   chr tx --blockchain-rid ${ECONOMY_CHAIN_RID} --evm-auth ${CURRENT_OWNER_EVM_ADDRESS} \
     offer_container_lease_ownership_transfer ${CONTAINER_NAME} ${NEW_OWNER_ACCOUNT}
   ```

   Be sure to replace the placeholders with the appropriate values:

   * `${ECONOMY_CHAIN_RID}`: The blockchain RID of the economy chain you obtained earlier.
   * `${CURRENT_OWNER_EVM_ADDRESS}`: The EVM address of the current owner for authentication purposes.
   * `${CONTAINER_NAME}`: The name of the lease container being transferred.
   * `${NEW_OWNER_ACCOUNT}`: The FT4 account ID of the new owner who will receive the lease.
4. **Verify the transfer offer:**  
   Once the command executes, confirm the transfer offer was created successfully by checking the status on the
   corresponding blockchain explorer.

### Step 2: Accept the transfer offer

The new owner must now accept the transfer offer by following these steps:

1. **Execute the acceptance command:**  
   The new owner should run the following command:

   Terminal

   ```
   chr tx --blockchain-rid ${ECONOMY_CHAIN_RID} --evm-auth ${NEW_OWNER_EVM_ADDRESS} \
     accept_container_lease_ownership_transfer_offer ${CONTAINER_NAME}
   ```

   Replace the placeholders as follows:

   * `${ECONOMY_CHAIN_RID}`: The blockchain RID of the economy chain.
   * `${NEW_OWNER_EVM_ADDRESS}`: The new owner's EVM address for authentication.
   * `${CONTAINER_NAME}`: The name of the lease container.
2. **Confirm the acceptance:**  
   After executing the command, verify that the transfer of ownership was successful. Check the transaction status using
   the blockchain explorer.

### Error recovery

If a mistake occurs during the transfer process, the current owner can remove the erroneous transfer offer and start
anew by executing:

Terminal

```
chr tx --blockchain-rid ${ECONOMY_CHAIN_RID} --evm-auth ${CURRENT_OWNER_EVM_ADDRESS} \
  remove_container_lease_ownership_transfer_offer ${CONTAINER_NAME}
```

Ensure to replace the placeholders as needed:

* `${ECONOMY_CHAIN_RID}`: The blockchain RID of the economy chain.
* `${CURRENT_OWNER_EVM_ADDRESS}`: The current owner's EVM address for authentication.
* `${CONTAINER_NAME}`: The name of the lease container.

[View this page on docs.chromia.com](https://docs.chromia.com/ecosystem/providers/container-management/transfer-container-ownership/)Content mirrored from the live docs
