1# Building from source23## System dependencies45You need C toolchain, Go toolchain and Make:67On Debian-based system this should work:8```9apt-get install golang-1.23 gcc libc6-dev make10```1112Additionally, if you want manual pages, you should also have scdoc installed.13Figuring out the appropriate way to get scdoc is left as an exercise for14reader (for Ubuntu 22.04 LTS it is in repositories).1516## Recent Go toolchain1718maddy depends on a rather recent Go toolchain version that may not be19available in some distributions (*cough* Debian *cough*).2021`go` command in Go 1.21 or newer will automatically download up-to-date22toolchain to build maddy. It is necessary to run commands below only23if you have `go` command version older than 1.21.2425```26wget "https://go.dev/dl/go1.23.5.linux-amd64.tar.gz"27tar xf "go1.23.5.linux-amd64.tar.gz"28export GOROOT="$PWD/go"29export PATH="$PWD/go/bin:$PATH"30```3132## Step-by-step33341. Clone repository35```36$ git clone https://github.com/foxcpp/maddy.git37$ cd maddy38```39402. Select the appropriate version to build:41```42$ git checkout v0.8.0 # a specific release43$ git checkout master # next bugfix release44$ git checkout dev # next feature release45```46473. Build & install it48```49$ ./build.sh50$ sudo ./build.sh install51```52534. Finish setup as described in [Setting up](../setting-up) (starting from System configuration).5455