Skip to content

Deploy a Gatsby site on OrbixPanel

Gatsby is a React-based static site generator. It builds to plain files, so on OrbixPanel it deploys as a static site — served directly by nginx, with nothing to keep running.

How it deploys

Gatsby’s build script runs gatsby build, producing a public/ folder of static files. OrbixPanel detects a Node project with a build script but no start script and treats it as static: it runs npm ci → npm run build and serves the output.

{ "scripts": { "build": "gatsby build" } }

Deploy

  1. Push to Git.
  2. Apps → Deploy from Git → repo + branch → Deploy.
  3. Add your domain and request SSL.

Build-time environment variables

Gatsby bakes environment variables in at build time. Client-side vars must be prefixed GATSBY_ (e.g. GATSBY_API_URL). Set them as environment variables before the build runs.

Anything in a static build is public — never put secrets in GATSBY_ vars or anywhere in the client bundle.

SPA routing

Gatsby handles client-side routing; for dynamic client-only routes make sure deep links fall back to the app shell (Gatsby’s build handles standard pages). See the SPA notes in static sites.

Performance

Static Gatsby is already fast; make it faster with optimized images and a CDN in front.

Troubleshooting

  • Build runs out of memory → large Gatsby builds are RAM-hungry; see disk & memory.
  • Env var not applied → it must be set before build and prefixed GATSBY_ for the browser.

Running OrbixPanel? Gatsby builds and deploys to fast static hosting from Git. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.