Deploy a Claude Code app to DigitalOcean App Platform

Free static apps, containers from $5/month.

Step by step

  1. Check your project type

    • Static / SPA: Build outputs dist/, build/ or out/.
    • Server app / API / bot: Has a start command that keeps running, often a Dockerfile.
  2. Get the code onto GitHub

    • Ask it to initialise git and create a GitHub repo, or run git init / git push yourself.
  3. Create the project on DigitalOcean App Platform

    Control Panel → Apps → Create App, pick GitHub/GitLab as the source and the branch; App Platform detects the runtime.

  4. Check the build settings

    If Output Directory is empty, App Platform scans for _static, dist, public, build.

    For Claude Code: build command From package.json / Dockerfile, output Depends on framework.

  5. Add environment variables before the first build

    In DigitalOcean App Platform: App → Settings → App-level environment variables (choose build-time scope for VITE_* values). Copy these from Claude Code:

    • Everything in .env — add each value in the host dashboard.

    Changed a value later? Rebuild. Vite bakes variables in at build time. Troubleshoot missing env vars

  6. Make page refreshes work (Vite / React Router single-page apps)

    App → Settings → your static site → Custom Pages
    # Custom Pages → Catchall → Page Name: index.html

    Server-rendered projects (TanStack Start, Next.js) don't need this. DigitalOcean App Platform docs (opens in a new tab)

  7. Update login redirect URLs

    Add your new DigitalOcean App Platform URL (and later your custom domain) to your auth provider's allowed URLs. Redirect troubleshooting

  8. Add your domain

    App → Settings → Domains → Add domain, then point DNS as instructed (or let DigitalOcean manage DNS).

What it will cost

Free tier Free: 3 static-site apps, 1 GiB outbound transfer per app per month. Paid from $5/mo: Containers from $5/month (1 shared vCPU, 512 MiB, 50 GiB transfer). Dev database $7/month. Checked 17 Oct 2026 on DigitalOcean App Platform's pricing page (opens in a new tab).

  • 1 GiB/month of transfer is small — a popular static app will pay overage or should live on Cloudflare Pages.

Other options for Claude Code