/go/dns: dns from the Command Line

/go/dns puts hosted domains on Cloudflare in one step. For each domain it: It does the work by calling cloudflare and ssl. The call is appended to /var/log/go/dns.log. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Add one domain to Cloudflare (DNS only, proxy off)
/go/dns example.com

Before the first run, save your Cloudflare Account ID and API token under GoAdmio Dashboard > Cloudflare API, and give the token the permissions it needs. Without them the command prints a reminder box and exits.

Options

Option Proxy Cache Notes
(none) Off Not changed DNS only.
--cache On Mode respect Uses Cloudflare caching.
--cache --override On Mode override --override only has an effect together with --cache.
--nocache On Cache turned off Proxied, but not cached.

quick ignores all options.

Examples

# One domain, DNS only
/go/dns example.com

# One domain, proxied with Cloudflare caching that respects the site's headers
/go/dns example.com --cache

# One domain, proxied with Cloudflare overriding the site's cache headers
/go/dns example.com --cache --override

# One domain, proxied but not cached
/go/dns example.com --nocache

# Every hosted domain, proxied and cached
/go/dns all --cache

# Refresh the main A record of every hosted domain, proxy off
/go/dns quick

Output

The command prints a progress line per domain in all and quick runs:

[3/42] example.com...

The rest of the output comes from cloudflare and ssl.

Message Meaning
Cloudflare API Configuration Required (boxed) The Account ID or API token is not saved. Set them under GoAdmio Dashboard > Cloudflare API.
<domain> not exists. The domain has no /home/<domain>/www folder.

See the full reference at /go/dns and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *