Deploying Flutter on Zeabur

Flutter (opens in a new tab) is an open-source UI software development kit developed by Google, used for building cross-platform mobile applications.

This article will assist you in deploying a Flutter website on Zeabur.

Step One: Create a Flutter Project

Method 1: Create a project using the flutter create command

Please install Flutter first according to the Flutter official documentation (opens in a new tab).

You can enter the command below to check if Flutter is properly installed.

flutter doctor

If you see all the check items are green, congratulations, you have successfully installed Flutter.

Next, use the flutter create command to create a new Flutter project.

flutter create myapp
cd myapp
flutter run -d chrome

Method 2: Create a project using a template

We have prepared a template for you to help you get started with your Flutter project quickly: zeabur/flutter-template (opens in a new tab).

You can click the Use this template button on the GitHub page to use the template.

Step Two: Deploy to Zeabur

Method 1: Using Zeabur CLI

First, make sure you have installed the Zeabur CLI according to the Zeabur CLI deployment guide.

Then, in your newly initialized Flutter project, add the files that are not yet committed to version control to Git.

git init
git add -A
git commit -m "Initial commit"

Next, deploy your service using the command below.

zeabur

Method 2: Using Zeabur Dashboard

Go to the Zeabur Dashboard (opens in a new tab) and create a new project.

Then, click the Deploy New Service button, and choose to deploy from GitHub.

💡

If this is your first time deploying a project on Zeabur from GitHub, you will need to configure and install the GitHub App first. You can find a more detailed guide here.

After you select the repository and branch, Zeabur will automatically start building your service.

Zeabur will automatically detect that your service is built with Flutter, so you do not need to do any additional configuration. Your deployment will be completed within a few minutes.

Next Steps

After the deployment is complete, you will need to configure the domain for your Flutter website.

Open the "Domain" tab on the service page, then click "Generate Domain" or "Custom Domain".

For more information on how to bind a domain to your service, please refer to binding a domain.