ai newsMi., 25. Nov.
EilmeldungCan Claude’s storage webhooks miss an hour-long outage?

How to deploy an app you built with AI to your own server

Originally published on the OpsCrew blog . TL;DR Get the code into a GitHub repository, then find out whether it is static files (a Vite single-page app, which needs an index.html fallback) or a server (Next.js, TanStack Start, Express) that needs Node.js running. Most builder apps keep their backe

dev.toFreitag 18:29 · 20.11.6 Min. Lesezeit
Bild: dev.to

Posted on Nov 20 • Originally published at opscrew.dev

Originally published on the OpsCrew blog.

To deploy an AI-built app to your own server, you do five things: get the code into a Git repository, find out whether it is static files or a server, decide where its backend lives, build it into a container image with the right environment variables, and run that image behind a reverse proxy that serves your domain over HTTPS. Lovable, Bolt.new, Replit, v0 and Claude Code all take this path; what differs is the stack each one produces and the backend it leans on.

Every builder fact below comes from the builder's own documentation, checked on 11 November 2026. The Dockerfiles and the Caddy and Docker Compose files in the builder guides were built and run in Docker the same day, on Node.js 22, against fresh apps from the Vite, TanStack Start and Next.js starters and a small Express and PostgreSQL app.

Every builder hosts what it builds: Lovable publishes to lovable.app with custom domains and a managed backend, Bolt has Bolt Cloud hosting with.bolt.host addresses, Replit publishes to its own Google Cloud infrastructure, and v0 publishes to Vercel. Lovable's own docs recommend starting on Lovable, syncing the code with Git, and moving parts only when you hit a real constraint. Stay where you are when:

Move when you need something the builder's hosting does not give you: a fixed monthly price, data in a region or on hardware you choose, other services on the same machine, root access, or an app that no longer depends on one vendor. The comparisons of your own server against Vercel and against hosting platforms in general go through the trade-offs.

How each builder gets its code to GitHub, checked 11 November 2026

Then clone the repository and run the app on your own computer. If it does not start locally, it will not start on a server, and a local run shows you every environment variable it expects.

Open package.json and look at the dependencies and the build and start scripts.

The stacks AI builders produce and what each needs to run

Most builder apps keep their data and sign-in in a hosted service that the code reaches over the internet and that does not move with it:

Move the frontend first and keep the backend where it is. Once the app runs on your server against it, decide whether to move the data too, as a separate step with its own test.

Runtime variables. Everything else, read on the server while the app runs: DATABASE_URL, API secrets, session secrets. These go into the container's environment on the server, from a file that never enters the repository. A server-rendered app can need a public value twice: a Lovable TanStack Start app reads its Supabase URL and key as VITE_ values in the browser and again as SUPABASE_URL and SUPABASE_PUBLISHABLE_KEY on the server.

Collect both lists before you build. Lovable keeps its public Supabase values in the repository's.env; Bolt keeps environment variables in.env but its secrets only on Bolt's servers; Replit's secrets must be re-entered; v0 keeps everything in the Vercel project's settings.

The Dockerfile depends on the stack from step 2; each builder article has one that was built and run for that stack:

Every stack gets the same front door: a reverse proxy takes the public traffic on ports 80 and 443 and passes requests to the app. Caddy also handles the domain's HTTPS certificate by itself: when the domain's DNS record points at the server and ports 80 and 443 are open, it obtains and renews it and redirects HTTP to HTTPS. This Caddyfile is the whole configuration for an app that listens on port 3000:

app.example.com { reverse_proxy app:3000 } Enter fullscreen mode Exit fullscreen mode This compose.yaml runs the app and Caddy together, with the certificate kept in a volume so it survives restarts:

services: app: build:. env_file:.env.production restart: unless-stopped caddy: image: caddy:2-alpine restart: unless-stopped ports: - "80:80" - "443:443" - "443:443/udp" volumes: -./Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - caddy_config:/config volumes: caddy_data: caddy_config: Enter fullscreen mode Exit fullscreen mode Replace app.example.com with your domain; on the server, docker compose up -d --build builds the image and starts both. Build-time variables from step 4 go under build.args, as each builder guide shows. Only Caddy's ports are published to the internet, never the app's.

We ran these files with localhost as the site address, where Caddy issues a certificate from its own local authority; a public certificate for a real domain needs a real server and DNS record, which this test did not cover.

Any Linux server with Docker works, including one you already pay for. The general steps are the same for every app: how to deploy a web app to a VPS covers creating the server, SSH keys, the firewall and Docker; Docker Compose on Hetzner with GitHub Actions and a DigitalOcean Droplet walk through two providers; and Hetzner vs DigitalOcean helps you pick one.

For the domain, add an A record (and an AAAA record if the server has IPv6) pointing at the server's address. Caddy can only get the certificate after that record resolves, so set it before the first start.

Once the app is live, add deploys without downtime, so an update does not drop visitors, and a preview for every pull request, which replaces the builder's preview link.

Check each of these on a temporary address while the builder's hosting keeps running. Once all pass, move the domain and unpublish the old copy when you are ready.

What breaks after you move an AI-built app, and why

Lovable apps, and Bolt apps whose database you claimed into Supabase, sign users in through Supabase. Its Site URL is the default redirect address that confirmation and password-reset emails use, and its Redirect URLs list says where users may be sent after sign-in. In a Supabase project of your own, both are on the dashboard's URL Configuration page; for Lovable Cloud, Lovable's hosting guide says only to add the new address to the auth provider's allowed redirect URLs.

OpsCrew is an open-source tool that takes an app from its GitHub repository to a hardened server on your own cloud account. It recognises code exported from Lovable, Bolt, Replit and v0, and its free opscrew scan checks the repository for leaked keys and exposed Supabase or Firebase data before you go live.

It builds the container image in GitHub Actions with its own Dockerfile for Vite and Next.js apps and Node.js servers such as Express (or yours, if the repository has one), and handles VITE_ and NEXT_PUBLIC_ values as build-time values that are public by nature. It deploys to a new server on Hetzner Cloud or DigitalOcean, or to a server you already have, buys or connects your domain on Cloudflare, and runs a database next to your app when you want one, or keeps the hosted one you already use. Every change waits for your approval of its exact plan. In Claude Code, the OpsCrew plugin runs the same flow from the chat. The setup page lists the accounts and tools you need, and use cases shows what it does for an app from an AI builder.

Quelle: dev.to (dev.to). Original öffnen