Guide

SSG Installation Guide

This document provides installation instructions for SSG on all supported platforms.

SSG ships as a single static binary of roughly 34 MB (release builds, stripped). Since v1.8.4 it embeds pure-Go SQL drivers (MySQL/MariaDB, PostgreSQL, SQLite) for external sources, which accounts for most of that size; no external libraries or runtimes are needed.

Table of Contents


Upgrading an existing install? See UPGRADING for the steps between your version and this one. Most releases are drop-in; the few that are not are listed there.

Quick Install

One-liner (Linux/macOS)

1curl -sSL https://raw.githubusercontent.com/spagu/ssg/main/install.sh | bash
2
3The installer downloads over HTTPS only and verifies the tarball's SHA-256
4against the release's `checksums.sha256` before anything is moved into place —
5a mismatch stops it before `sudo` is ever asked for. `SSG_VERSION` pins a
6release, `SSG_INSTALL_DIR` changes the target directory.

Linux - Debian/Ubuntu (DEB)

1# Add GPG key
2curl -fsSL https://github.com/spagu/ssg/releases/latest/download/ssg-apt.gpg | sudo gpg --dearmor -o /usr/share/keyrings/ssg-keyring.gpg
3
4# Add repository
5echo "deb [signed-by=/usr/share/keyrings/ssg-keyring.gpg] https://apt.ssg.dev stable main" | sudo tee /etc/apt/sources.list.d/ssg.list
6
7# Update and install
8sudo apt update
9sudo apt install ssg

Manual Download

 1# Pick the version you want — see all releases (incl. previous versions):
 2# https://github.com/spagu/ssg/releases
 3VERSION=1.8.61
 4
 5# AMD64 (x86_64)
 6wget https://github.com/spagu/ssg/releases/download/v${VERSION}/ssg_${VERSION}_amd64.deb
 7sudo dpkg -i ssg_${VERSION}_amd64.deb
 8
 9# ARM64 (aarch64)
10wget https://github.com/spagu/ssg/releases/download/v${VERSION}/ssg_${VERSION}_arm64.deb
11sudo dpkg -i ssg_${VERSION}_arm64.deb
12
13# Install dependencies if needed
14sudo apt install -f
1sudo apt install webp

Linux - Fedora/RHEL/CentOS (RPM)

Add Repository (Fedora/RHEL 8+)

 1# Add repository
 2sudo tee /etc/yum.repos.d/ssg.repo << 'EOF'
 3[ssg]
 4name=SSG Repository
 5baseurl=https://rpm.ssg.dev/stable/$basearch
 6enabled=1
 7gpgcheck=1
 8gpgkey=https://github.com/spagu/ssg/releases/latest/download/ssg-rpm.gpg
 9EOF
10
11# Install
12sudo dnf install ssg

Manual Download

 1# Pick the version you want — see all releases (incl. previous versions):
 2# https://github.com/spagu/ssg/releases
 3VERSION=1.8.61
 4
 5# AMD64 (x86_64)
 6wget https://github.com/spagu/ssg/releases/download/v${VERSION}/ssg-${VERSION}-1.x86_64.rpm
 7sudo rpm -i ssg-${VERSION}-1.x86_64.rpm
 8
 9# ARM64 (aarch64)
10wget https://github.com/spagu/ssg/releases/download/v${VERSION}/ssg-${VERSION}-1.aarch64.rpm
11sudo rpm -i ssg-${VERSION}-1.aarch64.rpm

Install WebP tools

1sudo dnf install libwebp-tools

Linux - Snap (Ubuntu)

On WSL, prefer the DEB package. The snap is strictly confined, so running it needs snapd to build a private mount namespace — something WSL's kernel does not always allow. The symptom is not an ssg error but a snapd one, before ssg starts at all:

cannot preserve mount namespace of process NNNNN as static-site-generator.mnt: Invalid argument
unexpected eof from helper process

It typically appears right after a snap refresh, when a namespace from the previous revision is left behind. Clear it and retry:

1sudo umount /run/snapd/ns/static-site-generator.mnt 2>/dev/null
2sudo rm -f /run/snapd/ns/static-site-generator.mnt
3sudo systemctl restart snapd.service

If it persists, wsl --shutdown from Windows clears every namespace at once. snapd also needs systemd, which WSL enables only with systemd=true under [boot] in /etc/wsl.conf. The DEB has none of these moving parts.

Install from Snap Store

1sudo snap install static-site-generator

Create short alias

1sudo snap alias static-site-generator ssg

Now you can use ssg instead of static-site-generator.


macOS - Homebrew

1# Add tap
2brew tap spagu/tap
3
4# Install
5brew install ssg

Or direct install

1brew install spagu/tap/ssg

Install WebP tools

1brew install webp

macOS - Binary

Download and Install

1# Apple Silicon (M1/M2/M3)
2curl -LO https://github.com/spagu/ssg/releases/latest/download/ssg-darwin-arm64.tar.gz
3tar -xzf ssg-darwin-arm64.tar.gz
4sudo mv ssg /usr/local/bin/
5
6# Intel
7curl -LO https://github.com/spagu/ssg/releases/latest/download/ssg-darwin-amd64.tar.gz
8tar -xzf ssg-darwin-amd64.tar.gz
9sudo mv ssg /usr/local/bin/

FreeBSD

Using pkg (when available)

1pkg install ssg

From Ports

1cd /usr/ports/www/ssg
2make install clean

Manual Download

1# AMD64
2fetch https://github.com/spagu/ssg/releases/latest/download/ssg-freebsd-amd64.tar.gz
3tar -xzf ssg-freebsd-amd64.tar.gz
4mv ssg /usr/local/bin/
5
6# ARM64
7fetch https://github.com/spagu/ssg/releases/latest/download/ssg-freebsd-arm64.tar.gz
8tar -xzf ssg-freebsd-arm64.tar.gz
9mv ssg /usr/local/bin/

OpenBSD

From Ports

1cd /usr/ports/www/ssg
2make install

Manual Download

1# AMD64
2ftp https://github.com/spagu/ssg/releases/latest/download/ssg-openbsd-amd64.tar.gz
3tar -xzf ssg-openbsd-amd64.tar.gz
4doas mv ssg /usr/local/bin/
5
6# ARM64
7ftp https://github.com/spagu/ssg/releases/latest/download/ssg-openbsd-arm64.tar.gz
8tar -xzf ssg-openbsd-arm64.tar.gz
9doas mv ssg /usr/local/bin/

Windows

Download and Install

  1. Download the latest release:

  2. Extract the ZIP file

  3. Add to PATH:

    1# PowerShell (run as Administrator)
    2$env:Path += ";C:\path\to\ssg"
    3[System.Environment]::SetEnvironmentVariable("Path", $env:Path, "Machine")
    

Using Scoop (Community)

1scoop install ssg

From Source

Requirements

  • Go 1.27.1 or later
  • Git

Build and Install

 1# Clone repository
 2git clone https://github.com/spagu/ssg.git
 3cd ssg
 4
 5# Build
 6go build -o ssg ./cmd/ssg
 7
 8# Install to /usr/local/bin
 9sudo mv ssg /usr/local/bin/
10
11# Or use make
12make build
13sudo make install

Verify Installation

After installation, verify SSG is working:

1# Check version
2ssg --version
3
4# Quick test
5mkdir -p test-site/{content/my-site,templates/simple}
6ssg my-site simple example.com --http --port=3000

Every build now names the binary that produced it on its first line, so a log read later answers "which ssg was this?" without anyone being asked to run --version separately:

🧱 ssg 1.8.48
🔄 Loading content...

--quiet suppresses it with everything else.


Staying up to date

1ssg self-update-check

It prints the running version, how this binary was installed, and whether a newer release exists:

🧱 ssg 1.8.30 (installed via snap)
🆕 A newer release is out: 1.8.48 (you have 1.8.30)
   https://github.com/spagu/ssg/releases/tag/v1.8.48
   Upgrade with:
     sudo snap refresh static-site-generator

The upgrade command is the one for your install — snap, Homebrew, apt, dnf, Docker, or the releases page for a downloaded binary — worked out from where the running executable actually sits, not from the operating system. A Homebrew ssg on Linux is still Homebrew's, and a binary you copied into /usr/bin yourself is nobody's to upgrade, so that one is sent to the releases page.

Two things it deliberately does not do:

  • It never updates anything. It reports; you decide. A tool that rewrites its own binary asks for more trust than a static site generator has any business asking for.
  • It never runs on its own. A build does not contact the network — that would be slow, would fail in air-gapped and CI environments, and nobody asked for it. The check happens only when you run it.

It exits 0 whether or not an update exists, so it is safe in a script; exit 1 means the check itself could not be made.


Uninstall

Debian/Ubuntu

1sudo apt remove ssg

Fedora/RHEL

1sudo dnf remove ssg

Snap

1sudo snap remove static-site-generator

Homebrew

1brew uninstall ssg
2brew untap spagu/tap

Manual (Binary)

1sudo rm /usr/local/bin/ssg

Troubleshooting

"command not found: ssg"

Ensure /usr/local/bin is in your PATH:

1echo $PATH | grep -q "/usr/local/bin" || export PATH=$PATH:/usr/local/bin

WebP conversion fails

Install the webp package for your system:

 1# Debian/Ubuntu
 2sudo apt install webp
 3
 4# Fedora/RHEL
 5sudo dnf install libwebp-tools
 6
 7# macOS
 8brew install webp
 9
10# FreeBSD
11pkg install graphics/webp

Permission denied

Make sure the binary is executable:

1chmod +x /usr/local/bin/ssg

Support

  • GitHub Issues: https://github.com/spagu/ssg/issues
  • Documentation: https://github.com/spagu/ssg#readme