lobsite! Sign in Sign up

Astro hosting

Host a static Astro site: run astro build, then npx lobsite deploys dist/ and uploads only the files that changed. HTTPS, forms and previews included.

Builds the site, then deploys dist/. public/ is left alone: Astro copies it into dist/ for you.
Drop an HTML file, a folder or a .zip Checked in your browser; nothing is uploaded until you publish.

Astro builds a static site by default: every page becomes an HTML file in dist/, with only the JavaScript your islands need. That folder is all Lobsite needs. Run npm run build, then npx lobsite in the project, and the site is live at a *.lobsite.app address with HTTPS. You can also drop dist/ in the box above.

How it works

  1. Build the site with npm run build (that's astro build). The pages, images and scripts land in dist/.
  2. Run npx lobsite in the project. It deploys dist/, not public/, which Astro has already copied into the build. The first deploy needs no account and lasts 6 hours.
  3. Keep it with the claim link, in a free account. The folder is saved in lobsite.toml, so the next build deploys with the same npx lobsite.

Settings worth checking in astro.config.mjs

import { defineConfig } from "astro/config";

export default defineConfig({
  site: "https://my-site.lobsite.app",
  trailingSlash: "ignore",
});
  • site is your full address. Astro uses it for canonical URLs, Astro.site, and the sitemap from @astrojs/sitemap. Set it to your *.lobsite.app address, and change it when you move to your own domain.
  • base stays unset: the site is served from the top of its address, not a subfolder as on a GitHub Pages project site.
  • build.format can stay at its default. about/index.html opens at /about/, and an about.html file opens at /about.

What works, and what needs a server

Everything Astro renders at build time works: content collections, Markdown and MDX, astro:assets images (optimised during the build), and islands from React, Vue, Svelte or Solid, which run in the browser. Anything that runs per request doesn't: pages with export const prerender = false, output: "server", Astro Actions and API endpoints that aren't prerendered. Those need a server adapter, and Lobsite only serves files. For a contact form, point it at /_lobsite/forms/contact instead of an Astro Action; see forms.

Only changed files upload

Files are stored by their hash. Redeploying an unchanged site uploads 0 bytes.

Every deploy gets a URL

Preview before going live. Roll back in one click, redirects and all.

HTTPS everywhere

Every site gets a *.lobsite.app address with HTTPS from the first deploy.

Forms that just work

Point a form at /_lobsite/forms/contact. Spam filtering included.

Config in one file

Redirects, headers and forms live in lobsite.toml and travel with each deploy.

No account to try it

A deploy without an account is live for 6 hours. The claim link keeps it, free.

Astro hosts compared

Lobsite Netlify Vercel GitHub Pages
Static Astro sites Yes Yes Yes Yes, with Astro's GitHub Action
Server rendering (adapter) No Yes Yes No
Builds on the server No: you deploy dist/ Yes Yes In GitHub Actions
Account before the first deploy No: live 6 hours, then keep it free Yes Yes Yes, and a repository
Forms without a backend Yes, once the site is in an account Yes No No
Custom domain Yes, free Yes Yes Yes

If parts of your site render on request, choose a host with an Astro adapter. If the site is static, which is Astro's default, Lobsite deploys it in seconds from your machine, CI or an AI agent, and only the files a build changed are uploaded.

Frequently asked questions

Do I need an adapter to host Astro on Lobsite?

No. Adapters are for server rendering. A static Astro site, the default, needs no adapter: deploy the dist/ folder.

Why does npx lobsite deploy dist/ and not public/?

In an Astro project, public/ holds files the build copies as they are, such as favicon.svg. The built site is dist/. Lobsite sees astro in package.json and skips public/ for you.

Can I add a custom 404 page to my Astro site?

Yes. Create src/pages/404.astro; Astro builds it as 404.html, and Lobsite serves it with a 404 status for any address that doesn't exist.

Does Astro's image optimisation work?

Yes. astro:assets resizes and converts images during astro build, so the optimised files are already in dist/ when you deploy. Only on-demand image services that run per request need a server.

See also