If you have ever exported an application from Lovable, Bolt, or v0 only to find yourself battling blank screens and broken routes on your own domain, you are not alone. The transition from a polished builder environment to a raw zip file or GitHub repo often reveals hidden configuration gaps. Developers frequently encounter issues such as routes returning 404 errors on refresh, environment variables that fail to load, and authentication redirects pointing to the wrong origin. To address these common pain points, the team at VeloxaDev has released veloxahost/host-ai-built-apps, an open-source repository containing the specific server configurations needed to get these AI-generated apps running smoothly on custom domains.

Identifying Your App Type and Backend Dependencies

The first step in the process, according to the new guide, is accurately categorizing what you actually exported. The repository provides a clear decision matrix: if you see an index.html file with no package.json, you are dealing with a plain static site that can be served by any basic file server. However, most Lovable and Bolt exports are Vite single-page applications, which require a specific build process followed by an SPA fallback configuration. Next.js apps, typical of v0 exports, need a Node server or Docker container. Crucially, the guide warns that backend services like Supabase or builder-native authentication systems do not automatically migrate. Developers must manually add their new domain to the allowed origins and redirect URLs in those external services before switching DNS records.

Streamlining Vite Apps with Caddy and Next.js with Docker

For the majority of users exporting Vite-based apps, the repo recommends using Caddy on an Ubuntu server to handle automatic HTTPS and routing. The provided Caddyfile includes a critical directive: try_files {path} /index.html. This specific line prevents the notorious 404 error when users refresh a sub-route like /dashboard, a common failure point in static hosting. For Next.js applications, the guide suggests setting output: "standalone" in the next.config.js file and utilizing a multi-stage Dockerfile included in the repo. This Docker setup is then reverse-proxied through Caddy, ensuring that the application runs in an isolated, reproducible environment while still benefiting from automatic certificate management.

Automating Deployments and Troubleshooting Common Pitfalls

Beyond initial setup, the repository includes a GitHub Actions workflow designed to automate deployments on every push. By adding DEPLOY_HOST, DEPLOY_USER, and DEPLOY_SSH_KEY as secrets, developers can rsync their built assets directly to the server, eliminating manual upload steps. The guide also catalogs five specific problems users are likely to encounter. These include blank pages caused by incorrect base paths in vite.config, missing VITE_* environment variables that require a rebuild after changes, and mixed content errors if API URLs are not strictly https://. The configs are provider-neutral and MIT-licensed, though the authors disclose their affiliation with VeloxaHost, which offers servers starting at $4 per month.

Key Takeaways

  • The new open-source repo veloxahost/host-ai-built-apps provides MIT-licensed Caddy and Docker configs to fix common hosting issues for Lovable, Bolt, and v0 exports.
  • Vite apps require a specific try_files {path} /index.html directive in Caddy to prevent 404 errors on route refreshes, while Next.js apps need standalone output and Docker.
  • Backend dependencies like Supabase or builder-native auth do not auto-migrate; developers must manually update allowed origins and redirect URLs before switching DNS.
  • The repo includes a GitHub Actions workflow for automated deployments and documents five common pitfalls, including blank pages and mixed content errors.

The Bottom Line

This repository removes the friction between AI-generated prototypes and production-ready deployments. It is a practical, well-documented solution for developers tired of debugging basic routing and environment issues.