Lovable → DigitalOcean
Move a Lovable app to DigitalOcean App Platform
A Lovable repository can be a small static Vite build, a service with server-side code, or a frontend coupled to Supabase. Those shapes need different App Platform components. This guide shows the decision points stackferry checks before a deployment begins.
Published by stackferry · Material reviewed 15 July 2026
- Use a static-site component for a client-only build that outputs dist.
- Use a web service or container when the repository must run server code.
- Move configuration by variable name; keep secret values out of the repository.
- Handle Supabase rows, users and Storage as separately authorized migration work.
Assess your repository · Open DigitalOcean App Platform
First decide what the repository actually runs
Do not choose a DigitalOcean component from the visual appearance of the app. Open package.json, inspect the build and start scripts, and identify whether the finished application only serves browser assets or needs a process that stays running. A Vite application that builds into dist and calls an external API from the browser is normally a static-site candidate. A repository with server rendering, an API route, a worker or a long-running Node process needs a service or container instead.
This distinction controls cost and configuration. DigitalOcean currently allows up to three static-only apps on the App Platform free tier, with 1 GiB of outbound transfer per app. Paid service containers currently start at $5 per month for a shared 1 vCPU, 512 MiB instance. Those provider prices were checked on 15 July 2026 and should be verified again before deployment.
What stackferry checks
- Build command and output directory
- Whether a server process must stay running
- Required Node version and package manager
- Client-side routes that need an index.html catch-all
For a Vite or React frontend, make the static contract explicit
For the common Vite route, stackferry expects a reproducible install command, a successful production build and dist as the output directory. App Platform can detect common output directories, but setting the directory explicitly removes ambiguity. If React Router owns paths such as /dashboard or /projects/123, configure index.html as the catch-all document so a direct browser request does not become a platform 404.
Only variables intended for browser code should be available to a static build. In Vite, a VITE_ prefix means the value can be compiled into public JavaScript. Service-role keys, database passwords and provider tokens do not belong there. stackferry inventories required variable names but does not copy secret values from the source environment.
What stackferry checks
- npm ci and npm run build complete from a clean checkout
- The final assets are written to dist
- index.html is configured as the SPA catch-all when needed
- Every VITE_ value is safe to expose to a browser
Server code changes the deployment shape
If the repository includes a server, choose a web service or deploy a container image. App Platform services use port 8080 by default, and the process must listen on 0.0.0.0 rather than localhost. A health endpoint should prove that the process is ready to receive traffic; it should not depend on an optional third-party service being perfect at that moment.
Separate build-time and runtime variables. DigitalOcean supports both scopes and can store sensitive values as encrypted variables. A variable needed to compile a frontend is different from a credential that should exist only while the service runs. Treat that difference as part of the migration plan, not as a setting to guess after the first failed deploy.
What stackferry checks
- Run command binds to 0.0.0.0 and the configured port
- Health-check path returns success without authentication
- Runtime secrets are encrypted and absent from build logs
- Background workers are modeled separately from web traffic
Keep the Supabase boundary visible
Moving the frontend does not automatically move a Supabase backend. A project can continue using its existing Supabase URL and public anon key while the frontend moves to DigitalOcean. That is often the smallest first step, but redirect URLs, CORS rules and any allowed origins still need to include the new domain.
Database rows, authentication identities, uploaded files, row-level security policies and Edge Functions are separate concerns. stackferry's standard port uses a new empty or schema-only destination unless a production-data migration has been explicitly scoped and authorized. This prevents a hosting change from quietly becoming a destructive data migration.
What stackferry checks
- Supabase project remains in place or has a separately approved destination
- Auth redirect URLs include the App Platform and custom domains
- RLS policies and server-only keys are reviewed independently
- No production rows, users or files are copied by default
Cut over with evidence, not hope
Deploy to the ondigitalocean.app starter domain first. Verify the landing page, a direct request to a client-side route, authentication callbacks, API calls and a fresh browser session. For a service, also inspect build logs, runtime logs and health-check status. Only then add the production domain.
App Platform supports a custom domain after the first deployment. If DNS stays with another provider, DigitalOcean supplies a CNAME target ending in ondigitalocean.app; root domains may use the A records shown by the platform when CNAME flattening is unavailable. Keep the old deployment reachable until DNS and application smoke checks pass, then document the rollback route.
What stackferry checks
- Starter-domain smoke test passes
- Deep links reload without a 404
- Authentication callbacks use the new origin
- DNS cutover and rollback steps are recorded
What stackferry does—and where it stops
stackferry inventories the repository, recommends a component shape, identifies configuration names, produces a deployment plan and verifies the resulting application boundary. When DigitalOcean is selected inside a project, create a new account through the tracked registration route and the standard port is €0. Use an existing DigitalOcean account and it is €490.
The recommendation is independent of the affiliate relationship. DigitalOcean is appropriate when its component model fits the repository and operating requirements; it is not promoted ahead of a technically better destination because a referral program exists. Production-data transfer, backend recreation, unsupported runtime work and incident recovery remain separately scoped.
What stackferry checks
- DigitalOcean selection and outbound referral clicks are recorded separately
- Commercial relationship is disclosed before provider links
- Provider choice does not alter the compatibility score
- Out-of-scope work is quoted before it starts
Primary DigitalOcean documentation
Frequently asked questions
Can a Lovable app run on DigitalOcean App Platform?
Usually, but the repository decides the component type. A client-only Vite build can use a static-site component. Server-side rendering, API routes, workers or a long-running Node process require a service or container.
Does moving the app also move Supabase?
No. The frontend can continue using an existing Supabase project. Moving database rows, auth users, Storage objects or Edge Functions is separate work and is never included silently in a standard stackferry port.
Is DigitalOcean App Platform free?
DigitalOcean currently offers a free tier for up to three apps that contain only static-site components, with 1 GiB outbound transfer per app. Services, workers, jobs, databases and transfer beyond allowances can add charges. Verify current provider pricing before deploying.
Does stackferry earn money from DigitalOcean?
stackferry has an affiliate relationship with DigitalOcean. DigitalOcean states that referrals of new paying customers can pay a 10% monthly commission for 12 months. The relationship does not change the customer's price or stackferry's technical recommendation.