Building/Installing Zendrite
Build the server and all utility commands from the root of the source repository:
Go writes the binaries to the bin subfolder.
Next, prepare the database.
Installing Zendrite
Section titled “Installing Zendrite”To install the Zendrite binary into $GOPATH/bin, use go install:
To write the binary to a custom path, use go build:
Build flags for packagers
Section titled “Build flags for packagers”Zendrite needs no special flags to build or perform well.
A release build should set only the version, which otherwise reports dev:
-trimpath keeps builds reproducible and matches the official container image.
Distribution hardening flags such as -buildmode=pie or stripping with -s -w are a packaging choice and don’t change Zendrite’s behaviour.
Two optional build tags change which libraries the binary uses:
libsqlite3links the system SQLite library instead of the bundled copy. It requires CGO and the SQLite development headers.nodynamicmakes WebP thumbnailing always use the built-in decoder. Without it, Zendrite loadslibwebp.soat runtime when present and falls back to the built-in decoder otherwise. Set it for static builds (CGO_ENABLED=0), as the official container image does.
The goolm tag matters only for the test suite.
It selects the pure-Go Olm implementation that the end-to-end encryption tests use.
Pass it to go test (for example go test -tags goolm ./...) unless the C libolm library is installed.
A -tags flag on the command line replaces any tags set in GOFLAGS, so list all tags in one place.