
How to Publish Your Phaser Game in 2026: Free Hosting Compared
You just finished your first Phaser game with an AI assistant, and now you want a link you can share. In this guide you will learn why your local folder won’t run by double-clicking, how to build a clean dist/ folder with Vite, and which free host fits your game best.
How this guide was made: Desk research only: every figure was read from the vendors’ current official docs/pricing pages on 2026-10-05. No game was deployed to these hosts in this guide, no account was created, and no upload was performed.
Why Your Local File Won’t Run
Your game shows a blank screen because you opened it with file:// instead of http://. Phaser is an HTML5 2D game framework for browsers, so your assets need a real web server. Once you serve the same folder over http://, the exact same code starts working.
When you double-click index.html, your browser opens it with a file:// address. Browsers lock down file:// because every page is treated as its own local domain and filesystem access is restricted, so asset loading is blocked. The Phaser Getting Started tutorial calls this out directly.
This is the single most common “why is my game blank?” issue for beginners. Your JavaScript may be perfect, but images, audio, and JSON cannot load without http://. The fix is not to change your game code. You need to run a local server for testing and then upload your built game to a public-facing web server for sharing.
Build a dist/ Folder with the Official Vite Template
You need to turn your project folder into a clean dist/ folder you can upload anywhere. The official Phaser Vite template does this for you with three commands. Run them once, and you get a local test server plus a production build that works on any static host.
Start with the Phaser Vite template. Inside your project folder you run:
npm install
npm run dev
npm run build
npm run dev starts a local server at http://localhost:8080 so you can test over http:// instead of file://. npm run build creates a production build inside the dist folder. The key deployment rule is simple: upload ALL contents of the dist folder to a public-facing web server, not just index.html.
The template structure is predictable: index.html at the root, public/assets for static files, plus src/main.js, src/game/main.js, and src/game/scenes for your code. On build, static assets are copied to dist/assets. Note that the template includes a log.js call to gryzor.co. You can opt out with npm run dev-nolog / npm run build-nolog or by deleting log.js. The template targets Phaser 4.0.0 + Vite 6.3.1, while this site’s playable prototypes target Phaser 3.90.0 but use the identical build flow.
Free Host 1: itch.io
If you want the fastest playable link and you do not want to touch Git, start with itch.io. You upload a ZIP with index.html at the root and itch serves it from its CDN. It is built for games, so players get a familiar page with fullscreen and mobile options.
Per the itch.io HTML5 Creator Docs, you upload either a ZIP with index.html at the root or a single self-contained .html file. If your game uses more than one file, a ZIP is required. Your hard limits after extraction are: <= 1,000 individual files, filename + path <= 240 chars, total extracted content <= 500 MB, any single extracted file <= 200 MB, filenames UTF-8 and case-sensitive, with index.html as the entry point.
Hosting is served from itch.io’s CDN over HTTPS only with no exceptions, and external resources must also be HTTPS, with free certificates via Let’s Encrypt. You can choose “Embed in page” or “Click to launch in fullscreen.” Click to Play is ON by default. Enable “Mobile Friendly” or users see a warning. Payments for HTML5 games are donations only unless Kind of Game is set to Downloadable. For speed, the CDN auto-gzips html, js, css, svg, wasm, wav, glb, and pck. Brotli is detected by the .br filename extension only.
Free Host 2: GitHub Pages
If you already keep your game in a public GitHub repo, GitHub Pages gives you a clean, free project link with HTTPS. You push your dist/ files and GitHub serves them at yourname.github.io. It is ideal when you want your game to live next to your code and portfolio.
What is GitHub Pages explains that Pages is free for public repos, while private repos require Pro, Team, or Enterprise. There are two site types: a user or organization site at <owner>.github.io and a project site at <owner>.github.io/<repo>.
The GitHub Pages limits are strict but clear for small games: published site <= 1 GB, source repo recommended <= 1 GB, deployment timeout 10 minutes, soft bandwidth 100 GB/month, and soft 10 builds/hour unless you use a custom GitHub Actions workflow. You get a custom domain with HTTPS. Policy-wise, you cannot use it as free hosting for a commercial, e-commerce, or SaaS site or for sensitive transactions. A free game or portfolio is fine.
Free Host 3: Netlify
If you want automatic deploy previews for every change and simple drag-and-drop or Git deploys, Netlify Free is worth a look. You get a global CDN, custom domains with SSL, and one concurrent build. Just remember you are working inside a hard monthly credit budget that pauses your site.
The Netlify Pricing page lists Free at $0 forever, with a hard 300 credits/month limit. When credits run out, projects pause with “Site not available.” Per the Netlify credit details, exact costs are: production deploy = 15 credits each, bandwidth = 20 credits per GB, web requests = 2 credits per 10,000, and compute = 10 credits per GB-hour.
The practical upshot is that on Free, 300 credits is only about 20 production deploys if you ignore bandwidth. In real life, bandwidth is the budget that actually runs out first for a game with images and audio. The good news is that deploy previews and branch deploys cost 0 credits. Your plan still includes custom domains with SSL, a global CDN, and 1 concurrent build.
Free Host 4: Cloudflare Pages
If you plan to ship many small games or rebuild often, Cloudflare Pages Free gives you room to breathe with 500 builds a month and no bandwidth cap listed. You connect a repo or upload your dist/, and Cloudflare serves it globally. Just keep every single file under 25 MiB.
Per the Cloudflare Pages limits, Free gives you 500 builds/month, 1 concurrent build, build timeout 20 minutes, up to 20,000 files per site, max single file 25 MiB, 100 custom domains per project, and 100 projects per account. Importantly, the Free limits page lists NO bandwidth cap.
The practical gotcha for you is file size. Any single file over 25 MiB — such as a large audio track or sprite-atlas asset — will break the deploy. Compress that one file or split it before you upload. Paid plans raise the file-count limit to 100,000 with an environment variable, but you do not need to push paid for a beginner game.
Compared: Four Free Hosts at a Glance
No single host wins for every Phaser beginner, because each free tier limits something different like total size, bandwidth, or build credits. Use this side-by-side table to match your game to the right sweet spot. All limits below were current as of 2026-10-05, so recheck official docs before you rely on them.
| Host | Free tier cost | Key limit | Bandwidth | Custom domain | Best for |
|---|---|---|---|---|---|
| itch.io | Free | ZIP extracted <= 500 MB total, <= 1,000 files, <= 200 MB per file, index.html at root | Served via itch.io CDN; no cap stated in official docs | No (hosted at yourname.itch.io) | Quickest playable link without Git |
| GitHub Pages | Free for public repos | Published site <= 1 GB; source repo recommended <= 1 GB; deploy timeout 10 min | Soft 100 GB/month | Yes, HTTPS | Project or portfolio hosting from a public repo |
| Netlify | $0 forever; 300 credits/month hard cap | 15 credits per production deploy; 20 credits per GB bandwidth; 2 credits per 10,000 requests | 300 credits/month total; bandwidth is the budget that runs out | Yes, HTTPS | Deploy previews and credit-budgeted sites |
| Cloudflare Pages | Free | 500 builds/month; 20,000 files/site; max single file 25 MiB; build timeout 20 min | No bandwidth cap listed | Yes, up to 100 custom domains/project | Many builds/files when each asset is under 25 MiB |
Your ZIP size, repo setup, expected traffic, and asset sizes point to different winners, and free tiers can change, so recheck current limits before you depend on them long-term.
Which Should You Pick?
You do not need to compare every feature to ship your first game, you just need a clear starting rule. Match your situation below to get a first choice you can act on today. You can always move your same dist/ folder to a different host later without rebuilding your game.
If you want the fastest playable link with no Git and a ZIP under 500 MB total with index.html at the root, pick itch.io. You skip the command line and get a player-ready page.
If you already use GitHub and your game is in a public repo under 1 GB, pick GitHub Pages for a clean portfolio or project link at <owner>.github.io/<repo>.
If you want deploy previews and you are comfortable with a hard credit budget, pick Netlify Free, but remember bandwidth is the real cap and you should not expect unlimited traffic.
If you have many projects or frequent builds and every single file is under 25 MiB, Cloudflare Pages is often the most generous, with no bandwidth cap listed and 500 builds/month.
FAQ
These are the two questions almost every beginner asks right before publishing, plus one honorable mention for other hosts. The answers are short because the fixes are simple once you see the pattern. If your game runs locally with npm run dev but not by double-clicking, you are already on the right track.
Why does my game show a blank screen when I double-click index.html?
Because file:// blocks asset loading. Your browser treats each local page as its own local domain with a locked-down filesystem, so Phaser cannot load images or audio. Serve the same folder over http:// with npm run dev or upload your dist/ folder to a host, and the blank screen goes away.
Do I really have to upload the whole dist/ folder?
Yes. You must upload every file inside dist, not just index.html. Your game needs its JavaScript bundles plus everything in dist/assets. If you skip one image or audio file, that part of the game will fail while the rest looks fine.
What about Vercel or GitLab Pages?
Both offer free static hosting and are fine honorable mentions. Vercel Hobby allows 100 deployments/day, 1 concurrent deployment, 45-minute build time, 100 MB static file uploads, and 15,000 source files per CLI deployment. See Vercel limits. GitLab Pages serves a public/ folder via .gitlab-ci.yml with automatic HTTPS and custom-domain support. See GitLab Pages.
Honest Scope and Method
You deserve to know exactly how this comparison was put together before you trust it with your game. This section states what was checked, what was not tested, and where to verify quotas yourself. Use it as your reminder to click through to the official docs before you ship.
Desk research only: every figure was read from the vendors’ current official docs/pricing pages on 2026-10-05. No game was deployed to these hosts in this guide, no account was created, and no upload was performed. Host limits in this post were current as of 2026-10-05. Before you ship anything that depends on a free-tier quota, please click through to the official sources linked above.
Your next step: run npm run build, then upload everything inside the dist/ folder to the host you picked above.