Buildables
Optional Arcane features compiled in with a Go build tag.
Buildables are optional Arcane features that are only compiled in when you build with the Go buildables build tag. They’re for developers and people who build their own Arcane binaries or images, usually for testing, CI, or demos.
Prerequisites: a clone of the Arcane repository, Go, just, and Vite+ for the frontend build. See Contributing to Arcane.
Build Arcane with buildables
Run these from the repository root.
- Build the frontend. It’s written to
backend/frontend/distand embedded in the binary:
- Build the backend with the
buildablestag and the features you want inEnabledFeatures:
cd backend
CGO_ENABLED=0 go build \
-tags buildables \
-ldflags "-X github.com/getarcaneapp/arcane/backend/v2/buildables.EnabledFeatures=autologin" \
-trimpath \
-o arcane \
./cmd/main.goTo build for a Linux container from another OS or architecture, add GOOS=linux GOARCH=amd64 (or arm64) before go build.
Build a Docker image
- Build a Linux binary as above.
- Create
backend/Dockerfile.buildablesthat copies it over the binary in the official image:
FROM ghcr.io/getarcaneapp/manager:latest
COPY arcane /app/arcane- Build the image from the
backenddirectory:
For an agent image, use ghcr.io/getarcaneapp/agent:latest as the base and copy the binary to /app/arcane-agent instead.
Official images don’t include buildables. If you need them, use a custom image like the one above.
Choose features
EnabledFeatures is a comma-separated list, for example autologin or feature-a,feature-b. Names are case-insensitive and surrounding spaces are ignored.
Some buildables read extra environment variables at runtime. These only exist in buildables builds; the table below lists them.
| Feature | Description | Source | Docs | Config |
|---|---|---|---|---|
autologin | Automatically sign in using build-time enabled credentials. | Official | Full docs | AUTO_LOGIN_USERNAMEAUTO_LOGIN_PASSWORD |
Official buildables are maintained by the Arcane team. Community buildables are built and supported by the community.
Add a new buildable feature
- Put feature-only code in files guarded with
//go:build buildableswhere appropriate. - Check
buildables.HasBuildFeature("your-feature")before running the feature. Without thebuildablestag, a stub makes this always returnfalse. - Add any buildable-only settings to
BuildablesConfiginbackend/internal/config/buildables_config.go. - Build tests for the feature with the
buildablestag.just test backendalready runs with-tags=exclude_frontend,buildablesandEnabledFeatures=autologin.