Skip to content

Static site hosting

Static site hosting.

Have an index.html? Push it to GitHub or GitLab, or deploy the folder with the CLI. Lahyer serves it from a global edge with HTTPS, a live URL in about a minute and previews for every pull request.

Deploy your project
No buildAn index.html is enough
HTTPSOn your live URL and your domains
lahyer.jsonRedirects and response headers

What Lahyer does with it

How Static site builds and runs.

Lahyer fills these in from your repository. Change anything that does not fit in the project's build settings.

How Lahyer builds and runs Static site
Detected fromAn index.html with no package.json, or a package.json without a build script
BuildNone. With a build script, set the output directory it writes to
OutputYour files, served as they are
Redirects and headersA lahyer.json file in the project root
SourcesGitHub, GitLab, the CLI or a zip upload

Your first deploy

Three steps
to a live URL.

Bring your files.

Connect a repository, upload a zip, or run lahyer deploy in the folder with the CLI.

Add redirects if you need them.

A lahyer.json file in the project root sets redirects and response headers. Lahyer reads it on every deploy and reports problems in the build log.

Connect your domain.

Add a domain you own, or buy one in Lahyer. HTTPS is managed for you.

A few useful answers

Before you begin.

Do I need a package.json?

No. A folder with an index.html is served as it is.

How do redirects work?

Add a lahyer.json with redirects, for example { "source": "/blog/:slug", "destination": "/posts/:slug", "permanent": true }, and headers rules for response headers.

Is static hosting free?

Static sites fit within the Free plan: 5 projects, 100 GB of data out and 1,000,000 requests a month, with no card.