How to deploy a Gatsby site for free, from its public folder
Quick answer
To deploy a Gatsby site for free, run gatsby build and drop the public folder it writes on Convika's upload screen. Convika serves it at its own address, such as my-site.convika.page, with every page at its own path, page-data loading as Gatsby expects, and your 404 page for missing paths. No pathPrefix needed. Sign up free, with no credit card and no Git.
Free plan: no credit card, 5 published pages, 10,000 page views a month.
On this page
To deploy a Gatsby site for free, run gatsby build and drop the public folder it writes on Convika's upload screen. Convika serves the folder as a site at its own address, such as my-site.convika.page: /blog/first-post/ opens its own HTML file, the page-data JSON and the JavaScript chunks load from their own paths, and a missing page gets your 404.html. No Git, no server, and no credit card.
What to build, and the folder to drop
Gatsby renders every page to HTML at build time and writes everything the site needs to public. That folder is the whole site, and it is the only thing you upload.
| Your project | Build command | Folder to drop |
|---|---|---|
| Gatsby with npm | npm run build (runs gatsby build) | public |
| Gatsby CLI | gatsby build | public |
Drop public itself. The project folder around it holds static/ and .cache/, which the site doesn't need.
No pathPrefix needed
Your site opens at the root of its own address, so build without --prefix-paths and leave pathPrefix out of gatsby-config. Links from <Link to="/about/">, the images from gatsby-plugin-image, and the files in static/ keep the root paths Gatsby gives them. Set siteMetadata.siteUrl to your Convika address if your SEO component or sitemap reads it.
Deploy a Gatsby site in 5 steps
1. Build the site
In the project folder, run:
npm install
npm run build
Gatsby lists the build steps and ends with "Done building" and the seconds it took.
2. Sign up free
Sign up free, with no credit card. Convika opens the upload screen, Put your page or file online.
3. Drop the public folder
Drop public on Drop a file or folder here, or click Choose a folder. A .zip of the folder works too. Convika reads it in your browser and shows "Uploads as a site" with the number of files. Under Site URL, Convika offers a free name such as my-site.convika.page; type another to check it. Click Create my preview.
4. Check the private preview
Convika uploads the files and opens a private preview of the whole site. Click from page to page, reload a post, and try a path that doesn't exist, on your computer and your phone.
5. Publish it
Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, Convika shows Publish free, and under it Publish without the Convika bar, which starts Pro with its free trial: 7 days free, then $12 a month, cancel any time before it ends. To publish on Free, click Publish free. The site is live at my-site.convika.page.
Every page at its own path
Gatsby writes each page to a folder with an index.html, such as public/blog/first-post/index.html. Convika answers /blog/first-post/ with that file, and /blog/first-post gets the slash added first. When a reader clicks a link, Gatsby fetches /page-data/blog/first-post/page-data.json, and Convika serves it as JSON from its own path, so the next page appears without a full reload.
A path the site doesn't have gets the 404.html Gatsby builds from src/pages/404.js, with a 404 status.
Update the site at the same address
Run npm run build again. In Convika, open the site's page screen. Under Update from an HTML file, click Upload a new version and drop the new public folder, or its .zip. Click Upload as a new version, open the preview, then click Publish v2 at the same link and confirm with Publish. The address stays the same, and each earlier version keeps its own files, so you can go back to one.
What Free includes, and what Pro adds
| Free | Pro | |
|---|---|---|
| Price | No credit card | 7 days free, then $12 a month |
| Sites live at once | 5 | 100 |
| Page views a month | 10,000 | 100,000 |
| A site's files together | 100 MB | 5 GB |
| Each HTML page | 4 MB | 4 MB |
| Who can open it | Public | Public, Private link, or Only people with the password |
| Convika bar | On each page | None |
A password or a private link covers every path of the site. Every page counts its visitors in your dashboard: where they came from and what they clicked.
Frequently asked questions
How do I deploy a Gatsby site for free?
Run gatsby build, then sign up free on Convika and drop the public folder on the upload screen. Click Create my preview, and publish with Publish page, Public, Next, and Publish free. The Free plan needs no credit card.
Which folder do I upload?
public, the folder gatsby build writes. It holds every page's HTML, page-data, and the JavaScript.
Do I need pathPrefix?
No. The site opens at the root of <name>.convika.page, so build without --prefix-paths.
Does my Gatsby 404 page work?
Yes. A path the site doesn't have gets public/404.html with a 404 status.
Do I need Git or GitHub?
No. Drop the folder or a .zip straight from your computer. Nothing to push, and no build pipeline to set up.
How large can a Gatsby site be?
Each HTML page up to 4 MB, and all of the site's files together up to 100 MB on Free, or 5 GB on Pro.
Next step
How to password protect an HTML page or website
A JavaScript password sits in the page source. Free: StatiCrypt or .htaccess. Paid: Netlify Pro $20, Vercel $20 a project, Tiiny Host $18, or Convika Pro.
Related articles
- How to deploy a Next.js static export for free, from the out folderDeploy a Next.js static export free: set output: 'export', run next build, drop the out folder on Convika, and get a live site at its own address. No card.
- How to deploy a Docusaurus site for free, from its build folderDeploy a Docusaurus site free: run npm run build, drop the build folder on Convika, and get live docs at their own address with baseUrl '/'. No Git, no card.
- How to deploy an Astro site for free, from its dist folderDeploy an Astro site free: run npm run build, drop the dist folder on Convika, and get a live site at its own address. Every page at its path, no Git, no card.
- How to deploy a Hugo site for free, from its public folderDeploy a Hugo site free: run hugo, drop the public folder on Convika, and get a live site at its own address. Every page at its path, your 404 page, no Git.
- How to deploy a React app for free, from Vite or Create React AppDeploy a React app free: run npm run build, drop the dist or build folder on Convika, and get a live link. No Git, no card. Routing and image settings inside.
- ZIP to website: upload a .zip file and get a link that opens as a pageDrop a .zip with index.html, CSS, JavaScript, and images here and get a link in seconds, free. A whole site or a built app goes up as a site at its own address.
Skipbox
Cheap & fast GitHub Actions runners, unlimited for $39 a month
Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.
Start a free Skipbox trial