Web deployment
Your FlutterGo app already runs on the web, that's what the live preview is. Here we cover how to put your work on the web for other people.
There are two built-in ways. The Share button in the project toolbar creates a temporary public preview link to your running app, perfect for quick tests on your phone or a teammate's laptop. For a permanent public URL, FlutterGo can publish an HTML page (for example the landing page companion of your project) to Vercel or Cloudflare Pages from the file viewer's Share menu.
The mobile app itself ships to the stores through the Deploy wizard, see Publishing to Google Play and Publishing to the App Store.
What you need#
- For public preview links: nothing, just a running web preview.
- For Vercel: a free Vercel account and a Vercel token (the dialog links you to Get Vercel token).
- For Cloudflare Pages: a Cloudflare account, your Account ID, and a Cloudflare API token, select Pages Edit when creating the API token; custom domains need Zone Read / DNS Edit.
How to do it#
Step 1, Share a live preview link#
Run your app (Run app), then click Share in the toolbar. The Share web preview panel opens and creates a public link. While active it shows "Preview is live · Public". Open the link on any device.
Important: The share link is public while sharing is on, and it stops working when you click Stop sharing or stop the preview. Use it for testing, not as your published site.
Step 2, Open the page you want to publish#
For a permanent URL, open the HTML page you want to publish (for example your project's landing page) in the file viewer, and open its Share menu.
Tip: The share-link option in this menu says "Publish online first to get a link" until you deploy, deploying is what creates the permanent public URL.
Step 3, Choose a provider#
Click Deploy. In the dialog, pick the Provider: Vercel or Cloudflare Pages. The subtitle reads "Use the selected provider account to deploy this HTML preview."
Step 4, Enter your provider credentials#
For Vercel:
- Paste your Vercel token (use the Get Vercel token link if you don't have one). A saved token is reused, "Saved token will be used. Enter a new token to replace it."
- Team ID and Team slug are optional.
For Cloudflare Pages:
- Paste your Cloudflare API token (use the Get API token link).
- Enter your Account ID (find the account ID in the Cloudflare dashboard).
- Optional: pick a Domain and a Subdomain prefix to bind a custom domain. Leaving this blank still creates a pages.dev link.
Step 5, Deploy and grab the link#
Click the Deploy to \<provider\> button. The status moves through "Deploying…" and "Preparing public link…", then shows the Deployed URL with a Ready badge. Click Copy link and share it anywhere.
Success: A toast confirms "Deployment uploaded successfully" with the provider and URL.
Step 6, Update the live site later#
Changed the page? Open the same dialog and click Redeploy (shown as Redeploy to \<provider\>). The saved token and settings are reused, so updating takes one click.
Which option should I use?#
| Share preview link | Vercel | Cloudflare Pages | |
|---|---|---|---|
| Best for | Quick device tests, demos | Permanent page hosting | Permanent page hosting + custom domains |
| Lifetime | Only while sharing is on | Permanent until you remove it | Permanent until you remove it |
| URL | Temporary public link | Vercel preview URL | *.pages.dev link, optional custom domain |
| Needs an account | No | Yes (token) | Yes (API token + Account ID) |
| Custom domain | No | , (deploys are Preview-only for now) | Yes, Domain + Subdomain prefix |
Troubleshooting#
Problem: The deployed Vercel link asks visitors to log in. Possible causes: Vercel's Deployment Protection is enabled on your account/team. Solution:
- The dialog labels this "Deployment protection enabled", your site deployed, but the preview link requires authentication.
- Disable Deployment Protection in your Vercel project settings, or use a custom domain.
Problem: The site deployed but the public link isn't ready. Possible causes: The provider is still provisioning the URL. Solution:
- The dialog shows "Public link pending", "Your site is deployed. The public link is still being prepared."
- Wait a moment, then click Retry now.
Problem: The deploy fails immediately. Possible causes: Wrong or expired token; missing Account ID (Cloudflare); token missing the Pages Edit permission. Solution:
- Re-create the token from the Get API token / Get Vercel token link and paste it again.
- For Cloudflare, confirm the Account ID and that the token has Pages Edit (plus Zone Read / DNS Edit for custom domains).
Problem: My share preview link stopped working. Possible causes: Sharing was stopped, or the preview itself was stopped. Solution:
- Run the app again and click Share to create a fresh link.
FAQ#
Is the share preview link the same as deploying? No. The share link is a live tunnel to your running preview, it disappears when you stop. Deploying uploads the page to a hosting provider and gives you a permanent URL.
Which pages can I publish this way? HTML pages in your project, for example the landing page companion you can add when creating a project. The Flutter mobile app itself goes to the app stores via the Deploy wizard.
Do Vercel and Cloudflare cost money? Both have free tiers that comfortably cover a landing page. You create the account and token yourself, so hosting stays under your control.
Can I use my own domain? With Cloudflare Pages, yes, pick a Domain from your Cloudflare account and set a Subdomain prefix; the dialog previews the final hostname. Vercel deploys are Preview-only for now.
Where do I see all my deployments? Reopen the Deploy dialog on the file, previous deployment URLs are listed with their status (Ready, Public link pending, and so on), each with a Copy link button.