| 1 | # Building from source |
| 2 | |
| 3 | This page documents how to build matterbridge from source. If you're looking for ready-to-use executables, head over to [setup.md]. |
| 4 | |
| 5 | If you really want to build from source, follow these instructions: |
| 6 | Go 1.18+ is required. Make sure you have [Go](https://golang.org/doc/install) properly installed. |
| 7 | |
| 8 | Building the binary with **all** the bridges enabled needs about 3GB RAM to compile. |
| 9 | You can reduce this memory requirement to 0,5GB RAM by adding the `nomsteams` tag if you don't need/use the Microsoft Teams bridge. |
| 10 | |
| 11 | Matterbridge can be build without gcc/c-compiler: If you're running on windows first run `set CGO_ENABLED=0` on other platforms you prepend `CGO_ENABLED=0` to the `go build` command. (eg `CGO_ENABLED=0 go build -tags goolm github.com/matterbridge-org/matterbridge`) |
| 12 | |
| 13 | To build the from the cloned GitHub repository without installing run in the root project directory: |
| 14 | |
| 15 | ```bash |
| 16 | go build -tags goolm |
| 17 | ``` |
| 18 | |
| 19 | To install the latest stable run: |
| 20 | |
| 21 | ```bash |
| 22 | go install -tags goolm github.com/matterbridge-org/matterbridge |
| 23 | ``` |
| 24 | |
| 25 | To install the latest dev run: |
| 26 | |
| 27 | ```bash |
| 28 | go install -tags goolm github.com/matterbridge-org/matterbridge@master |
| 29 | ``` |
| 30 | |
| 31 | To install the latest stable run without msteams or zulip bridge: |
| 32 | |
| 33 | ```bash |
| 34 | go install -tags goolm,nomsteams,nozulip github.com/matterbridge-org/matterbridge |
| 35 | ``` |
| 36 | |
| 37 | You should now have matterbridge binary in the ~/go/bin directory: |
| 38 | |
| 39 | ```bash |
| 40 | $ ls ~/go/bin/ |
| 41 | matterbridge |
| 42 | ``` |
| 43 | |