# Installation

# Building

To get atomdns you have to build it from source. We have not yet distribute packages for the different OSes.

## Prebuild Binaries

> [!NOTE] TODO
> https://codeberg.org/miekg/dns/issues/436

### Linux Distribution Packages

> [!NOTE] TODO
> https://codeberg.org/miekg/dns/issues/437

## Building From Source

If you don't have Go, or not the latest version of Go, following the [Go installation
guide](https://go.dev/doc/install).

Once you have working `go` binary, you clone the atomdns repository and use "go build" to build the binary.

1. `mkdir src; cd src`
2. `git clone https://codeberg.org/miekg/dns`
3. `cd dns/cmd/atomdns`
4. `go build`

If you want a fully static binary use `CGO_ENABLED=0 go build`.

## Testing

This should have yielded a atomdns binary. Check for instance the version and list all compiled
[handlers](/handlers).

```sh
./atomdns -V
041
```

Or

```sh
./atomdns -H
acl
any
as112
chaos
cookie
dbfile
dbhost
dbsqlite
drunk
geoip
global
log
metrics
nsid
refuse
sign
template
unpack
url
whoami
```

> [!INFO]
> If you have the source in the `man` directory you can find all manual pages. On Linux you can just `man
man/atomdns-....` to read a manual page.

Next we continue with [the configuration](/starting/configuration).
