/destroy command to properly clean up cloud resources and local configuration.
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
- Deployment configuration (
~/.clawcontrol/deployments/NAME/config.json) - Deployment state (
~/.clawcontrol/deployments/NAME/state.json) - SSH key pair (
~/.clawcontrol/deployments/NAME/ssh/) - Entire deployment directory
- Your cloud provider account
- API keys stored in ClawControl
- Other deployments
- Templates
Destroying a Deployment
Confirm destruction
ClawControl shows what will be deleted and asks for confirmation:Type the exact deployment name to confirm:Press Enter to proceed.
Destruction in progress
ClawControl connects to your cloud provider and removes resources:This typically takes 10-30 seconds.
What Happens During Destruction
Delete cloud server
ClawControl calls your cloud provider’s API to delete the VPS:Hetzner:DigitalOcean:The server is immediately shut down and scheduled for deletion.
Remove SSH key
The SSH key uploaded during deployment is removed from your cloud provider:Hetzner:DigitalOcean:
Special Cases
Destroying Initialized Deployments
For deployments that were never deployed (status:initialized):
- No cloud resources to delete
- Only local files are removed
- Use
/list→ [D]elete instead (faster)
Destroying Failed Deployments
For deployments that failed during provisioning:- ClawControl attempts to delete any created resources
- Even if the server doesn’t exist, cleanup succeeds
- Local files are always removed
Destroying Multiple Deployments
To destroy multiple deployments:- Run
/destroyfor each one individually - Confirm each destruction
Troubleshooting Destruction
API Key Expired or Invalid
Problem: Can’t delete server because API key is invalid Solution:-
Manually delete the server from your cloud provider’s dashboard:
- Hetzner: Cloud Console → Servers → Delete
- DigitalOcean: Droplets → Your Server → Destroy
-
Run
/destroyagain - 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:- Server still exists in cloud (costing money)
- Manually delete from cloud provider’s dashboard
- Delete SSH key from cloud provider (search for “clawcontrol-*”)
Destruction Hangs
Problem: Destruction process is stuck Solutions:- Wait 2-3 minutes (cloud providers can be slow)
- Press Ctrl+C to cancel
- Check cloud provider dashboard to see if server was deleted
- Try
/destroyagain
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
- Hourly billing with monthly cap
- s-1vcpu-2gb: 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
- Production bot in active use
- Long-running experiments
- Shared with team
- Cost is acceptable
Before You Destroy
Backup Data
If you need to preserve any data:Export Configuration
To recreate the deployment later:- Configuration is in
~/.clawcontrol/deployments/NAME/config.json - Copy before destroying:
- Or fork the deployment to preserve settings:
Notify Users
If others use this bot:- Notify in Telegram/Slack that bot is shutting down
- Provide timeline for new instance (if applicable)
- Share new bot credentials when redeployed
After Destruction
Verify Cloud Resources Deleted
Check your cloud provider dashboard: Hetzner:- Go to Cloud Console
- Navigate to Servers
- Verify server is gone
- Check SSH Keys section
- Go to Droplets
- Verify droplet is gone
- Check Settings → Security → SSH Keys
Check Billing
Monitor your cloud provider billing:- Hetzner: Check Cloud Console → Billing
- DigitalOcean: Check Billing → Current Usage
Clean Up Tailscale (Optional)
If you used Tailscale:- Go to Tailscale Admin
- Find the destroyed server
- Click the ”…” menu → Delete
Alternative: Delete vs Destroy
ClawControl has two deletion commands:/destroy
/list → [D]elete
Best Practices
Development Workflow
- Hetzner CPX11: ~$0.02
- DigitalOcean basic: ~$0.04
Production Workflow
Multi-Instance Strategy
- Migrating to new infrastructure
- No longer needed
- Major configuration change required
Recovery
If you destroyed by mistake:- Server data: Lost permanently
- Configuration: Gone if not backed up
- Recreation: Deploy fresh instance with similar config
- Always confirm the deployment name carefully
- Keep templates of common configurations
- Document API keys externally
- Back up important data regularly
Next Steps
- First Deployment - Create a new deployment
- Using Templates - Quickly recreate destroyed deployments
- Managing Deployments - Fork before destroying to preserve config