To deploy Gatsby on Liquid Web, run gatsby build, copy the finished public/ folder to a Liquid Web VPS or dedicated server, and let Nginx or Apache serve it as plain files with the right cache headers and a free TLS certificate. That covers the vast majority of Gatsby sites. Only pages that use Deferred Static Generation, server side rendering or Gatsby Functions need a running Node process, and that is a separate, slightly longer setup covered near the end.
rsync the public/ directory to public_html on a cPanel managed VPS or to /var/www/example.com/public on a self managed VPS running Nginx. Add long cache headers for hashed JS, CSS and /static/ files, no caching for HTML and /page-data/, and issue TLS with AutoSSL (cPanel) or certbot (Nginx). For SSR or DSG pages, run gatsby serve under PM2 on port 9000 and proxy to it from Nginx.Liquid Web does not sell a Gatsby product or a static site host, so you are working with a normal Linux server. That is good news: a static Gatsby build is the easiest thing a web server can deliver, and you keep full control over headers, redirects and TLS. The steps below cover both common Liquid Web setups, the managed server with cPanel and the bare self managed server.
Gatsby in 2026: what you are deploying
The current release is Gatsby 5.16.1, published in February 2026. Version 5.16 added official support for React 19 and Node.js 24, and the package declares support for Node 18 up to, but not including, Node 26. Node 20 reached end of life on April 30, 2026, so Node 24 LTS is the sensible build runtime today, with Node 22 as the fallback.
Be clear eyed about the project itself. Netlify acquired Gatsby Inc. in February 2023, and development has slowed a lot since then: 5.15 shipped in August 2025 and 5.16 followed five months later. Existing sites keep building and security fixes still land, but new investment is going elsewhere. Pin your Node version, commit your lockfile, and treat old community plugins with suspicion.
Gatsby also has three rendering modes, and they decide your hosting shape:
- SSG (the default): every page is written to
public/at build time. Any web server can host it. - DSG: pages created with
defer: trueare rendered on the first request. The Gatsby rendering docs say DSG requires keeping the build server running withgatsby serve. - SSR: pages that export
getServerDatarender on every request and also need that Node process.
# No output means a purely static site
grep -rn "getServerData\|defer: true" src/ gatsby-node.*
ls src/api 2>/dev/null # Gatsby Functions also need NodeChoose the right Liquid Web server
Liquid Web currently sells VPS hosting and dedicated servers in managed and self managed versions, plus Cloud Dedicated bare metal. Linux images include AlmaLinux and Ubuntu, and cPanel, Plesk or InterWorx can be added depending on plan size. Check the current specs on the Liquid Web VPS page, since promotional pricing changes often.
| Liquid Web option | What you get | Best Gatsby fit |
|---|---|---|
| Managed VPS with cPanel | Liquid Web maintains the OS and panel, Apache serves sites, AutoSSL handles certificates | Static sites alongside WordPress or email on the same server |
| Self managed VPS | Raw OS with root access, no help with configuration or patching | Nginx setups and SSR or DSG sites under PM2 |
| Dedicated or Cloud Dedicated | Single tenant hardware, managed or self managed | Gatsby sharing a box with a heavy CMS, API or database |
For a static site, the smallest VPS is plenty, because serving files costs almost nothing. The expensive part of Gatsby is the build, and that belongs on your laptop or in CI rather than on a small server.
Build the site locally or in CI
nvm install 24 && nvm use 24
npm ci
npx gatsby build
ls public/ # index.html, 404.html, page-data/, static/, hashed .js filesstatic/ folder is copied into public/ on every build. Put your Apache .htaccess there and it ships with each deploy instead of being wiped by rsync --delete.Path A: Apache and cPanel on a managed VPS
Ask Liquid Web support to enable SSH for your cPanel user, or do it yourself in WHM under Manage Shell Access. Then push the build straight into the account’s document root, excluding the folders cPanel owns:
rsync -az --delete --exclude='.well-known' --exclude='cgi-bin' \
public/ cpuser@your-server-ip:public_html/Save this as static/.htaccess in the Gatsby project. It follows the official Gatsby caching guidance: HTML, page data and the service worker always revalidate, while hashed assets are cached for a year.
ErrorDocument 404 /404.html
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/\.well-known/
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<IfModule mod_headers.c>
<FilesMatch "\.(js|css)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
<FilesMatch "\.(html|json)$">
Header set Cache-Control "public, max-age=0, must-revalidate"
</FilesMatch>
<Files "sw.js">
Header set Cache-Control "public, max-age=0, must-revalidate"
</Files>
<If "%{REQUEST_URI} =~ m#^/static/#">
Header set Cache-Control "public, max-age=31536000, immutable"
</If>
</IfModule>For HTTPS, cPanel’s AutoSSL issues and renews the certificate on its own. Confirm it in cPanel under Security, SSL/TLS Status, and click Run AutoSSL if the domain is new.
Path B: Nginx on a self managed VPS
On a self managed server you own the whole stack. Install Nginx, open the web ports and create a directory owned by a deploy user:
# Ubuntu
sudo apt update && sudo apt install -y nginx rsync
sudo ufw allow OpenSSH && sudo ufw allow 'Nginx Full' && sudo ufw enable
# AlmaLinux
sudo dnf install -y nginx rsync
sudo firewall-cmd --permanent --add-service=http --add-service=https
sudo firewall-cmd --reload
# Both
sudo systemctl enable --now nginx
sudo adduser deploy
sudo mkdir -p /var/www/example.com/public
sudo chown -R deploy:deploy /var/www/example.comCreate /etc/nginx/conf.d/example.com.conf. The conf.d path is read by Nginx on both distributions:
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/example.com/public;
index index.html;
error_page 404 /404.html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
location / {
try_files $uri $uri/ =404;
}
# Must revalidate on every visit
location ~* \.html$ { add_header Cache-Control "public, max-age=0, must-revalidate"; }
location ^~ /page-data/ { add_header Cache-Control "public, max-age=0, must-revalidate"; }
location = /sw.js { add_header Cache-Control "public, max-age=0, must-revalidate"; }
# Content hashed, safe to cache for a year
location ^~ /static/ { add_header Cache-Control "public, max-age=31536000, immutable"; }
location ~* \.(?:js|css)$ { add_header Cache-Control "public, max-age=31536000, immutable"; }
}Test, reload, then add HTTPS with certbot. On Ubuntu the snap is the method Certbot recommends; on AlmaLinux, install certbot and python3-certbot-nginx from EPEL.
sudo nginx -t && sudo systemctl reload nginx
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/local/bin/certbot
sudo certbot --nginx -d example.com -d www.example.com
sudo certbot renew --dry-runAutomate deploys with GitHub Actions
Generate a key pair with ssh-keygen -t ed25519 -N "" -f deploy_key, append the public half to ~/.ssh/authorized_keys for the deploy user, and store three repository secrets: the private key, the output of ssh-keyscan your-server-ip, and the rsync target such as deploy@your-server-ip:/var/www/example.com/public/.
# .github/workflows/deploy.yml
name: Deploy to Liquid Web
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npx gatsby build
- name: Upload with rsync
env:
SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
TARGET: ${{ secrets.DEPLOY_TARGET }}
run: |
install -m 700 -d ~/.ssh
printf '%s\n' "$SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
printf '%s\n' "$KNOWN_HOSTS" > ~/.ssh/known_hosts
rsync -az --delete public/ "$TARGET"For the cPanel path, add the same two --exclude flags used earlier. The workflow is identical to the one in our Gatsby on Vultr guide, which is handy if you ever move providers.
When you need Node: SSR and DSG behind Nginx
The SSR and DSG engines are generated inside the project’s .cache directory during the build, so the Node process needs the full project, not just public/. The simplest reliable approach is to build on the server itself, so size the VPS for the build rather than for serving pages; 4 GB of memory is a sensible starting point. If Node on a fresh server is new to you, our walkthrough on installing Node.js on cloud hosting covers the basics.
# As the deploy user
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
source ~/.bashrc && nvm install 24 && npm install -g pm2
git clone git@github.com:you/site.git /var/www/example.com/app
cd /var/www/example.com/app && npm ci && npx gatsby buildDescribe the process in ecosystem.config.js, then start it and register PM2 with systemd:
module.exports = {
apps: [{
name: "gatsby-site",
cwd: "/var/www/example.com/app",
script: "node_modules/gatsby/cli.js",
args: "serve --host 127.0.0.1 --port 9000",
env: { NODE_ENV: "production" }
}]
};
pm2 start ecosystem.config.js
pm2 save
pm2 startup systemd # run the sudo command it printsgatsby serve has no HTTPS option, so Nginx terminates TLS and proxies everything to it. In the Path B server block, remove the root line and all the location blocks, then add this single proxy block so the Node process answers every request:
location / {
proxy_pass http://127.0.0.1:9000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Each deploy becomes git pull && npm ci && npx gatsby build && pm2 reload gatsby-site. On a cPanel server, the Application Manager (backed by Passenger) can host Node apps too, but cPanel’s documentation lists packages only up to Node 22, so check what your server offers first.
Troubleshooting
- Visitors see old content after a deploy. HTML or
page-dataJSON is being cached. Runcurl -I https://example.com/and confirmmax-age=0. A CDN in front may need a purge too. - 403 Forbidden on AlmaLinux. Files moved from a home directory keep the wrong SELinux label. Run
sudo restorecon -Rv /var/www/example.com. - 502 Bad Gateway on SSR pages. Check
pm2 logs gatsby-site. On AlmaLinux, SELinux also blocks Nginx from proxying until you runsudo setsebool -P httpd_can_network_connect 1. - Build killed or “JavaScript heap out of memory”. Image processing with sharp is memory hungry. Build in CI, or raise the limit with
NODE_OPTIONS=--max-old-space-size=4096on a larger server. - Links break on refresh. Gatsby 5 defaults to trailing slashes. Keep
try_files $uri $uri/ =404;so/aboutredirects to/about/, and avoid rewrite rules that strip slashes.
Frequently asked questions
Does Liquid Web support Gatsby?
Not as a dedicated product, but any Liquid Web VPS or dedicated server runs it. A static Gatsby build is just HTML, CSS, JavaScript and images, so Apache on a cPanel server or Nginx on a self managed server serves it without extra software. Only SSR, DSG or Functions need Node.js on the server.
Do I need Node.js on the Liquid Web server?
For a purely static site, no. Build on your laptop or in GitHub Actions and upload public/. You need Node on the server only when pages use getServerData, defer: true or the src/api folder, because those are handled by a running gatsby serve process.
Which Node version should I use for Gatsby in 2026?
Use Node 24 LTS. Gatsby 5.16 added official Node 24 support and its package declares Node 18 through 25 as compatible. Node 20 reached end of life in April 2026, and Node 26 falls outside the supported range, so avoid both for new builds.
Should I pick managed or self managed?
Pick managed with cPanel if the server also hosts WordPress, email or clients who want a panel, and you prefer Liquid Web handling patches. Pick self managed if you are comfortable running Linux and want Nginx, PM2 and your own firewall rules. Static Gatsby hosting works fine on either.
Is Gatsby still a good choice for a new site?
It still works, but development has slowed since Netlify bought the company in 2023. If you already run Gatsby, keep it and deploy it well. For a brand new project, compare actively developed static site generators first. The hosting steps in this guide apply to any of them, as our React on SiteGround walkthrough shows for Vite builds.
The bottom line
For most sites, deploying Gatsby on Liquid Web means building elsewhere, copying public/ with rsync, and getting cache headers and HTTPS right. A cPanel managed VPS handles that with one .htaccess file, and a self managed VPS does it with one Nginx server block.
Reach for the Node setup only if you really use SSR or DSG, and budget for a bigger server when you do. If you ever outgrow a single VPS, the same Node process moves cleanly to other providers, as in our guide to running Node.js on DigitalOcean.
About this article: GeekBlog covers U.S. technology news, AI, phones, smartwatches and gaming. Every story is written and checked under our Editorial Policy. Spotted a mistake or have a story tip? Contact our editors.

