For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gatsby

Deploy Gatsby static sites on Hostinger, including build script and public output directory settings, redeploys for CMS data, and GATSBY_ env variables.

React-based static site generator with a GraphQL data layer. Builds to static files that Hostinger serves directly — no server process.

app_type: gatsby

Static mode

Gatsby deploys on Hostinger as a static site.

package.json

{
  "scripts": {
    "develop": "gatsby develop",
    "build": "gatsby build",
    "serve": "gatsby serve"
  },
  "dependencies": {
    "gatsby": "^5.13.0",
    "react": "^18.3.0",
    "react-dom": "^18.3.0"
  }
}

hPanel settings

Field
Value

Application type

gatsby

Build script

build

Output directory

public

Entry file

Server mode

Not supported — Gatsby's SSR/DSG page modes need Gatsby's own hosting adapters. Pages using getServerData or Deferred Static Generation won't work; keep pages statically generated.

Notes

  • The output directory is public (not dist).

  • Data sourced at build time (CMS, APIs) is baked in — trigger a redeploy to refresh content.

  • Environment variables read in gatsby-config.js or prefixed GATSBY_ must be set before the build. See Environment Variables.


Last updated: July 22, 2026

Last updated

Was this helpful?