<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi" -->

---
title: Migrate Next.js app away from &quot;Vercel + PlanetScale&quot; to...
description: Learn how to migrate a Next.js app from Vercel + PlanetScale to Fly.io. The article provides a step-by-step guide on deploying the app and MySQL database to...
canonical: https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Migrate Next.js app away from &quot;Vercel + PlanetScale&quot; to &quot;Fly.io&quot; | daily.dev
og:description: Learn how to migrate a Next.js app from Vercel + PlanetScale to Fly.io. The article provides a step-by-step guide on deploying the app and MySQL database to...
og:url: https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi
og:image: https://api.daily.dev/og/posts/ygE8J2isI.png
og:image:alt: Migrate Next.js app away from &quot;Vercel + PlanetScale&quot; to &quot;Fly.io&quot;
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate Next.js app away from "Vercel + PlanetScale" to "Fly.io"

**[Community Picks](https://daily.dev/sources/community)** · 8 min read · 19 upvotes · 2 comments

## Summary

Learn how to migrate a Next.js app from Vercel + PlanetScale to Fly.io. The article provides a step-by-step guide on deploying the app and MySQL database to Fly.io. It also explains how to set up Cloudflare for non-www to www redirection.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.crispyscript.com/articles/13>

## Community discussion

Top comments from developers on daily.dev.

**@tdlm** · 0 upvotes

> Wow. This looks promising. Saving for later.

**@fab978** · 0 upvotes

> Wow that’s great

---

Tags: [#nextjs](https://daily.dev/tags/nextjs), [#mysql](https://daily.dev/tags/mysql), [#vercel](https://daily.dev/tags/vercel), [#planetscale](https://daily.dev/tags/planetscale)

[View this post on daily.dev](https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Migrate Next.js app away from \"Vercel + PlanetScale\" to \"Fly.io\"","url":"https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi"},"datePublished":"2024-03-20T14:14:15.800Z","dateModified":"2024-05-09T09:28:18.744Z","description":"Learn how to migrate a Next.js app from Vercel + PlanetScale to Fly.io. The article provides a step-by-step guide on deploying the app and MySQL database to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/458ef4165246f0d606589e8b5e02eef8?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/458ef4165246f0d606589e8b5e02eef8?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Community Picks","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Community Picks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1655817725/logos/community","url":"https://daily.dev/sources/community"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":19},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"nextjs,mysql,vercel,planetscale","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Community Picks","item":"https://daily.dev/sources/community"},{"@type":"ListItem","position":3,"name":"Migrate Next.js app away from \"Vercel + PlanetScale\" to \"Fly.io\""}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/migrate-next-js-app-away-from-vercel-planetscale-to-fly-io--yge8j2isi","comment":[{"@type":"Comment","text":"Wow. This looks promising. Saving for later.","datePublished":"2024-03-20T20:43:32.136Z","url":"https://daily.dev/posts/ygE8J2isI#c-m1jABA9B3","author":{"@type":"Person","name":"Scott","url":"https://daily.dev/tdlm","image":"https://media.daily.dev/image/upload/s--E1sPmqCc--/f_auto/v1778693132/avatars/avatar_ClyEYIbsIwrvUhZiWITas?_a=BAMAMiWQ0"}},{"@type":"Comment","text":"Wow that’s great","datePublished":"2024-03-25T20:03:13.778Z","url":"https://daily.dev/posts/ygE8J2isI#c-Iqr1bN6sQ","author":{"@type":"Person","name":"Furqan ahmad","url":"https://daily.dev/fab978","image":"https://media.daily.dev/image/upload/s--GY0VPIs1--/f_auto/v1788339486/avatars/avatar_01YKXdhx6XxiWycQaD2rh?_a=BAMAMicg0"}}]}
```

