{"id":13708127,"url":"https://github.com/noclocks/dns","last_synced_at":"2026-01-17T22:19:42.788Z","repository":{"id":224095631,"uuid":"762369231","full_name":"noclocks/dns","owner":"noclocks","description":"DNS Records Managed via dnscontrol","archived":false,"fork":false,"pushed_at":"2025-01-27T07:27:38.000Z","size":1126,"stargazers_count":4,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T07:38:26.623Z","etag":null,"topics":["dns","dns-records","dnscontrol","iac"],"latest_commit_sha":null,"homepage":"https://docs.noclocks.dev/dns/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noclocks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://www.paypal.me/noclocks","https://pay.noclocks.dev/b/7sI5o93U4gng9gs5kl"]}},"created_at":"2024-02-23T16:29:05.000Z","updated_at":"2025-01-15T22:30:30.000Z","dependencies_parsed_at":"2024-07-23T04:09:09.645Z","dependency_job_id":"879c56b1-68fa-498d-8930-8ccc4988df9e","html_url":"https://github.com/noclocks/dns","commit_stats":null,"previous_names":["noclocks/dns"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/noclocks/dns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noclocks%2Fdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noclocks%2Fdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noclocks%2Fdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noclocks%2Fdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noclocks","download_url":"https://codeload.github.com/noclocks/dns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noclocks%2Fdns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28519951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","dns-records","dnscontrol","iac"],"created_at":"2024-08-02T22:01:56.814Z","updated_at":"2026-01-17T22:19:42.772Z","avatar_url":"https://github.com/noclocks.png","language":"JavaScript","funding_links":["https://www.paypal.me/noclocks","https://pay.noclocks.dev/b/7sI5o93U4gng9gs5kl"],"categories":["JavaScript"],"sub_categories":[],"readme":"# No Clocks, LLC Domain Name System Records\n\n\u003e [!NOTE]\n\u003e This repository manages the DNS Records for No Clocks.\n\n## Badges\n\n\n\u003c!-- BADGES:START --\u003e\n[![DNSControl](https://github.com/noclocks/dns/actions/workflows/dnscontrol.yml/badge.svg)](https://github.com/noclocks/dns/actions/workflows/dnscontrol.yml)\n[![Preview DNS Changes](https://github.com/noclocks/dns/actions/workflows/pull-request.yml/badge.svg)](https://github.com/noclocks/dns/actions/workflows/pull-request.yml)\n[![Rollback DNS Configuration](https://github.com/noclocks/dns/actions/workflows/rollback.yml/badge.svg)](https://github.com/noclocks/dns/actions/workflows/rollback.yml)\n\n[![Automate Changelog](https://github.com/noclocks/dns/actions/workflows/changelog.yml/badge.svg)](https://github.com/noclocks/dns/actions/workflows/changelog.yml)\n[![MkDocs Deploy GitHub Pages](https://github.com/noclocks/dns/actions/workflows/mkdocs-deploy.yml/badge.svg)](https://github.com/noclocks/dns/actions/workflows/mkdocs-deploy.yml)\n\u003c!-- BADGES:END --\u003e\n\n## Contents\n\n- [No Clocks, LLC Domain Name System Records](#no-clocks-llc-domain-name-system-records)\n  - [Badges](#badges)\n  - [Contents](#contents)\n  - [Overview](#overview)\n  - [DNSControl](#dnscontrol)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Docker](#docker)\n    - [GitHub Actions](#github-actions)\n  - [Configuration](#configuration)\n    - [creds.json](#credsjson)\n    - [dnsconfig.js](#dnsconfigjs)\n  - [DNS Records](#dns-records)\n  - [Useful Commands](#useful-commands)\n\n## Overview\n\nNo Clocks, LLC utilizes [Porkbun](https://porkbun.com/) as our DNS Provider and Registrar.\n\nThis repository serves as our *DNS as Code* (as opposed to infrastructure as code) leveraging the [dnscontrol](https://github.com/StackExchange/dnscontrol/) tool by StackOverflow.\n\n## DNSControl\n\nDNSControl is a system for maintaining DNS zones. It has two parts: a domain specific language (DSL) for describing\nDNS zones plus software that processes the DSL and pushes the resulting zones to DNS providers.\n\nIt can send the same DNS records to multiple providers.\n\nIt runs anywhere Go runs (Linux, macOS, Windows).\n\nThe provider model is extensible, so more providers can be added.\n\n## Installation\n\n`dnscontrol` can be installed locally or run in a Docker container.\n\nSee [the official documentation](https://docs.dnscontrol.org/getting-started/getting-started#1-install-the-software) for more information.\n\nTo install `dnscontrol` on your local machine using Homebrew, run the following command:\n\n```bash\nbrew install dnscontrol\n```\n\nTo use `dnscontrol` in a Docker container, run the following command:\n\n```bash\ndocker run --rm -it -v \"$(pwd):/dns\"  ghcr.io/stackexchange/dnscontrol preview\n```\n\n## Usage\n\nTo preview the changes that will be made to the DNS records, run the following command:\n\n```bash\ndnscontrol preview\n```\n\nTo push the changes to the DNS Provider, run the following command:\n\n```bash\ndnscontrol push\n```\n\n### Docker\n\n```bash\ndocker run --rm -it -v \"$(pwd):/dns\"  ghcr.io/stackexchange/dnscontrol preview\n```\n\n### GitHub Actions\n\nThis repository is configured to run the `dnscontrol` commands using GitHub Actions.\n\nThe defined DNS records are deployed to the DNS Provider using the GitHub action when a commit is pushed to the `main` branch.\n\nThe GitHub Action is defined in the [`.github/workflows/dnscontrol.yml`](.github/workflows/dnscontrol.yml) file.\n\n\u003cdetails\u003e\u003csummary\u003eView Code\u003c/summary\u003e\u003cp\u003e\n\n```yaml\nname: DNSControl\n\non:\n  push:\n    branches:\n      - main\n    paths:\n      - 'dnsconfig.js'\n      - '.github/workflows/dnscontrol.yml'\n      - 'creds.example.json'\n  workflow_dispatch:\n\nenv:\n  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  PORKBUN_API_KEY: ${{ secrets.PORKBUN_API_KEY }}\n  PORKBUN_API_SECRET: ${{ secrets.PORKBUN_API_SECRET }}\n  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\n  CONFIG_FILE: 'dnsconfig.js'\n  CREDS_FILE: 'creds.example.json'\n\njobs:\n  dnscontrol-check:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Check\n        id: dnscontrol_check\n        uses: is-cool-me/dnscontrol-action@v4.7.3\n        with:\n          args: check\n          config_file: 'dnsconfig.js'\n          creds_file: 'creds.example.json'\n\n  dnscontrol-preview:\n    runs-on: ubuntu-latest\n    needs: dnscontrol-check\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Preview\n        id: dnscontrol_preview\n        uses: is-cool-me/dnscontrol-action@v4.7.3\n        with:\n          args: preview --notify\n          config_file: 'dnsconfig.js'\n          creds_file: 'creds.example.json'\n\n  dnscontrol-push:\n    runs-on: ubuntu-latest\n    needs: dnscontrol-preview\n    permissions:\n      contents: write\n\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Get Date\n        id: get_date\n        run: echo \"REPORT_DATE=$(date +'%Y-%m-%d')\" \u003e\u003e $GITHUB_ENV\n\n      - name: Get File Name\n        id: get_file_name\n        env:\n          REPORT_DATE: ${{ env.REPORT_DATE }}\n        run: echo \"REPORT_FILE=./reports/$REPORT_DATE-Report.txt\" \u003e\u003e $GITHUB_ENV\n\n      - name: Test Echo Date\n        env:\n          REPORT_DATE: ${{ env.REPORT_DATE }}\n          REPORT_FILE: ${{ env.REPORT_FILE }}\n        run: |\n          echo \"$REPORT_DATE\"\n          echo \"$REPORT_FILE\"\n\n      - name: Push\n        id: dnscontrol_push\n        uses: is-cool-me/dnscontrol-action@v4.7.3\n        with:\n          args: push --notify --report ${{ env.REPORT_FILE }}\n          config_file: 'dnsconfig.js'\n          creds_file: 'creds.example.json'\n\n      - name: Git Pull\n        id: git_pull\n        run: git pull\n\n      - name: Commit and Push Changes\n        id: git_commit_push\n        uses: stefanzweifel/git-auto-commit-action@v5\n        with:\n          commit_user_email: 'github-actions[bot]@users.noreply.github.com'\n          commit_user_name: 'github-actions[bot]'\n          commit_message: 'chore: github action dnscontrol - $REPORT_DATE'\n```\n\n\u003c/p\u003e\u003c/details\u003e\n\n## Configuration\n\nThe configuration for `dnscontrol` is stored in the following files:\n\n- `creds.json` (not included in the repository)\n- `dnsconfig.js`\n\nplus an additional, but optional, TypeScript definition file:\n\n- `types-dnscontrol.d.ts`\n\n\n### creds.json\n\nThe `creds.json` file is used to store the credentials for the DNS Provider.\n\nSee the [creds.example.json](creds.example.json) file for an example of the format.\n\nNote that the following environment variables are required to use the `creds.example.json` file:\n\n- `PORKBUN_API_KEY`: The API Key for the Porkbun DNS Provider\n- `PORKBUN_API_SECRET`: The API Secret for the Porkbun DNS Provider\n- `SLACK_WEBHOOK_URL`: The Webhook URL for the Slack Notifications\n\n```json\n{\n    \"porkbun\": {\n        \"TYPE\": \"PORKBUN\",\n        \"api_key\": \"$PORKBUN_API_KEY\",\n        \"secret_key\": \"$PORKBUN_API_SECRET\"\n    },\n    \"notifications\": {\n      \"TYPE\": \"SLACK\",\n      \"slack_url\": \"$SLACK_WEBHOOK_URL\"\n    }\n}\n```\n\n### dnsconfig.js\n\nThe core file used by dnscontrol is the [dnsconfig.js](dnsconfig.js) configuration file written in JavaScript.\n\nThis file contains the DNS records for the No Clocks, LLC domain.\n\n\u003cdetails\u003e\u003csummary\u003eView Code\u003c/summary\u003e\u003cp\u003e\n\n```javascript\n// @ts-check\n// \u003creference path=\"types-dnscontrol.d.ts\" /\u003e\n\nvar REG_NONE = NewRegistrar(\"none\");\nvar DSP_PORKBUN = NewDnsProvider(\"porkbun\");\n\nD(\"noclocks.dev\", REG_NONE, DnsProvider(DSP_PORKBUN),\n    NAMESERVER(\"curitiba.ns.porkbun.com.\"),\n    NAMESERVER(\"fortaleza.ns.porkbun.com.\"),\n    NAMESERVER(\"maceio.ns.porkbun.com.\"),\n    NAMESERVER(\"salvador.ns.porkbun.com.\"),\n    ALIAS(\"@\", \"pixie.porkbun.com.\"),\n    CNAME(\"www\", \"noclocks.dev.\"),\n    CNAME(\"blog\", \"39843493.group43.sites.hubspot.net.\"),\n    CNAME(\"*\", \"pixie.porkbun.com.\"),\n    CNAME(\"docs\", \"noclocks.github.io.\"),\n    MX(\"@\", 10, \"fwd1.porkbun.com.\", TTL(600)),\n    MX(\"@\", 20, \"fwd2.porkbun.com.\", TTL(600)),\n    TXT(\"@\", \"v=spf1 include:_spf.porkbun.com ~all\", TTL(300)),\n    TXT(\"default._domainkey\", \"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5wVNukpz+fpCVe3pTPph5GNNgljwTdL43ykZ2P4Vm/HiwFqsGGpuZaMhbVJtmmnItAAjdQfCqITYvMbQFU0DYAZpJencyelIU4bznlZM8NvwPlFo9so2C1zDfUs2Y9rgF71+4V/fyu3tXa0r8l8r6STpYGB0GsmL6idTZy3PJKQIDAQAB\", TTL(300)),\n    TXT(\"_dmarc\", \"v=DMARC1; p=quarantine; rua=mailto:25f8c5e6@mxtoolbox.dmarc-report.com; ruf=mailto:25f8c5e6@forensics.dmarc-report.com; fo=1\", TTL(300)),\n    TXT(\"_acme-challenge\", \"YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY\", TTL(600)),\n    TXT(\"_acme-challenge\", \"duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA\", TTL(600)),\n    TXT(\"_github-pages-challenge-noclocks\", \"8c88c3f5791a75585aedc0a0e821fb\", TTL(600))\n);\n```\n\n\u003c/p\u003e\u003c/details\u003e\n\n## DNS Records\n\n*As of 2024-02-23:*\n\n|  Type   |                Host                |                     Value                     | TTL |                     Notes                     |\n|:-------:|:----------------------------------:|:---------------------------------------------:|:---:|:---------------------------------------------:|\n| `ALIAS` |                `@`                 |             `pixie.porkbun.com.`              | 60  |        `ALIAS` record for root domain         |\n| `CNAME` |                `*`                 |             `pixie.porkbun.com.`              | 600 |     `CNAME` record for wildcard subdomain     |\n| `CNAME` |               `www`                |                `noclocks.dev.`                | 600 |      `CNAME` record for \"www\" subdomain       |\n| `CNAME` |               `hub`                |     `39843493.group43.sites.hubspot.net`      | 600 |     `CNAME` record for HubSpot subdomain      |\n| `CNAME` |               `docs`               |             `noclocks.github.io.`             | 600 |        `CNAME` record for GitHub Pages        |\n| `CNAME` |               `blog`               |              `hashnode.network.`              | 600 | `CNAME` record for blog subdomain on Hashnode |\n| `CNAME` |              `store`               |            `shops.myshopify.com.`             | 600 |  `CNAME` record for Shopify store subdomain   |\n| `CNAME` |          `k2._domainkey`           |               `dkim2.mcsv.net.`               | 600 |   `CNAME` record for Mailchimp DKIM record    |\n| `CNAME` |          `k3._domainkey`           |               `dkim3.mcsv.net.`               | 600 |   `CNAME` record for Mailchimp DKIM record    |\n|  `MX`   |                `@`                 |              `fwd1.porkbun.com.`              | 600 |       `MX` record for email forwarding        |\n|  `MX`   |                `@`                 |              `fwd2.porkbun.com.`              | 600 |       `MX` record for email forwarding        |\n|  `TXT`  |                `@`                 |    `v=spf1 include:_spf.porkbun.com ~all`     | 300 |       `SPF` record for email forwarding       |\n|  `TXT`  |        `default._domainkey`        |             `v=DKIM1; k=rsa; ...`             | 300 |      `DKIM` record for email forwarding       |\n|  `TXT`  |              `_dmarc`              |         `v=DMARC1; p=quarantine; ...`         | 300 |      `DMARC` record for email forwarding      |\n|  `TXT`  |         `_acme-challenge`          | `YfcZoPb1JoXtiwUP0k4aimMlw712-NxzrrIsxMAJJtY` | 600 |       Let's Encrypt Domain Verification       |\n|  `TXT`  |         `_acme-challenge`          | `duFW0ARxb60Rd6snfskR9b4db08jaoGVrM_dGY-PUcA` | 600 |       Let's Encrypt Domain Verification       |\n|  `TXT`  | `_github-pages-challenge-noclocks` |       `8c88c3f5791a75585aedc0a0e821fb`        | 600 |          GitHub Domain Verification           |\n|  `TXT`  |  `_github-challenge-noclocks-org`  |                 `5b7bfb8c3a`                  | 600 |          GitHub Domain Verification           |\n|  `TXT`  |                `@`                 |        `google-site-verification=...`         | 600 |          Google Domain Verification           |\n|  `TXT`  |                `@`                 |      `amazon-business-verification=...`       | 600 |          Amazon Domain Verification           |\n\n## Name Servers\n\n```bash\ncuritiba.ns.porkbun.com\nfortaleza.ns.porkbun.com\nmaceio.ns.porkbun.com\nsalvador.ns.porkbun.com\n```\n\n## Useful Commands\n\n```bash\n# check configuration validity:\ndnscontrol check\n\n# apply formatting to configuration\ndnscontrol fmt dnsconfig.js\n\n# preview what changes would be made\ndnscontrol preview\n\n# full preview\ndnscontrol preview --full\n\n# preview with a notification hook (slack)\ndnscontrol preview --notify\n\n# check credentials against Porkbun API:\ndnscontrol check-creds porkbun\n\n# push DNS record changes\ndnscontrol push\n\n# push and notify (slack)\ndnscontrol push --notify\n\n# push and output a text report\nmkdir reports\ndnscontrol push --report \"./reports/$(date '+%Y-%m-%d')-Report.txt\"\n\n# import / retrieve current records via a 'zone' file\ndnscontrol get-zones --format=zone porkbun - noclocks.dev\n\n# import / retrieve current records via a 'zone' file with output\nmkdir zones\ndnscontrol get-zones --format=zone porkbun - noclocks.dev \u003e zones/noclocks.dev.zone\n\n# get zones (names only)\ndnscontrol get-zones --format=nameonly porkbun - noclocks.dev\n\n# get zones (zone file format using the BIND provider)\ndnscontrol get-zones --format=zone bind - noclocks.dev\n\n# get zones (table format)\ndnscontrol get-zones --format=tsv porkbun - noclocks.dev\n\n# get zones (table format and output to CSV/TSV data file)\ndnscontrol get-zones --format=tsv porkbun - noclocks.dev \u003e reports/noclocks.dev.csv\n\n# get zones formatted with `djs` (JavaScript with leading commas)\ndnscontrol get-zones --format=djs porkbun - noclocks.dev\n\n# get zones formatted with `djs` (JavaScript with leading commas) \u0026 output to file\ndnscontrol get-zones --format=djs porkbun - noclocks.dev \u003e noclocks.dev.js\n\n# get zones formatted as JavaScript\ndnscontrol get-zones --format=js porkbun - noclocks.dev\n\n# get zones formatted as JavaScript and output to file\ndnscontrol get-zones --format=js porkbun - noclocks.dev \u003e noclocks.dev.js\n\n# utilize dnsutils 'dig' to check DNS record propogation, etc.\nsudo apt install dnsutils\ndig noclocks.dev\ndig +short noclocks.dev\n```\n\n***\n\nNo Clocks, LLC | 2024\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoclocks%2Fdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoclocks%2Fdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoclocks%2Fdns/lists"}