Host your Flutter Web App in 10 Minutes using GitHub Pages (Free)

Manuel Reinfurt
2 min readMay 31, 2020

--

Are you looking for an easy way to host your Flutter Web App online? With GitHub Pages you can host any static website (including your Flutter Web App) in a matter of minutes. And best of all: It’s free.

Step 1: Set up the repository

First, you will need to create a new repository for your project on GitHub. We’ll name it flutter_appname and make it public.

Note:
If you use GitHub for free, then only public repositories are able to host websites.
If you need a private repository, you’ll have to subscribe to GitHub.

Creating a new repository

Step 2: Commit & Push your Flutter Web App

Now you’re ready to push your Flutter Web App into the repository. Make sure to successfully run flutter build web as described in the Flutter Documentation.

Clone the repository (get GitHub Desktop if you’re not too familiar with Git). Then just put the contents of your build/web/ directory into the root of your repository and push it.

Step 3: Configure GitHub Pages

Go to the settings of your repository on the GitHub page. Scroll down to “GitHub Pages” and make sure to select the “master-branch”.

Select master branch as source

Step 4: Use your Flutter Web App

You’ve already done all of the work. Your Flutter Web App can now be accessed by going to https://flutter_appname.github-username.io.

If you have any questions, feel free to reach out to me!

Additional info

There’s still a bit of configuration options with GitHub Pages. For example, you can easily add a custom domain to have your Flutter Web App accessible on https://yourdomain.com.

Feel free to check out the GitHub settings as well as the GitHub Pages documentation.

GitHub Pages settings for your repository

--

--

Manuel Reinfurt
Manuel Reinfurt

Written by Manuel Reinfurt

Freelancer for Cloud (Native) Architecture & Development (mostly Azure/C#)

No responses yet