nuke/docs/docs/developer/building-anubis.md
Xe Iaso 95416dfe82
Makefile: fix subtle logic bug (#228)
Closes #226

Makefile dependencies are backwards, apparently.

Also add staticcheck as a `go tool` dependency.
2025-04-06 00:28:08 -04:00

1.9 KiB

title
Building Anubis without Docker

:::note

These instructions may work, but for right now they are informative for downstream packagers more than they are ready-made instructions for administrators wanting to run Anubis on their servers. Pre-made binary package support is being tracked in #156.

:::

Tools needed

In order to build a production-ready binary of Anubis, you need the following packages in your environment:

  • Go at least version 1.24 - the programming language that Anubis is written in
  • esbuild - the JavaScript bundler Anubis uses for its production JS assets
  • Node.JS & NPM - manages some build dependencies
  • gzip - compresses production JS (part of coreutils)
  • zstd - compresses production JS
  • brotli - compresses production JS

To upgrade your version of Go without system package manager support, install golang.org/dl/go1.24.2 (this can be done from any version of Go):

go install golang.org/dl/go1.24.2@latest
go1.24.2 download

Install dependencies

make deps

This will download Go and NPM dependencies.

Building static assets

make assets

This will build all static assets (CSS, JavaScript) for distribution.

Building Anubis to the ./var folder

make build

From this point it is up to you to make sure that ./var/anubis ends up in the right place. You may want to consult the ./run folder for useful files such as a systemd unit and anubis.env.default file.

Development dependencies

Optionally, you can install the following dependencies for development: