Hosting your Flutter web app on GitLab Pages

(GitLab, not GitHub)

Danielle H
5 min readMar 29, 2024

You’ve got a great Flutter web app, that does something and does it well. It doesn’t need a server, you just want to host it somewhere, for free, so that all the world can revel in its goodness. You hear that it can be done in GitLab — what a coincidence, the code is already in GitLab! So you’re ready to go, right?

…Right?

I’ve seen so. Many. Tutorials on how to host a Flutter web app on GitHub pages, but the few I found on GitLab were out of date (though they were still useful! Thanks especially to Igor Steblii).

So here it is: The step by step tutorial on how to host your app in GitLab.

  • Create your app and run it locally
  • Create the gitlab-ci file
  • Run pipeline to create your site

Check out the repo here and the live site here.

Create your app

If you don’t already have an app, create it. For the purpose of this tutorial, you can use the default Flutter app.

Run it on your computer, being sure to choose “Chrome” as your device. It will open the app in Chrome. Make sure that it…

--

--

Danielle H
Danielle H

Written by Danielle H

Physicist turned programmer, exploring many languages to build projects from neurobiology tools to abstract videos.