How to Migrate OpenClaw to xCloud (Hostinger, Cloudways or Any Server)

Updated December 4, 2026 · 9 min read

Summarize with:
Share:

You can migrate OpenClaw to xCloud from any host without copying a single file yourself. Deploy a fresh OpenClaw on xCloud, give your old agent root SSH access to the new server, and ask it to migrate itself. The agent backs itself up, copies the backup to xCloud, restores it there and tells you when it’s done. Then you stop the old agent, connect your Telegram bot in xCloud and say hi to your agent on its new server.

It takes about 20 minutes. Your old agent keeps running the whole time, so nothing is lost if you stop halfway.

This works wherever OpenClaw runs today: Hostinger’s Managed OpenClaw or OpenClaw on a Hostinger VPS with Docker (see Hostinger’s OpenClaw guide), Cloudways Managed AI Agent Hosting, which supports OpenClaw and gives SSH access (see Cloudways’ announcement), another managed host, or any VPS or Docker container you can open a terminal on. Moving a Hermes Agent instead? See How to Migrate Hermes Agent to xCloud.

What moves and what doesn’t

The agent uses OpenClaw’s own openclaw backup create and openclaw backup restore commands, the way OpenClaw’s migration guide describes, so it does not matter how your old host installed OpenClaw.

Moves to xCloud Stays as xCloud set it up
The workspace: MEMORY.md, SOUL.md, USER.md, skills and prompts The OpenClaw program and its version
Sessions, agents and their databases The gateway settings: port, gateway token and dashboard access
openclaw.json, including your model and provider settings The openclaw-gateway service, domain, SSL and Basic Auth
Credentials and API keys, including your Telegram bot token

What you need

  • Your current OpenClaw agent, and a way to chat with it (Telegram, its Control UI or the OpenClaw command line)
  • An old server that can reach your xCloud server on SSH port 22, with ssh and scp available to the agent
  • An xCloud account
  • Your Telegram bot token and Telegram user ID, if you chat with the agent on Telegram

Step 1: Deploy a fresh OpenClaw on xCloud

Create a new OpenClaw server by following How to Deploy OpenClaw with xCloud, or install it on your own server. Two choices matter for the migration:

  • Choose the same AI provider and model as your old agent. The migration brings your old model settings and keys, and xCloud’s Providers page then shows the same provider.
  • Leave the Telegram fields empty. If you add the same bot now, two agents will use one bot.

When the server is ready, ask your old agent which version it runs (openclaw --version). Then open OpenClaw → Updates on the xCloud server. If the xCloud version is older, click Check for Updates and then Update Now, so xCloud runs the same version or a newer one.

Step 2: Get an SSH key from your old agent

Your old agent needs its own SSH key to log in to the new server. Send it this message:

Create a new SSH key pair for a migration: type ed25519, file name openclaw_migration, no passphrase, saved in your SSH folder. Then show me only the public key (the .pub file).

Copy the line it sends back. It starts with ssh-ed25519. Never share the private key.

Step 3: Give the key root access to the xCloud server

  1. Open the new server in xCloud and go to Settings → Sudo Users.
  2. Click Add Sudo User. On an OpenClaw server, Sudo User Name is already root. A root user needs no password.
  3. Click Add SSH Key, give it a name such as openclaw-migration, paste the public key from Step 2 under Public Key, and click Add SSH Key. The new key is ticked.
  4. Optional: tick Temporary, so xCloud removes the key by itself within 12 hours. If root already has a key on this server, leave Temporary unticked: xCloud can’t make an existing root entry temporary. Remove the migration key yourself in Step 7.
  5. Click Save.

Sudo User Name set to root, the openclaw-migration SSH key ticked and the Save button in xCloud’s Add Sudo User form for an OpenClaw server

xCloud adds the key for the root user in a few seconds. You’ll find the server’s IP address on the server’s overview in xCloud.

Step 4: Ask your old agent to migrate itself

Copy this message, replace SERVER_IP with your xCloud server’s IP address, and send it to your old agent:

Please migrate yourself fully to my new OpenClaw on xCloud, then tell me when it's done.

The xCloud server: root@SERVER_IP, SSH port 22. Log in with the openclaw_migration SSH key you created, and use ssh -n for single commands. On that server OpenClaw runs as root, its state folder is /root/.openclaw, and its gateway is the systemd user service openclaw-gateway (run export XDG_RUNTIME_DIR=/run/user/0 before systemctl --user).

Safety rules:
- Copy, never move. Don't delete, stop or change anything on this server, except the temporary backup files you create.
- On the xCloud server, don't reinstall, update or uninstall OpenClaw, and don't change anything outside /root.
- If a step fails, stop and tell me what happened. Don't improvise workarounds.

Steps:
1. Run openclaw --version here and on the xCloud server. If the xCloud version is older than yours, or "openclaw backup restore --help" fails on either server, stop and tell me.
2. Back yourself up: mkdir -p /tmp/openclaw-migration, then openclaw backup create --output /tmp/openclaw-migration --verify. The archive holds keys and tokens, so treat it as a secret.
3. Copy the .tar.gz file with scp to /root/openclaw-migration.tar.gz on the xCloud server.
4. On the xCloud server, in this order:
   a. systemctl --user stop openclaw-gateway
   b. openclaw backup restore /root/openclaw-migration.tar.gz --target /root/openclaw-restored
   c. Keep the fresh install as a safety copy: mv /root/.openclaw /root/.openclaw-before-migration
   d. Read the manifest.json under /root/openclaw-restored. Copy the asset of kind "state" (its archivePath, under /root/openclaw-restored) to /root/.openclaw with cp -a. If the manifest lists workspace folders outside the state folder, copy them into /root/.openclaw/workspace. If your state folder here was not /root/.openclaw, change the old paths in /root/.openclaw/openclaw.json to /root/.openclaw.
   e. Keep xCloud's gateway settings: replace the "gateway" section of /root/.openclaw/openclaw.json with the "gateway" section of /root/.openclaw-before-migration/openclaw.json. Change nothing else in that file.
   f. openclaw config set channels.telegram.enabled false, and the same for any other chat channel that uses a bot token.
   g. openclaw doctor --fix --non-interactive (it can take a few minutes), then systemctl --user restart openclaw-gateway, and check that systemctl --user is-active openclaw-gateway says active.
   h. Delete /root/openclaw-migration.tar.gz and /root/openclaw-restored.
5. Delete /tmp/openclaw-migration here.
6. On the xCloud server, check with openclaw status and by listing /root/.openclaw/workspace that your agents, memory files and skills are there.
7. Reply "Migration done", with what you checked. Don't stop yourself: I will do that.

What the message makes sure of:

  • The gateway section stays xCloud’s, so the xCloud dashboard, its gateway token and your domain keep working. Everything else comes from your old agent.
  • Telegram comes over switched off, so your old agent keeps answering until you move the bot in Step 6.
  • A safety copy of the fresh xCloud install stays in /root/.openclaw-before-migration.
  • --verify checks the backup archive and its databases right after OpenClaw writes it.

OpenClaw’s guide suggests stopping the gateway before a backup. Your agent can’t stop itself and keep talking to you, so it backs up while it runs. Anything you tell the old agent after the backup stays on the old server.

When the agent replies Migration done, go on to Step 5.

Step 5: Stop the old OpenClaw

A Telegram bot token can only be used by one running OpenClaw at a time, so stop the old agent before you connect the bot on xCloud. Use the way that matches where it runs:

Where the old agent runs How to stop it
Hostinger Managed OpenClaw In Hostinger’s dashboard, open your OpenClaw app and use its controls to stop or delete it.
OpenClaw on a Hostinger VPS (Docker Manager) In Hostinger’s Docker Manager (hPanel), stop the OpenClaw project.
Any other Docker install docker stop <container> on that server, or docker compose down in the folder of its compose file.
A plain install (openclaw gateway install) openclaw gateway stop in a terminal on that server. Newer versions ask you to add --force.
Cloudways or another managed host Use your host’s own controls to stop or delete the agent, or run openclaw gateway stop --force on it over SSH.

To check, send a message to your bot: nothing should answer yet.

Step 6: Connect Telegram on xCloud and say hi

  1. In xCloud, open the server and go to OpenClaw → Channels.
  2. Paste your bot token under Telegram Bot Token and your user ID under Telegram User ID. The user ID comes from @userinfobot on Telegram.
  3. Click Save Changes. xCloud updates the OpenClaw configuration and restarts the gateway.
  4. Send “hi” to your Telegram bot. Your agent now answers from xCloud, with its memory and skills.

Telegram Bot Token, Telegram User ID and Save Changes on the OpenClaw Channels page in xCloud

Ask it something only your old agent knew, to see that its memory came over. If you don’t use Telegram, chat with your agent the way you usually do, such as its Control UI on your xCloud domain. New to bots? See How to Create a Telegram Bot and Connect It with OpenClaw.

Step 7: Clean up

  1. In xCloud, go to Settings → Sudo Users. If the migration key is the only key on root, delete the root entry: for root, xCloud removes only its SSH keys, never the user. If root has other keys you use, edit it and untick only openclaw-migration. A Temporary key is removed by itself within 12 hours.
  2. Keep the old agent stopped for a few days. Once you are sure everything is on xCloud, cancel the old server or plan.
  3. When you no longer need the safety copy, delete /root/.openclaw-before-migration on the xCloud server.

The root entry with one SSH key in xCloud’s Sudo Users list, where you remove the migration key after the move

After the migration: xCloud settings that rewrite files

A few xCloud pages write OpenClaw settings from what you enter in xCloud, not from the migrated files:

  • OpenClaw → Providers → Save Changes sets the provider key and default model you enter there. If you chose the same provider in Step 1, nothing changes for you.
  • OpenClaw → Channels → Save Changes writes the Telegram token and user ID you enter there and restarts the gateway.
  • OpenClaw → Reset removes /root/.openclaw and sets OpenClaw up again from scratch. Don’t use it unless you want to start over. See How to Reset OpenClaw with xCloud.

Troubleshooting

The agent can’t log in to the xCloud server

Check that the key in Sudo Users is the full .pub line from Step 2, that the user is root, and that you used the server’s IP address. If you ticked Temporary, the key is removed after 12 hours: add it again. If root already had a key on this server, xCloud doesn’t accept Temporary: add the key with it unticked and remove it yourself in Step 7. Some hosts block outgoing SSH: ask your old agent to test ssh -n root@SERVER_IP true and tell you the error.

The old agent has no ssh or scp

This happens in some Docker images. Ask the agent to run only the backup (Step 4, step 2 of the message), copy the archive out of the container with docker cp, and upload it yourself with scp to /root/openclaw-migration.tar.gz. Then ask the agent, or run yourself on the xCloud server, steps 4a to 4h.

The xCloud dashboard can’t reach OpenClaw after the migration

The gateway section was probably overwritten. Copy the gateway section from /root/.openclaw-before-migration/openclaw.json back into /root/.openclaw/openclaw.json and run systemctl --user restart openclaw-gateway. If the file itself is broken, see How to Fix openclaw.json.

A plugin doesn’t load

OpenClaw backups don’t include plugin node_modules. Run openclaw plugins update <id> for that plugin on the xCloud server, as OpenClaw’s restore message suggests.

Telegram doesn’t answer after Step 6

Make sure the old agent is stopped (Step 5), then check OpenClaw → Logs for Telegram errors. A gateway that won’t start can often be fixed with Repair OpenClaw.

You want to undo the migration

On the xCloud server, run systemctl --user stop openclaw-gateway, move /root/.openclaw aside, move /root/.openclaw-before-migration back to /root/.openclaw, and start the gateway again. Your old agent was never changed, so you can simply start it again.

Frequently asked questions

Can I migrate OpenClaw from any host?

Yes. The migration uses OpenClaw’s own backup and restore commands, so it works wherever your OpenClaw agent runs: Hostinger, Cloudways, another managed host, a VPS or a Docker container. Your old agent only needs to run openclaw, ssh and scp, and to reach your xCloud server on SSH port 22.

Does the migration move my memory, sessions and API keys?

Yes. The agent backs up its whole OpenClaw state folder with openclaw backup create and restores it on xCloud. That covers openclaw.json, the workspace with MEMORY.md and your skills, sessions, agents, credentials and the provider keys your old agent used. The OpenClaw program itself is not copied: xCloud already installed it.

Do I need a new Telegram bot?

No. Keep your bot. The migration switches Telegram off on xCloud, because one bot token can only be used by one running OpenClaw at a time. After you stop the old agent, paste the same bot token and your Telegram user ID in OpenClaw → Channels and click Save Changes.

Can I keep the old OpenClaw running?

Yes, until you are happy with the xCloud agent. The migration only copies, so the old agent keeps working. Just don’t run both with the same Telegram bot: stop the old agent before you connect the bot in xCloud.

If you run into any issues during the migration, feel free to reach out to our support team.