Close Menu
GeekBlog

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Quantum Immortality Is Going Viral as “the Most Horrifying Idea Ever.” Here’s Why Physicists Aren’t Losing Sleep.

    November 18, 2026

    Huawei Watch Air Leaks at 6.9mm: A Titanium Smartwatch Thinner Than a Fitness Band, With a 5-Day Battery

    November 18, 2026

    Grindr’s $120-a-Month Edge Tier Uses AI to Guess Who Will Reply. Its CEO Says Not Everyone Should Buy It.

    November 18, 2026
    Facebook
    GeekBlog
    • Home
    • Mobile
    • Tech News
    • Blog
    • Gaming
    • Smartwatch
    • How-To Guides
    • AI & Software
    Facebook
    GeekBlog
    Home»Blog»How to Deploy Gatsby on Liquid Web (2026 Guide)
    Blog

    How to Deploy Gatsby on Liquid Web (2026 Guide)

    Ethan CaldwellBy Ethan CaldwellSeptember 23, 202611 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    Close up of a computer screen showing colorful JavaScript code, illustrating a Gatsby site build before deployment
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link

    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.

    Quick answer: Build with Node 24 on your laptop or in GitHub Actions, then 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: true are rendered on the first request. The Gatsby rendering docs say DSG requires keeping the build server running with gatsby serve.
    • SSR: pages that export getServerData render 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 Node

    Choose 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 optionWhat you getBest Gatsby fit
    Managed VPS with cPanelLiquid Web maintains the OS and panel, Apache serves sites, AutoSSL handles certificatesStatic sites alongside WordPress or email on the same server
    Self managed VPSRaw OS with root access, no help with configuration or patchingNginx setups and SSR or DSG sites under PM2
    Dedicated or Cloud DedicatedSingle tenant hardware, managed or self managedGatsby 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 files
    Tip: Anything in your project’s static/ 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

    Recommended for you:

    Best State to Start an LLC: Michigan or Ohio?
    Blog·Sep 23, 2026

    Best State to Start an LLC: Michigan or Ohio?

    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.com

    Create /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-run
    Warning: Let’s Encrypt stopped sending expiry reminder emails in 2025 and plans to shorten default certificate lifetimes in 2027 and again in 2028. Automatic renewal is not optional, so make sure the dry run passes.

    Automate 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 build

    Describe 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 prints

    gatsby 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-data JSON is being cached. Run curl -I https://example.com/ and confirm max-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 run sudo 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=4096 on a larger server.
    • Links break on refresh. Gatsby 5 defaults to trailing slashes. Keep try_files $uri $uri/ =404; so /about redirects to /about/, and avoid rewrite rules that strip slashes.

    Recommended for you:

    Connecticut or Oklahoma: Which State Is Better to Live In?
    Blog·Sep 23, 2026

    Connecticut or Oklahoma: Which State Is Better to Live In?

    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.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email Copy Link
    Previous ArticleBest State to Start an LLC: Michigan or Ohio?
    Next Article Google Makes It Easier for European Users to Choose: What Changed
    Ethan Caldwell

      Ethan Caldwell is GeekBlog's resident Apple specialist, covering the entire Apple ecosystem: iPhone, iPad, Mac, Apple Watch, AirPods and the software that ties them together. A longtime iOS user and gadget collector, Ethan tracks Cupertino's every move, breaking down Apple keynotes, A- and M-series chip benchmarks, iOS feature updates and the rumor mill into clear, practical takes that help readers decide whether the latest Apple hardware is worth the upgrade.

      Related Posts

      10 Mins Read

      Google Ads Keyword Planner: How It Shows the Most Relevant Keywords

      11 Mins Read

      How to Use Remarketing Techniques for Better Conversions

      11 Mins Read

      How to Conduct A/B Testing for Marketing Campaigns

      10 Mins Read

      AMP for WP Plugin Vulnerability: What Was Fixed and What to Do

      11 Mins Read

      How to Create a Facebook Business Page in 2026

      11 Mins Read

      How to Convert GMT Time to Other Time Zones in C++

      Top Posts

      Every iPhone Camera Ranked in 2026 (Best to Worst)

      July 6, 2026340 Views

      Best Browser for Android in 2026: Top Picks Ranked

      July 7, 2026201 Views

      Apple Watch Black Friday 2026: Early Deals, Prices to Beat and When to Buy

      November 8, 2026169 Views
      Stay In Touch
      • Facebook

      Subscribe to Updates

      Get the latest tech news from FooBar about tech, design and biz.

      Most Popular

      Apple Told Its Stores Not to Expect iPhone Duo Walk-Ins. Carriers Can Beat January by Weeks.

      October 20, 2026286 Views

      Apple Watch Black Friday 2026: Early Deals, Prices to Beat and When to Buy

      November 8, 2026268 Views

      One UI 9 Watch: Which Galaxy Watches Get Wear OS 7, and Who Gets Left Behind

      November 6, 2026170 Views
      Our Picks

      Quantum Immortality Is Going Viral as “the Most Horrifying Idea Ever.” Here’s Why Physicists Aren’t Losing Sleep.

      November 18, 2026

      Huawei Watch Air Leaks at 6.9mm: A Titanium Smartwatch Thinner Than a Fitness Band, With a 5-Day Battery

      November 18, 2026

      Grindr’s $120-a-Month Edge Tier Uses AI to Guess Who Will Reply. Its CEO Says Not Everyone Should Buy It.

      November 18, 2026

      Subscribe to Updates

      Get the latest creative news from FooBar about art, design and business.

      HEICJPG.online - Convert HEIC to JPG online
      Facebook
      • About GeekBlog: Our Mission, Team and Editorial Standards
      • Contact us
      • Privacy Policy
      • Disclaimer
      • Terms and Conditions
      • Editorial Policy
      • Cookie Policy
      • Your Privacy Choices
      © 2026 GeekBlog

      Type above and press Enter to search. Press Esc to cancel.