Skip to content

Installation

Refringe edited this page Mar 8, 2026 · 1 revision

Installation

Prerequisites

  • Go 1.26 or later (for building from source)
  • Git (for cloning the repository and version detection)

Building from Source

Clone the repository and build:

git clone https://github.com/refringe/anchor-lfs.git
cd anchor-lfs
make build

The compiled binary is placed at bin/anchor-lfs. The build embeds version metadata (Git tag, commit hash, and build date) into the binary via linker flags.

Build Targets

Command Description
make build Compile the binary to bin/anchor-lfs
make run Build and immediately run the server
make clean Remove build artefacts (bin/ and coverage.out)

Manual Build

If you prefer not to use Make:

go build -trimpath -ldflags="-s -w" -o anchor-lfs .

Verifying the Build

After building, verify the binary runs:

./bin/anchor-lfs --help

Or check the embedded version info by starting the server and querying the root endpoint:

./bin/anchor-lfs &
curl -s http://localhost:5420/ | jq .
# {"version": "v1.0.0"}

Next Steps

Clone this wiki locally