Docs / Programming & Development / How to Deploy a Jekyll Static Site on a VPS

How to Deploy a Jekyll Static Site on a VPS

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 24 views · 1 min read

What Is Jekyll?

Jekyll is a static site generator written in Ruby. It transforms Markdown and Liquid templates into complete websites. Hosting Jekyll output on your Breeze gives you full control without relying on third-party hosting platforms.

Prerequisites

  • A Breeze running Ubuntu 22.04 or later
  • Nginx installed
  • Ruby 3.0+ installed

Step 1: Install Ruby and Jekyll

sudo apt update
sudo apt install ruby-full build-essential zlib1g-dev
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
gem install jekyll bundler

Step 2: Build the Site

cd /var/www/jekyll-site
bundle install
JEKYLL_ENV=production bundle exec jekyll build

This outputs the site to the _site/ directory.

Step 3: Configure Nginx

server {
    listen 80;
    server_name yourdomain.com;
    root /var/www/jekyll-site/_site;
    index index.html;

    location / {
        try_files $uri $uri/ $uri.html =404;
    }

    error_page 404 /404.html;
}
sudo ln -s /etc/nginx/sites-available/jekyll /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx

Step 4: Enable SSL

sudo certbot --nginx -d yourdomain.com

Deployment Script

#!/bin/bash
cd /var/www/jekyll-site
git pull origin main
bundle install
JEKYLL_ENV=production bundle exec jekyll build

Run this script manually or via a webhook to deploy updates to your Breeze automatically.

Was this article helpful?