> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/node.js/overview-1/gatsby.md).

# Gatsby

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`

```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](/node.js/environment-variables.md).

***

*Last updated: July 22, 2026*
