REST API with Go to manage BIND9 DNS Server from anywhere
Direct from binary
sudo su
curl -sSL https://raw.githubusercontent.com/EpicLabs23/bind9-api/refs/heads/main/install.sh | bash -s 0.1.0
Debian/Ubuntu:
wget https://github.com/EpicLabs23/bind9-api/releases/download/v<version>/bind9-api_<version>_linux_amd64.deb
sudo dpkg -i bind9-api_<version>_linux_amd64.deb
sudo systemctl enable bind9-api
sudo systemctl start bind9-apiwget https://github.com/EpicLabs23/bind9-api/releases/download/v<version>/bind9-api_<version>_linux_amd64.rpm
sudo rpm -i bind9-api_<version>_linux_amd64.rpm
sudo systemctl enable bind9-api
sudo systemctl start bind9-apiwget https://github.com/EpicLabs23/bind9-api/releases/download/v<version>/bind9-api_<version>_linux_amd64.tar.gz
tar -xzf bind9-api_<version>_linux_amd64.tar.gz
sudo mv bind9-api /usr/local/bin/
sudo mkdir -p /etc/bind9-api
sudo mv config.yml /etc/bind9-api/
sudo cp packaging/systemd/bind9-api.service /etc/systemd/system/
sudo systemctl enable bind9-api
sudo systemctl start bind9-apiUpdate the config file in /etc/bind9-api/config.yml and restart the service
You must update username and password in the config file
And use these credentials for Basic Auth
- Clone the repository
git clone https://github.com/EpicLabs23/bind9-api.git- Change directory
cd bind9-api- Run
docker compose up -d- Start Dev application
go mod tidy
docker exec -it bind9-api-dev bash
cd /bind9-api
airCheck if the release is ready to be published
git tag v0.1.0
goreleaser release --snapshot --cleanPublish the release
git tag v0.1.0
# Following should fire the Github "Release" workflow
git push origin v0.1.0Manual release
goreleaser release --cleanAdditional commands:
#Delete local tag
git tag -d v0.1.0
#Delete remote tag
git push --delete origin v0.1.0