Gatsby builds your site into plain files in public/: HTML for every page, plus the JavaScript that makes navigation fast. Since Gatsby Cloud closed in 2023, many Gatsby sites have needed a new home. Lobsite hosts the built folder: run gatsby build, then npx lobsite, and the site is live at a *.lobsite.app address with HTTPS.
How it works
- Build the site with
npx gatsby build(ornpm run build). Gatsby writes it topublic/. - Run
npx lobsitein the project. It findspublic/and deploys it; in a Gatsby project that's the build output, while your own static files live instatic/. The first deploy needs no account and lasts 6 hours. - Keep it with the claim link, in a free account. After that, the same two commands update the same address.
gatsby-config settings
// gatsby-config.js
module.exports = {
siteMetadata: { siteUrl: "https://my-site.lobsite.app" },
};
siteMetadata.siteUrlis your full address.gatsby-plugin-sitemap, canonical links and feeds read it.pathPrefixisn't needed: the site is served from the top of its address. If you set it for GitHub Pages, build without--prefix-paths.gatsby cleanclears the cache andpublic/. Run it if a deploy shows pages you've removed.
What needs Gatsby's server features
Static pages, gatsby-plugin-image and data from GraphQL all work, because they're resolved during gatsby build. Three features need a server and don't run on Lobsite: Gatsby Functions (src/api), server-side rendering with getServerData, and Deferred Static Generation. Replace a function that handles a contact form with a form that posts to /_lobsite/forms/contact; see forms. Redirects made with createRedirect need a host plugin; on Lobsite, put them in lobsite.toml instead, with the Redirect Generator.
Files are stored by their hash. Redeploying an unchanged site uploads 0 bytes.
Preview before going live. Roll back in one click, redirects and all.
Every site gets a *.lobsite.app address with HTTPS from the first deploy.
Point a form at /_lobsite/forms/contact. Spam filtering included.
Redirects, headers and forms live in lobsite.toml and travel with each deploy.
A deploy without an account is live for 6 hours. The claim link keeps it, free.
Gatsby hosts compared
| Lobsite | Netlify | GitHub Pages | |
|---|---|---|---|
| Static Gatsby sites | Yes | Yes | Yes |
| Functions, SSR, DSG | No | Yes | No |
| Builds on the server | No: you deploy public/ |
Yes | In GitHub Actions |
| Only changed files upload | Yes | Yes | Through Git |
| Account before the first deploy | No: live 6 hours, then keep it free | Yes | Yes, and a repository |
| Forms without a backend | Yes, once the site is in an account | Yes | No |
| Custom domain | Yes, free | Yes | Yes |
Netlify, which took over Gatsby in 2023, runs its server features too. For a Gatsby site that's static, as most are, Lobsite deploys the built folder in one command, and Gatsby's hashed file names mean a rebuild uploads only the files that actually changed.
Frequently asked questions
Where can I host a Gatsby site now that Gatsby Cloud is gone?
Any static host serves a built Gatsby site. On Lobsite, run gatsby build and npx lobsite; the first deploy needs no account.
Why does npx lobsite deploy public/ for Gatsby?
Because Gatsby writes the built site to public/. Your own files to copy, such as favicon.ico, go in static/, and Gatsby copies them into public/ during the build.
Does gatsby-plugin-image work on a static host?
Yes. Images are resized during gatsby build and written to public/, so they're plain files by the time you deploy.
Will my Gatsby 404 page work?
Yes. src/pages/404.js builds 404.html, and Lobsite serves it with a 404 status for any address that doesn't exist.