You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
2.9 KiB
2.9 KiB
Installation
Pre-built binaries
Nightly builds for Linux and macOS (arm64 and x86-64) are available through GitHub Actions artifacts.
They can be found for each commit on the Actions tab.
The archives contain:
- the
mas-clibinary - assets needed for running the service, including:
share/assets/: the built frontend assetsshare/manifest.json: the manifest for the frontend assetsshare/policy.wasm: the built OPA policiesshare/templates/: the default templates
The location of all these assets can be overridden in the configuration file.
Using the Docker image
A pre-built Docker image is available here: ghcr.io/matrix-org/matrix-authentication-service:main
The main tag is built from the main branch, and each commit on the main branch is also tagged with a stable sha-<commit sha> tag.
The image can also be built from the source:
- Get the source
git clone https://github.com/matrix-org/matrix-authentication-service.git cd matrix-authentication-service - Build the image
docker build -t mas .
Building from the source
Building from the source requires:
- The latest stable Rust toolchain
- Node.js (18 and later) and npm
- the Open Policy Agent binary (or alternatively, Docker)
- Get the source
git clone https://github.com/matrix-org/matrix-authentication-service.git cd matrix-authentication-service - Build the frontend
This will produce a
cd frontend npm ci npm run build cd ..frontend/distdirectory containing the built frontend assets. This folder, along with thefrontend/dist/manifest.jsonfile, can be relocated, as long as the configuration file is updated accordingly. - Build the Open Policy Agent policies
OR, if you don't have
cd policies make cd ..opainstalled and want to build through the OPA docker imageThis will produce acd policies make DOCKER=1 cd ..policies/policy.wasmfile containing the built OPA policies. This file can be relocated, as long as the configuration file is updated accordingly. - Compile the CLI
cargo build --release - Grab the built binary
cp ./target/release/mas-cli ~/.local/bin # Copy the binary somewhere in $PATH mas-cli --help # Should display the help message
Next steps
The service needs some configuration to work. This includes random, private keys and secrets. Follow the configuration guide to configure the service.