<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: patrickm0</title>
    <description>The latest articles on DEV Community by patrickm0 (@patrickm0).</description>
    <link>https://dev.to/patrickm0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4116502%2F5d054098-9b59-4217-92f4-bd6cada422a7.png</url>
      <title>DEV Community: patrickm0</title>
      <link>https://dev.to/patrickm0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/patrickm0"/>
    <language>en</language>
    <item>
      <title>You built an app with AI. Now it has to run somewhere.</title>
      <dc:creator>patrickm0</dc:creator>
      <pubDate>Tue, 08 Sep 2026 22:25:13 +0000</pubDate>
      <link>https://dev.to/patrickm0/you-built-an-app-with-ai-now-it-has-to-run-somewhere-1aff</link>
      <guid>https://dev.to/patrickm0/you-built-an-app-with-ai-now-it-has-to-run-somewhere-1aff</guid>
      <description>&lt;p&gt;You described what you wanted, an assistant wrote it, and after some back and forth it works. You can see it at &lt;code&gt;localhost:3000&lt;/code&gt;. It does the thing.&lt;/p&gt;

&lt;p&gt;Then you try to show someone, and there is nowhere to send them.&lt;/p&gt;

&lt;p&gt;If you have spent the last few days getting increasingly frustrated at this stage, here is the useful thing to know first: &lt;strong&gt;you have not hit the limits of your ability. You have hit a different job.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Building and deploying are genuinely separate skills
&lt;/h2&gt;

&lt;p&gt;Writing the app is about behaviour — what happens when someone clicks the button. Deploying it is about everything the code assumes and never says out loud: that a database is running, that the machine has the right runtime, that something is listening on the right port, that certificates exist, that it starts again after a reboot.&lt;/p&gt;

&lt;p&gt;An assistant is very good at the first job because the feedback loop is tight and local. The second involves a machine you do not have yet, network configuration, and a dozen decisions nobody told you were decisions. It is not harder, exactly. It is unfamiliar, and it fails in ways that give you very little to search for.&lt;/p&gt;

&lt;p&gt;Almost everyone building this way hits the same wall. It is the single most common place a working project quietly stops.&lt;/p&gt;

&lt;h2&gt;
  
  
  First: you might not need a server at all
&lt;/h2&gt;

&lt;p&gt;Before anything else, the honest fork in the road.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If your app is a website with no backend&lt;/strong&gt; — static pages, or a React/Vue/Svelte front end that talks to APIs in the browser — you do not need a server. Push it to GitHub, connect the repo to Cloudflare Pages, Netlify or Vercel, and it is online in about ten minutes on a free tier. Stop reading and go and do that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If your app has a backend and a small database&lt;/strong&gt; — a Next.js app with a few API routes, a small Flask or Express service — start with Vercel, Railway, Render or Fly. They are genuinely good, the free and cheap tiers are real, and you will be running today rather than learning Linux.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A server becomes worth it when&lt;/strong&gt; one of these is true: the platform bill has grown past what a £5 server would cost, you need background jobs or scheduled tasks that keep running, you need a proper database that is definitely still there tomorrow, you are storing files that must persist, or you have data that has to live in a particular country.&lt;/p&gt;

&lt;p&gt;Nobody should move to their own server as step one. It is a fine destination and a terrible starting point.&lt;/p&gt;

&lt;h2&gt;
  
  
  The seven things that break in production
&lt;/h2&gt;

&lt;p&gt;Whichever route you take, AI-written code tends to share a specific set of assumptions. None of these are the assistant being wrong — they are perfectly sensible for code running on your laptop, and they all stop being sensible the moment it is somewhere else.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Secrets are in the code
&lt;/h3&gt;

&lt;p&gt;API keys, database passwords and tokens written directly into a source file. Fine on your machine, catastrophic in a public repository — bots scan GitHub for exactly this, within minutes of a push.&lt;/p&gt;

&lt;p&gt;Move them to environment variables, add &lt;code&gt;.env&lt;/code&gt; to &lt;code&gt;.gitignore&lt;/code&gt;, and &lt;strong&gt;if a key has ever been committed, rotate it.&lt;/strong&gt; Deleting it in a later commit does not remove it from history.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The database disappears every time you deploy
&lt;/h3&gt;

&lt;p&gt;If your app uses SQLite, or writes to a file next to the code, that data lives on the machine's disk. On most hosting platforms the filesystem is ephemeral: it is rebuilt on every deploy, and everything written since last time is gone.&lt;/p&gt;

&lt;p&gt;People discover this by launching, collecting a week of signups, pushing a small fix, and losing all of them. Use a managed Postgres or MySQL, or a database on a server with a real disk.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Uploaded files vanish for the same reason
&lt;/h3&gt;

&lt;p&gt;Same problem, different data. Anything users upload — avatars, documents, images — needs object storage such as Cloudflare R2 or Amazon S3, not a folder in the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;code&gt;localhost&lt;/code&gt; is hardcoded somewhere
&lt;/h3&gt;

&lt;p&gt;Almost always in at least one place: an API base URL, a database connection string, a redirect after login, a CORS setting. On your machine &lt;code&gt;localhost&lt;/code&gt; means "this computer", which is correct. In production it means the server talking to itself, and the request never reaches the user.&lt;/p&gt;

&lt;p&gt;Search your project for &lt;code&gt;localhost&lt;/code&gt; and &lt;code&gt;127.0.0.1&lt;/code&gt; before you deploy anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. You are running the development server
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;npm run dev&lt;/code&gt;, &lt;code&gt;flask run&lt;/code&gt;, &lt;code&gt;python manage.py runserver&lt;/code&gt; — these are built for one developer on one machine. They are slow under load, they often leak memory, and several will happily display a full stack trace, including secrets, to whoever triggers an error.&lt;/p&gt;

&lt;p&gt;Every framework has a production mode and a production server. Use it.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Nothing restarts it
&lt;/h3&gt;

&lt;p&gt;Your app runs because you typed a command in a terminal that is still open. Close the laptop, reboot the server, or let the process crash once, and it is simply off — with nothing to tell you, until someone mentions the site is down.&lt;/p&gt;

&lt;p&gt;Production needs something that starts the app on boot and restarts it when it dies. That is what Docker's restart policies, or a systemd service, are for.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. There are no backups, and "there are backups" is not the same thing
&lt;/h3&gt;

&lt;p&gt;The most expensive one, and the last to be noticed. Taking a backup is easy; the question is whether it restores.&lt;/p&gt;

&lt;p&gt;A backup can be well-formed, restore without a single error, contain every table — and hold no data at all. A &lt;code&gt;--schema-only&lt;/code&gt; flag copied from a StackOverflow answer, or a backup user that can read the schema but not the rows, produces a file of plausible size that restores perfectly into an empty database.&lt;/p&gt;

&lt;p&gt;If you take one thing from this list: at some point, restore your backup somewhere disposable and check the rows are actually in it. Most people never do this once.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you do go with your own server
&lt;/h2&gt;

&lt;p&gt;You will need each of these. This is the whole shape of it, so it stops being a fog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A server.&lt;/strong&gt; A small virtual machine from Hetzner, DigitalOcean, AWS or similar. Around £5–17 a month depending on provider.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A hardened login.&lt;/strong&gt; Key-based SSH, root login disabled, a firewall, automatic security updates. This is the part people skip, and servers get compromised within days of being reachable with a password.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A container setup.&lt;/strong&gt; Docker and Docker Compose, so the app runs the same way on the server as it does for you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A reverse proxy with HTTPS.&lt;/strong&gt; Something that answers on port 443, gets a certificate automatically and renews it. Caddy does this with almost no configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A database that persists&lt;/strong&gt;, on a volume that survives restarts and updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backups that leave the server&lt;/strong&gt;, to storage in your own account, verified by restoring them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A way to deploy changes&lt;/strong&gt; without SSHing in and hoping — ideally push to your main branch and let it happen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is roughly a day and a half the first time, most of it spent on things that are obvious in hindsight and impossible to search for beforehand. The second time it is an afternoon.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to do next
&lt;/h2&gt;

&lt;p&gt;Pick the honest one:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Static site, no backend?&lt;/strong&gt; Cloudflare Pages, ten minutes, free. Go now.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend, early, few users?&lt;/strong&gt; Railway or Render. Deal with servers when there is a reason to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outgrown that, or need control?&lt;/strong&gt; Work through the list above. I've open-sourced the stack I use for it — provisioning, HTTPS, backups and deploys — at &lt;a href="https://github.com/patrickmackin05/shipops-stack" rel="noopener noreferrer"&gt;github.com/patrickmackin05/shipops-stack&lt;/a&gt;, MIT licensed and free to take.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And whichever you pick: &lt;strong&gt;the fact you could not immediately deploy it does not mean you should not have built it.&lt;/strong&gt; You made something that works. Getting it online is a different, smaller, entirely learnable problem — and one where the answer is written down, which the building rarely is.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://shipops.dev/writing/built-with-ai-now-deploy-it" rel="noopener noreferrer"&gt;shipops.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>devops</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
