How to Migrate from Self-Hosting
Self-hosting an OpenClaw AI agent gives you full control, but it also means managing servers, Docker containers, SSL certificates, monitoring, and security updates. If you are spending more time on infrastructure than on what your agent actually does, migrating to EZClaws can save you hours of maintenance every week.
This guide walks you through migrating from a self-hosted OpenClaw setup to EZClaws managed hosting. You will inventory your current configuration, deploy a matching agent on EZClaws, transfer your data, redirect your integrations, and safely decommission your self-hosted infrastructure.
Prerequisites
Before starting the migration:
- An EZClaws account — Sign up at ezclaws.com with your Google account.
- Access to your self-hosted agent — SSH access to the server running your agent, or access to the Docker host.
- Your current agent configuration — Model provider, API keys, system prompt, and any integration tokens (Telegram, Slack, etc.).
- About 20 minutes — The migration is straightforward but has several steps.
Step 1: Inventory Your Current Setup
Before migrating, document everything about your current self-hosted agent. This ensures you replicate the exact same functionality on EZClaws.
Agent Configuration
Record these settings from your self-hosted agent:
# Agent configuration checklist:
Model Provider: [OpenAI / Anthropic / Google / Other]
Model Name: [e.g., gpt-4o, claude-sonnet, gemini-pro]
API Key: [your model provider API key]
System Prompt: [copy the full system prompt]
Agent Name: [what you call the agent]
Port: [the port it runs on, e.g., 3000]
Integration Tokens
List all connected integrations and their credentials:
# Integration tokens:
Telegram Bot Token: [if using Telegram]
Discord Bot Token: [if using Discord]
Slack Bot Token: [if using Slack]
Email SMTP Credentials: [if sending email]
Other API Keys: [any additional service keys]
Data and Files
Identify any persistent data your agent stores:
# Data inventory:
Conversation History: [location on disk, e.g., /data/conversations/]
Knowledge Base Files: [location, e.g., /data/knowledge/]
Configuration Files: [e.g., config.json, .env]
Skill/Plugin Files: [any custom skills installed]
Log Files: [if you want to preserve them]
Infrastructure Details
Note your current infrastructure for comparison:
# Current infrastructure:
Server Provider: [AWS, DigitalOcean, Hetzner, home server, etc.]
Server Specs: [CPU, RAM, storage]
Monthly Cost: [hosting cost]
Domain: [if using a custom domain]
SSL: [how SSL is configured - Let's Encrypt, Cloudflare, etc.]
Monitoring: [what monitoring tools you use]
Step 2: Export Your Data
If your agent has persistent data you want to preserve, export it before migration.
Export Conversation History
Connect to your self-hosted server and locate the conversation data:
# SSH into your server
ssh user@your-server-ip
# Find conversation data (common locations)
ls /data/conversations/
ls /opt/openclaw/data/
ls ~/openclaw/storage/
# Create a compressed archive
tar -czf agent-data-backup.tar.gz /data/conversations/ /data/knowledge/
# Download to your local machine
scp user@your-server-ip:agent-data-backup.tar.gz ./
Export Configuration
Save your agent's configuration files:
# Copy environment variables
cat /opt/openclaw/.env > agent-config-backup.env
# Copy system prompt if stored in a file
cat /opt/openclaw/system-prompt.txt > system-prompt-backup.txt
# Copy any custom skill files
tar -czf skills-backup.tar.gz /opt/openclaw/skills/
Export Docker Configuration (Optional)
If you want to reference your Docker setup later:
# Save Docker Compose file
cp docker-compose.yml docker-compose-backup.yml
# Save Dockerfile if custom
cp Dockerfile Dockerfile-backup
# List running containers for reference
docker ps > containers-reference.txt
Step 3: Deploy on EZClaws
Now create your new agent on EZClaws with matching configuration.
- Sign in to EZClaws at ezclaws.com.
- Navigate to your dashboard at
/app. - Click Deploy New Agent.
- Configure the agent to match your self-hosted setup:
Agent Name: [Same name as your self-hosted agent]
Model Provider: [Same provider — OpenAI, Anthropic, Google]
API Key: [Same API key — or generate a new dedicated one]
Region: [Choose the closest region to your current server]
- Click Deploy Agent.
- Wait for the status to show "Running" (typically 1-2 minutes).
Your new agent now has a gateway URL like:
https://your-agent-production-xxxx.up.railway.app
Step 4: Transfer Your System Prompt
Copy your system prompt from the self-hosted agent to the EZClaws agent:
- Open your agent's detail page at
/app/agents/[id]. - Find the system prompt or configuration panel.
- Paste your complete system prompt.
- Save the changes.
If your system prompt references file paths or local resources, update those references to work with the EZClaws environment:
# Self-hosted path references to update:
Old: "Refer to /opt/openclaw/data/knowledge/product-catalog.txt"
New: "Refer to /data/knowledge/product-catalog.txt"
Old: "Save notes to /home/user/agent-notes/"
New: "Save notes to /data/notes/"
Step 5: Install Equivalent Skills
Replace self-hosted plugins and custom integrations with EZClaws marketplace skills:
- Navigate to
/app/marketplace. - For each integration your self-hosted agent used, find and install the equivalent skill.
Common migrations:
| Self-Hosted Component | EZClaws Equivalent |
|---|---|
| Telegram bot webhook script | Telegram Integration skill |
| Discord.js bot | Discord Integration skill |
| Slack Bolt app | Slack Integration skill |
| SMTP email module | Email Sender skill |
| Custom web scraper | Web Browser skill |
| SQLite conversation store | Persistent Memory skill |
| Cron job scheduler | Automation skill |
For each skill, use the same credentials (bot tokens, API keys) from your self-hosted setup.
Step 6: Transfer Data to EZClaws
If you exported data in Step 2, import it to your new agent.
Upload Knowledge Base Files
If your agent uses knowledge base files:
- Install a Knowledge Base or File Management skill from the marketplace.
- Upload your knowledge base files through the skill's interface.
- Verify the agent can access the files by asking it a question that requires knowledge base lookup.
Restore Conversation History
If you want to preserve conversation history:
- Install a Memory skill on your agent.
- Upload conversation summaries or key facts to the agent's persistent storage.
- Alternatively, provide a summary of important context in the system prompt.
Note that exact conversation replay is typically not possible — focus on preserving key information and context rather than every individual message.
Step 7: Redirect Integrations
Now redirect your messaging integrations from the self-hosted agent to EZClaws.
Telegram
Update the webhook URL to point to your EZClaws agent:
# Update Telegram webhook (automatic if using the EZClaws Telegram skill)
# The skill handles this when you enter the bot token.
# If manually updating:
curl -X POST "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook" \
-d "url=https://your-agent-production-xxxx.up.railway.app/telegram/webhook"
Since the same bot token is used, Telegram will seamlessly route messages to the new agent. Users will not notice any change.
Discord
If your Discord bot was running on your self-hosted server:
- Install the Discord skill on your EZClaws agent.
- Enter the same bot token.
- The bot will reconnect through EZClaws automatically.
- Stop the self-hosted Discord bot process to avoid conflicts.
Slack
Update the Slack app's Event Subscriptions URL:
- Go to api.slack.com/apps.
- Select your app.
- Under Event Subscriptions, update the Request URL to your EZClaws agent's webhook endpoint.
Custom Domain (Optional)
If you used a custom domain with your self-hosted agent, you have two options:
- Use the Railway domain — The default
*.up.railway.appdomain works immediately. - Configure a custom domain — Contact EZClaws support for guidance on pointing your custom domain to the new deployment.
Step 8: Test the Migrated Agent
Thoroughly test the new agent before decommissioning the old one.
Functional Testing
Run through your common use cases:
Test checklist:
[ ] Basic conversation — agent responds correctly
[ ] System prompt behavior — tone and rules match
[ ] Knowledge queries — agent references correct information
[ ] Integration test — Telegram/Discord/Slack messages work
[ ] Skill functionality — all installed skills work correctly
[ ] Memory (if applicable) — agent stores and retrieves information
Compare Responses
Send the same queries to both the old and new agent to compare:
Query: "What are our shipping rates?"
Self-hosted response: [compare]
EZClaws response: [compare]
Query: "Help me draft an email to a client"
Self-hosted response: [compare]
EZClaws response: [compare]
Responses will not be identical (LLMs are non-deterministic), but they should be equivalent in quality and accuracy.
Performance Testing
Compare response times:
- Send 10 queries and average the response times.
- EZClaws should be comparable to or faster than self-hosting, especially with Railway's infrastructure.
Step 9: Decommission Self-Hosted Infrastructure
Once you are confident the EZClaws agent is working correctly, decommission the old setup.
Graceful Shutdown
- Stop the self-hosted agent process.
- Wait 24 hours to ensure no issues with the EZClaws agent.
- If everything is good, proceed with cleanup.
Clean Up
# Stop and remove Docker containers
docker stop openclaw-agent
docker rm openclaw-agent
# Remove Docker images (optional)
docker rmi openclaw/agent:latest
# Remove data files (only after confirming backup)
rm -rf /opt/openclaw/data/
# Cancel server hosting (DigitalOcean, AWS, etc.)
# Do this through your provider's dashboard
Revoke Old Credentials
If you generated new API keys for EZClaws:
- Revoke the old model provider API key on the provider's platform.
- Remove any old webhook URLs from Telegram, Discord, or Slack.
- Delete any DNS records pointing to the old server.
Keep the Backup
Retain your data backup (agent-data-backup.tar.gz) for at least 30 days in case you need to reference old data or configurations.
Cost Comparison
After migration, compare your monthly costs:
Self-Hosting Costs (typical):
Server hosting: $10-50/month
Domain + SSL: $1-5/month
Monitoring tools: $0-20/month
Your maintenance time: 2-5 hours/month
Model provider API: Varies
Total: $11-75/month + your time
EZClaws Costs:
Subscription plan: See /pricing
Model provider API: Same as self-hosting
Maintenance time: ~0 hours/month
Total: Subscription + API costs
The biggest savings from EZClaws are typically in maintenance time and the peace of mind that comes with managed infrastructure.
Troubleshooting
Agent behaves differently than self-hosted version
If the migrated agent does not match the self-hosted behavior:
- Compare system prompts character by character for differences.
- Verify the same model and model version are being used.
- Check that all required skills are installed and configured.
- Ensure knowledge base files were transferred completely.
Integration stops working after migration
If Telegram, Discord, or Slack stops working:
- Verify the bot token is entered correctly in the EZClaws skill configuration.
- Confirm the old self-hosted agent is fully stopped (two agents competing for the same token causes issues).
- Check that webhook URLs are updated to point to the EZClaws domain.
- Wait 60 seconds for webhook propagation and try again.
Missing data after migration
If the agent does not have access to expected data:
- Verify data was uploaded through the appropriate skill.
- Check that the memory skill is installed and configured.
- Try providing key information in the system prompt as an interim solution.
- Re-export and re-import data if necessary.
Performance is slower than self-hosted
If response times are slower:
- Check the deployment region — choose the closest to your users.
- Verify the model is the same (different models have different speeds).
- The first few requests after deployment may be slower due to cold starts.
- If the issue persists, check your model provider's status for any ongoing issues.
Summary
Migrating from self-hosting to EZClaws eliminates the infrastructure burden while preserving your agent's functionality. The process involves inventorying your setup, exporting data, deploying on EZClaws, installing equivalent skills, transferring data, and redirecting integrations.
After migration, you gain automatic HTTPS, real-time monitoring, the skills marketplace, a managed credit system, and zero-maintenance hosting. Your agent continues to work exactly as before — you just no longer need to worry about keeping the servers running.
For next steps after migration, explore the skills marketplace for new capabilities, set up usage monitoring, and review our security guide to take advantage of EZClaws' security features.
Frequently Asked Questions
Conversation history stored in your self-hosted agent's local files can be transferred to the EZClaws agent's persistent volume. The process involves exporting your data, deploying a new agent on EZClaws, and importing the data. Conversations stored only in memory (RAM) will not survive the migration.
Yes. Your Telegram bot token works independently of where the agent is hosted. Simply enter the same bot token in your EZClaws agent configuration, and the bot will start routing messages to the new agent. Update the webhook URL to point to the EZClaws agent's domain.
Self-hosting costs include server rental ($5-50+/month), domain and SSL certificates, monitoring tools, and your time for maintenance. EZClaws subscription plans start competitively and include hosting, automatic HTTPS, monitoring, and the skills marketplace. The main cost variable is model provider API usage, which is the same regardless of hosting approach.
Yes. Each self-hosted agent becomes a separate agent on EZClaws. Deploy them one at a time, verify each is working, then decommission the self-hosted version. Your EZClaws plan determines how many agents you can run simultaneously.
EZClaws uses a standardized OpenClaw Docker image optimized for the platform. Most custom configurations can be replicated through skills, system prompts, and environment variables. If you have highly specialized Docker requirements, contact EZClaws support to discuss your needs.
Explore More
From the Blog
Everything you need to know about managing API keys for your AI agent. Covers key generation for OpenAI, Anthropic, and Google, plus security best practices, cost controls, and rotation.
11 min read25 AI Agent Automation Ideas You Can Set Up TodayDiscover 25 practical AI agent automation ideas for business, productivity, community, and personal use. Each idea includes what the agent does, who it helps, and how to set it up on EZClaws.
16 min readAI Agent for Customer Support: A Real-World Case StudySee how a growing e-commerce company deployed an AI agent for customer support using OpenClaw and EZClaws, reducing response times by 85% and handling 70% of tickets autonomously.
12 min readReady to Deploy Your AI Agent?
Our provisioning engine spins up your private OpenClaw instance — dedicated VM, HTTPS endpoint, and full autonomy in under a minute.
