Jump to content

Standalone binary

From Wikven

Besides the Docker image, Wikven ships as a single self-contained executable that embeds MediaWiki, so you can build a site without Docker. It is available for Linux on x86_64 and arm64.

On macOS and Windows, use the Docker image instead. Wikven provides no prebuilt macOS binary, for cost reasons: for a downloaded binary to run without Gatekeeper blocking it, Apple requires it to be signed and notarized through a paid Apple Developer Program account (US$99/year), and that cost is not justified for the project yet. The only alternative, telling users to clear the quarantine by hand, trains them to bypass a security check, so it is not offered. A macOS user who wants a binary regardless can compile one from source with FrankenPHP's static build; a locally built binary is not quarantined.

There is no prebuilt Windows binary either: the toolchain that produces a single self-contained executable does not support Windows yet (see issue #192).

Download

Download the binary for your architecture from the latest release and make it executable:

curl -L -o wikven https://github.com/chaotic-ground/wikven/releases/latest/download/wikven-linux-x86_64
chmod +x wikven

On arm64, use wikven-linux-aarch64.

To track the latest commit on the main branch instead of a tagged release, use a nightly build. These are published daily as dated pre-releases tagged nightly-YYYY-MM-DD; pick the most recent from the releases page, or resolve it automatically:

tag=$(curl -s https://api.github.com/repos/chaotic-ground/wikven/releases | sed -n 's/.*"tag_name": *"\(nightly-[^"]*\)".*/\1/p' | head -n1)
curl -L -o wikven "https://github.com/chaotic-ground/wikven/releases/download/$tag/wikven-linux-x86_64"

Verify

Each release binary is published with a .sha256 checksum and a signed build-provenance attestation. To check it before trusting a binary you install onto your PATH, download it under its release name and verify the checksum:

curl -LO https://github.com/chaotic-ground/wikven/releases/latest/download/wikven-linux-x86_64
curl -LO https://github.com/chaotic-ground/wikven/releases/latest/download/wikven-linux-x86_64.sha256
sha256sum -c wikven-linux-x86_64.sha256

Or verify the provenance, that GitHub Actions built it from this repository, with the GitHub CLI:

gh attestation verify wikven-linux-x86_64 --repo chaotic-ground/wikven

Install

The downloaded file already runs as-is — ./wikven from the directory you saved it in. To run it as plain wikven from anywhere, install it onto your PATH:

sudo install wikven /usr/local/bin/

Without root, install it into a personal directory that is on your PATH instead, such as ~/.local/bin (-D creates the directory if it is missing):

install -D wikven ~/.local/bin/wikven

The commands below assume it is on your PATH. If you skipped this step, run it as ./wikven from the directory you downloaded it to.

Building a site

Put your wikitext and a .wikven.yaml in a src/ directory, then build:

mkdir -p src
echo 'Hello, World!' > src/index.wikitext
wikven build

The rendered site is written to dist/. Preview it with wikven serve (see Deploying). The working directory defaults to the current directory; set WIKVEN_WORKDIR to build a project elsewhere:

WIKVEN_WORKDIR=/path/to/project wikven build

The output is the same as the Docker image's: the binary embeds MediaWiki, the bundled extensions and skins, and every interface language, and it reads the same .wikven.yaml layered over Wikven's defaults.

Optional host tools

The binary renders on its own, but uses these host programs when they are present:

  • ImageMagick and librsvg produce higher-quality thumbnails. Without them the binary uses the built-in GD library for raster images and serves SVG inline. See Images.
  • git is needed only to fetch third-party extensions and skins.

Fetching over HTTPS, Wikimedia Commons images via InstantCommons and any third-party extensions or skins, relies on your system's CA certificates. On a minimal system without them, install your distribution's CA bundle (for example the ca-certificates package). A site with only local content and images needs no network access.


Retrieved from "Standalone_binary.html"