← All use cases

中文

Building software · Claude Code

Move a live web app from AWS to DigitalOcean with an agent as pair programmer

Idea + starter prompt, not run by us yet

For: Founders paying too much for AWS who want a cheaper host without a long outage

A developer had Claude Code write GitHub Actions jobs that set up a DigitalOcean server, Postgres, storage and Docker. It read failed run logs, patched the jobs, fixed SSL and database dump issues, and made certificates. He says the move took about four hours with no downtime and lowered the monthly hosting bill.

Steps

  1. List every piece of the current setup first: server, database, file storage, DNS and certificates.
  2. Ask Claude Code for a written migration plan and a rollback plan before it writes any workflow.
  3. Let it build the setup workflows on a staging copy and read the failed run logs itself to fix them.
  4. Compare every environment variable name in the new config against what the code actually reads.
  5. Test the new stack with a copy of the data, then switch DNS only when you have checked it yourself.

Starter prompt

Starter prompt. Change the [brackets] first.

I want to move my web app from [current host] to [new host]. The stack is [framework, database, storage]. First, read the repo and list every service, secret name and environment variable the app needs. Then write a step by step migration plan with a rollback plan for each step. Build the setup as [CI tool] workflows aimed at a staging environment only. Do not touch production DNS or the live database until I approve the plan in writing. Never ask me to paste passwords or keys into this chat. Tell me where to store them as secrets instead. After each failed run, read the logs and explain the cause before you change anything.

Original post: DEV · found via agentusecases.ai. Written up in our own words. We haven't run it, so test it on made-up data first.