Skip to main content
When you’re done with a deployment, use the /destroy command to properly clean up cloud resources and local configuration.
Destroying a deployment is permanent and irreversible. All data on the server will be lost.

What Gets Destroyed

The destroy process removes: Cloud Resources:
  • VPS server instance
  • Associated SSH keys from cloud provider
  • Public IP address
  • All data on the server
Local Files:
  • Deployment configuration (~/.clawcontrol/deployments/NAME/config.json)
  • Deployment state (~/.clawcontrol/deployments/NAME/state.json)
  • SSH key pair (~/.clawcontrol/deployments/NAME/ssh/)
  • Entire deployment directory
What Doesn’t Get Destroyed:
  • Your cloud provider account
  • API keys stored in ClawControl
  • Other deployments
  • Templates

Destroying a Deployment

1

Launch destroy command

From ClawControl’s main menu:
/destroy
ClawControl lists all deployments:
/destroy - Select a deployment to destroy

WARNING: This action cannot be undone!

> my-openclaw-server     [deployed]
  old-test-server        [failed]
  dev-server             [initialized]

Arrow keys to select | Enter to destroy | Esc to go back
2

Select deployment

Use arrow keys to select the deployment you want to destroy and press Enter.
You can destroy deployments in any state: initialized, deployed, configuring, or failed.
3

Confirm destruction

ClawControl shows what will be deleted and asks for confirmation:
Confirm Destruction

You are about to destroy:
Deployment: my-openclaw-server
Server IP: 159.89.123.45

This will permanently delete:
• The VPS server (if deployed)
• All data on the server
• Local configuration files
• SSH keys

Type the deployment name to confirm:

Confirm: _
Type the exact deployment name to confirm:
Confirm: my-openclaw-server
Press Enter to proceed.
4

Destruction in progress

ClawControl connects to your cloud provider and removes resources:
Destroying deployment...
Deleting server and cleaning up resources...
This typically takes 10-30 seconds.
5

Destruction complete

When finished:
Deployment Destroyed

The deployment "my-openclaw-server" has been permanently deleted.

Press any key to return to home
The deployment no longer appears in /list or /status.

What Happens During Destruction

1

Delete cloud server

ClawControl calls your cloud provider’s API to delete the VPS:Hetzner:
DELETE /servers/{server_id}
DigitalOcean:
DELETE /droplets/{droplet_id}
The server is immediately shut down and scheduled for deletion.
2

Remove SSH key

The SSH key uploaded during deployment is removed from your cloud provider:Hetzner:
DELETE /ssh_keys/{key_id}
DigitalOcean:
DELETE /account/keys/{key_id}
3

Clean local files

All local files are deleted:
rm -rf ~/.clawcontrol/deployments/my-openclaw-server/
This includes:
  • Configuration and state files
  • SSH key pair
  • Deployment directory

Special Cases

Destroying Initialized Deployments

For deployments that were never deployed (status: initialized):
  1. No cloud resources to delete
  2. Only local files are removed
  3. Use /list → [D]elete instead (faster)
/list → Select deployment → Press D

Destroying Failed Deployments

For deployments that failed during provisioning:
  1. ClawControl attempts to delete any created resources
  2. Even if the server doesn’t exist, cleanup succeeds
  3. Local files are always removed
If a deployment failed early, the server may not exist. ClawControl handles this gracefully and completes the cleanup.

Destroying Multiple Deployments

To destroy multiple deployments:
  1. Run /destroy for each one individually
  2. Confirm each destruction
There’s no bulk destroy option for safety.

Troubleshooting Destruction

API Key Expired or Invalid

Problem: Can’t delete server because API key is invalid Solution:
  1. Manually delete the server from your cloud provider’s dashboard:
    • Hetzner: Cloud Console → Servers → Delete
    • DigitalOcean: Droplets → Your Server → Destroy
  2. Run /destroy again - it will skip cloud deletion and clean up local files

Server Already Deleted

Problem: Server was manually deleted from cloud provider Solution: Run /destroy normally. ClawControl detects the server is gone and completes local cleanup.

Local Files Deleted Manually

Problem: Deployment directory was deleted manually Solution:
  1. Server still exists in cloud (costing money)
  2. Manually delete from cloud provider’s dashboard
  3. Delete SSH key from cloud provider (search for “clawcontrol-*”)
Always use /destroy instead of manually deleting files. Manual deletion leaves cloud resources running and costing money.

Destruction Hangs

Problem: Destruction process is stuck Solutions:
  1. Wait 2-3 minutes (cloud providers can be slow)
  2. Press Ctrl+C to cancel
  3. Check cloud provider dashboard to see if server was deleted
  4. Try /destroy again

Cost Implications

Hourly Billing

Most cloud providers bill by the hour: Hetzner:
  • Hourly billing, rounded up
  • CPX11: ~$0.007/hour
  • Destroy before hour ends to save money
DigitalOcean:
  • Hourly billing with monthly cap
  • s-1vcpu-2gb: 0.018/hour(0.018/hour (12/month cap)
  • Destroy anytime to stop charges

When to Destroy

Destroy immediately if:
  • Testing is complete
  • Deployment failed and you’re starting over
  • Switching to different configuration
  • No longer needed
Keep running if:
  • Production bot in active use
  • Long-running experiments
  • Shared with team
  • Cost is acceptable
For development and testing, destroy deployments when not in use to save costs. Recreate when needed (takes ~5-10 minutes).

Before You Destroy

Backup Data

If you need to preserve any data:
1

Connect via SSH

/ssh
Select your deployment.
2

Identify important files

# OpenClaw configuration
~/.openclaw/config.json
~/.openclaw/.env

# Logs
journalctl -u openclaw > openclaw-logs.txt

# Custom data
/path/to/your/data
3

Download files

From your local machine:
scp -i ~/.clawcontrol/deployments/NAME/ssh/id_ed25519 \
  root@SERVER_IP:~/.openclaw/config.json \
  ./backup-config.json

Export Configuration

To recreate the deployment later:
  1. Configuration is in ~/.clawcontrol/deployments/NAME/config.json
  2. Copy before destroying:
    cp ~/.clawcontrol/deployments/my-openclaw-server/config.json ~/backups/
    
  3. Or fork the deployment to preserve settings:
    /list Select deployment Press F
    

Notify Users

If others use this bot:
  1. Notify in Telegram/Slack that bot is shutting down
  2. Provide timeline for new instance (if applicable)
  3. Share new bot credentials when redeployed

After Destruction

Verify Cloud Resources Deleted

Check your cloud provider dashboard: Hetzner:
  1. Go to Cloud Console
  2. Navigate to Servers
  3. Verify server is gone
  4. Check SSH Keys section
DigitalOcean:
  1. Go to Droplets
  2. Verify droplet is gone
  3. Check Settings → Security → SSH Keys

Check Billing

Monitor your cloud provider billing:
  • Hetzner: Check Cloud Console → Billing
  • DigitalOcean: Check Billing → Current Usage
Verify charges stopped after destruction.

Clean Up Tailscale (Optional)

If you used Tailscale:
  1. Go to Tailscale Admin
  2. Find the destroyed server
  3. Click the ”…” menu → Delete

Alternative: Delete vs Destroy

ClawControl has two deletion commands:

/destroy

When to use: Deployed servers
Deletes:
  - Cloud VPS server
  - Cloud SSH keys
  - Local configuration
  - Local SSH keys
Safety: Type deployment name to confirm
Time: 10-30 seconds

/list → [D]elete

When to use: Initialized deployments only
Deletes:
  - Local configuration
  - Local SSH keys
Safety: Type deployment name to confirm
Time: Instant
Use /destroy for any deployment that was deployed (even if failed). Use /list → [D]elete only for deployments that were never deployed.

Best Practices

Development Workflow

1. Create deployment: /new
2. Deploy: /deploy
3. Test functionality
4. Destroy when done: /destroy
5. Repeat with different configuration
Cost for 2 hours of testing:
  • Hetzner CPX11: ~$0.02
  • DigitalOcean basic: ~$0.04

Production Workflow

1. Create deployment: /new
2. Deploy: /deploy
3. Test thoroughly
4. Monitor with /status and /logs
5. Keep running
6. Destroy only when replacing or retiring

Multi-Instance Strategy

dev-server:     Create/destroy frequently
staging-server: Keep running during development
prod-server:    Keep running continuously
Only destroy production when:
  • Migrating to new infrastructure
  • No longer needed
  • Major configuration change required

Recovery

Once a deployment is destroyed, it CANNOT be recovered. The server and all its data are permanently deleted.
If you destroyed by mistake:
  1. Server data: Lost permanently
  2. Configuration: Gone if not backed up
  3. Recreation: Deploy fresh instance with similar config
To minimize risk:
  • Always confirm the deployment name carefully
  • Keep templates of common configurations
  • Document API keys externally
  • Back up important data regularly

Next Steps

Build docs developers (and LLMs) love