# Static site hosting

Host a static site from any generator, or written by hand: one command or a drop deploys it, only changed files upload, and HTTPS is on. Free to try.

On the web at https://lobsite.com/hosting/static-sites

```sh
npx lobsite
```

Run it in the project: the build folder (dist, build, out, _site or public) is found for you.

A static site is a folder of HTML, CSS, JavaScript and images that any browser can open as it is: nothing runs on a server when someone visits. That makes it fast and cheap to host, and Lobsite is built for exactly that. Drop the folder in the box above, or run `npx lobsite` in your project, and the site is live at a `*.lobsite.app` address with HTTPS.

## How it works

1. **Build the site**, if it has a build step. Lobsite hosts what your generator outputs; it doesn't run the build for you.
2. **Deploy the folder.** Run `npx lobsite` in the project, or drop the built folder or a `.zip` of it on the box above. The first deploy works without an account and lasts 6 hours.
3. **Keep it.** Follow the claim link (or press **Keep it free →** here) to move the site into a free account. The address stays the same and the site stops expiring.

## Any generator, or none

Lobsite doesn't care how the files were made. `npx lobsite` looks for the usual build folders and deploys the first one it finds:

| Tool | Folder it deploys |
|---|---|
| Vite, Astro, Vue, Svelte (static) | `dist/` |
| Create React App, Docusaurus | `build/` |
| Next.js (`output: "export"`) | `out/` |
| Jekyll, Eleventy | `_site/` |
| Hugo, Gatsby | `public/` |

A hand-written site works too: run the command in the folder that holds `index.html`, or name the folder, as in `npx lobsite ./site`. The choice is saved in `lobsite.toml`, so the next run deploys the same folder to the same site.

## Deploys that stay fast as the site grows

Every file is stored by its hash. When you deploy again, Lobsite compares hashes first and uploads only the files that changed, so fixing a typo on one page sends one file, not the whole site. Every deploy also gets its own URL: `lobsite deploy --preview` publishes a version to check without touching the live site, and `lobsite rollback` switches back to an earlier deploy in one step, with nothing uploaded again.

## What a static site can still do

No server doesn't mean no features. Redirects and response headers live in `lobsite.toml` and travel with each deploy, so a rollback restores them too; the [Redirect Generator](https://lobsite.com/tools/redirect-generator) writes the rules for you. HTML forms that post to `/_lobsite/forms/<name>` collect submissions with spam filtering once the site is in an account; see [forms](https://lobsite.com/features/forms). Anything that needs your own code on a server, such as logins or a database, isn't something Lobsite runs.

## Static hosts compared

| | Lobsite | GitHub Pages | Netlify | Cloudflare Pages |
|---|---|---|---|---|
| Account before the first deploy | No: live for 6 hours, then keep it free | Yes, and a repository | Only for drops, claimed within the window | Yes |
| Deploy | One command or a drop | Push to a repository | Git, CLI or a drop | Git, CLI or upload |
| Builds on the server | No: you upload the built folder | Jekyll, or GitHub Actions | Yes | Yes |
| Only changed files upload | Yes | Through Git | Yes | Yes |
| Forms | Yes, once the site is in an account | No | Yes | No |
| Custom domain | Yes, free | Yes, free | Yes, free | Yes, free |

If you want builds from Git, GitHub Pages, Netlify and Cloudflare Pages all do that well. Lobsite is the quickest way from a folder to a link, from a terminal, a browser or an AI agent, with nothing to set up first.

## Frequently asked questions

### What counts as a static site?

Any site whose pages are plain files: HTML, CSS, JavaScript, images and fonts, usually made by a generator like Astro, Hugo or Jekyll. If it needs a server process (PHP, Node, a database) to answer each request, it isn't static.

### Do you run my build command?

No. Build on your machine or in CI, then deploy the output folder. That keeps deploys fast and means what you tested locally is exactly what goes live.

### Can I have my own 404 page?

Yes. Put a `404.html` at the top of the site and it's shown, with a 404 status, for any address that doesn't exist. Without one, Lobsite shows a plain "Not found" page.

### How many static sites can I host for free?

A free account keeps one site, with up to 1,000 files and 10 GB of bandwidth a month. Sites published without an account are free too but last 6 hours. The paid plan, coming soon, holds five sites.

