Files
anubis-mirror/docs/docs/developer/building-anubis.md
Xe Iaso df27a96f1f make a half-baked tarball (#221)
* make a half-baked tarball

Closes #217

Signed-off-by: Xe Iaso <me@xeiaso.net>

* make two tarballs: one with just the vendor, and one with vendor and npm

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-04-06 12:44:52 +00:00

2.5 KiB

title
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.

:::

Entirely from source

If you are doing a build entirely from source, here's what you need to do:

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.

"Pre-baked" tarball

The anubis-src-with-vendor tarball has many pre-build steps already done, including:

  • Go module dependencies are present in ./vendor
  • Static assets (JS, CSS, etc.) are already built in CI

This means you do not have to manage Go, NPM, or other ecosystem dependencies.

When using this tarball, all you need to do is build ./cmd/anubis:

make prebaked-build

Anubis will be built to ./var/anubis.

Development dependencies

Optionally, you can install the following dependencies for development: