DomainOmatic is a Go-based web application that automates the process of managing domains with Cloudflare. It provides a simple interface for users to submit domains, checks nameservers, and automatically adds domains to Cloudflare with preconfigured DNS records.
- Web interface for domain submission
- Automatic nameserver verification
- Cloudflare integration for domain and DNS record management
- Limbo system for domains pending nameserver configuration
- Periodic checking of domain nameservers
- Removal of domains with changed nameservers
- Go 1.16 or higher
- Cloudflare account and API token
-
Clone the repository:
git clone https://github.com/teamcoltra/domainomatic.git cd domainomatic -
Install dependencies:
go get github.com/cloudflare/cloudflare-go go get github.com/lixiangzhong/dnsutil go get github.com/miekg/dns -
Set up your Cloudflare API token as an environment variable:
export CLOUDFLARE_API_TOKEN=your_api_token_here -
Create a
master.zonefile in the project root directory (see example below). -
Build the application:
go build
-
Start the server:
./domainomatic -
Access the web interface at
http://localhost:8080 -
Use the web interface to submit domains. Submitted domains will be placed in limbo until their nameservers are verified.
-
The application will automatically process limbo domains every hour, adding them to Cloudflare if the nameservers are correct.
-
Active domains are checked every 3 hours to ensure their nameservers haven't changed.
The master.zone file is a CSV file that defines the DNS records to be created for each domain added to Cloudflare. Here's an example of what it should look like:
type,name,content,ttl,proxied
A,@,192.0.2.1,1,true
CNAME,www,example.com,1,true
MX,@,mail.example.com,3600,false
TXT,@,v=spf1 include:_spf.example.com ~all,1,falsetype: DNS record type (A, CNAME, MX, TXT, etc.)name: The name of the record (use @ for root domain)content: The content of the record (IP address, target domain, etc.)ttl: Time to Live in seconds (use 1 for automatic)proxied: Whether the record should be proxied through Cloudflare (true/false)
domains.json: Stores active domainslimbo_domains.txt: Stores domains pending nameserver verificationremoved_domains.txt: Stores domains that have been removed due to nameserver changes
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.