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

# Extend a deployed contract instance's TTL

> Use the CLI to extend the time to live (TTL) of a contract instance

You can use the Stellar CLI to extend the TTL of a contract instance like so:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
stellar contract extend \
    --source S... \
    --network testnet \
    --id C... \
    --ledgers-to-extend 535679 \
    --durability persistent
```

This example uses 535,679 ledgers as the new archival TTL. This is the maximum allowable value for this argument on the CLI. This corresponds to roughly 30 days (averaging 5 second ledger close times).

When you extend a contract instance, this includes:

* the contract instance itself
* any `env.storage().instance()` entries in the contract
* the contract's Wasm code
