proxy
Turn Cloudflare proxying on or off for a domain's main DNS records, or re-apply the saved setting, for one domain or all
- Command:
/go/proxy - Category: Cloudflare
- Required option: A domain, or
all - Output: One progress line and one result line per domain
- Last updated: 2026-11-21
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/proxy switches Cloudflare's proxy (the "orange cloud") on or off for a hosted domain. When the proxy is on, visitors reach Cloudflare first, which hides the server's IP address and adds caching and protection. When it is off, DNS points straight at the server.
For a domain, the command:
- saves the new proxy setting in GoAdmio, unless you pass
--temporary - sets the HTTPS redirect flag to match (see the warning below)
- changes the proxy flag of four DNS records in Cloudflare: the domain's
Arecord and thewww,webmail, andgoCNAMErecords - rebuilds the domain's web server configuration and reloads the web server
It uses the Cloudflare account ID and API token saved in GoAdmio's configuration, so the domain must already be in that Cloudflare account (see dns). The command raises its own privileges with sudo, so you can run it as any user with sudo rights.
[!WARNING] Each domain processed sets the HTTPS redirect flag for every account in GoAdmio's database, not only that domain: it is set to off when the proxy is on, and to on when the proxy is off. See Warning: the HTTPS redirect flag.
Quick start
# Turn the Cloudflare proxy on for a domain
/go/proxy example.com on
Syntax
# Set the proxy for one domain
/go/proxy <domain> <on|off> [--temporary]
# Re-apply the saved setting for one domain
/go/proxy <domain>
# Set the proxy for every domain
/go/proxy all <on|off> [--temporary]
# Re-apply the saved setting for every domain
/go/proxy all
| Form | Behavior |
|---|---|
/go/proxy <domain> on or off |
Sets the proxy to the value you give, saves it, and applies it to Cloudflare. |
/go/proxy <domain> |
Reads the saved proxy setting for the domain and applies it to Cloudflare. A domain with no saved setting is treated as on. |
/go/proxy all [on|off] |
Does the same for every entry in /home, then rebuilds the web configuration for all accounts. |
Every run is recorded in /var/log/go/proxy.log, with the time and the arguments you passed.
Options
| Argument | Required | Notes |
|---|---|---|
domain |
Yes | A hosted domain with a /home/<domain>/www folder, or all. |
on |
No | Proxy on. Also accepted: 1, true, --on, --enable. |
off |
No | Proxy off. Also accepted: 0, false, --off, --disable. |
--temporary |
No | Changes Cloudflare but doesn't save the new value as the domain's proxy setting. Run /go/proxy <domain> later to go back to the saved setting. |
If you give neither on nor off, the command applies the saved setting.
Output
Each domain prints a progress line, then a result line for its main A record.
Proxy example.com (true)...
example.com |
| Line | Meaning |
|---|---|
Proxy <domain> (true)... |
The proxy value being applied: true for on, false for off. With all, the line starts with a counter such as [3/20]. |
| ` | ` |
The www, webmail, and go records report nothing at all.
For a domain that isn't hosted here (no /home/<domain>/www folder), a single-domain run prints nothing and changes nothing.
Log
Each run appends one line to /var/log/go/proxy.log:
[Nov 21 12:00:00]# proxy example.com on
Examples
# Proxy on, saved
/go/proxy example.com on
# Proxy off, saved
/go/proxy example.com off
# Proxy off for now, without changing the saved setting
/go/proxy example.com off --temporary
# Go back to the saved setting
/go/proxy example.com
# Turn the proxy on for every domain
/go/proxy all on
# Re-apply every domain's saved setting
/go/proxy all
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Nothing printed and nothing changed | /home/<domain>/www doesn't exist, so the domain isn't hosted here. |
Check the domain name. |
| The result line ends with ` | ` and no text | Normal for now: the command discards Cloudflare's reply, so it can neither print Success nor show an error message. |
| The proxy didn't change in Cloudflare | The domain isn't in the Cloudflare account, or the saved account ID or API token is missing or wrong. | Add the domain with dns and check the Cloudflare settings in GoAdmio. |
| Some records stayed the same | Only the A record and the www, webmail, and go CNAME records are changed. A record that doesn't exist is skipped without a message. |
Change other records in Cloudflare, or with cloudflare. |
| HTTPS redirects changed on other domains | The command sets the redirect flag for all accounts. | Set the redirect where you want it with https. |
| A domain used the saved setting, not the value you expected | You ran the command without on or off. |
Pass on or off. |
all is slow |
It makes several Cloudflare requests per domain, then rebuilds the web configuration for every account. | Wait for it to finish. |
Details
Warning: the HTTPS redirect flag is set for every account
For each domain processed, the command updates the SSLRedirect field in GoAdmio's Site table for all accounts, without limiting it to the domain you named:
| Proxy value applied | SSLRedirect for all accounts |
|---|---|
true (on) |
0 |
false (off) |
1 |
What this means in practice:
- One domain: The database change affects every account, but only the named domain's web server configuration is rebuilt right away. Other accounts pick up the new value the next time their configuration is rebuilt.
allwithonoroff: Every account ends up with the same value, which is what you asked for.allwith noonoroff: The value depends on the saved setting of the last entry in/homethat was processed, and it is applied to every account. Mixed proxy settings across domains therefore don't give per-domain redirect settings.
After a run, check the HTTPS redirect of any domain where it matters, and set it with https.
Which Cloudflare records change
| Record | Type | Changed |
|---|---|---|
<domain> |
A |
Proxy flag set |
www.<domain> |
CNAME |
Proxy flag set |
webmail.<domain> |
CNAME |
Proxy flag set |
go.<domain> |
CNAME |
Proxy flag set |
Nothing else is touched: other subdomains, AAAA records, and mail records stay as they are.
What happens after the DNS change
| Mode | Follow-up |
|---|---|
| One domain | Rebuilds that domain's Apache and Nginx configuration (with apache and nginx), then reloads the web server (with reload). |
all |
Runs conf to rebuild the web configuration for all accounts, skipping the SSL and mail SSL steps. |
With all, the command loops over every entry in /home, not only domain folders. An entry with no saved setting is treated as proxy on.
flowchart TD
A["proxy domain [on|off]"] --> B["Raise privileges with sudo, log the run"]
B --> C{"on, off, or neither?"}
C -- "on / off" --> D["Use that value"]
C -- "Neither" --> E["Read the saved Proxy value, default on"]
D --> F{"all?"}
E --> F
F -- "Yes" --> G["For each entry in /home"]
F -- "No" --> H{"/home/domain/www exists?"}
H -- "No" --> X["Nothing happens"]
H -- "Yes" --> G2["One domain"]
G --> I["Save the setting unless --temporary, set SSLRedirect for all accounts"]
G2 --> I
I --> J["If /home/domain/www exists: set the proxy flag on the A, www, webmail, and go records"]
J --> K{"all?"}
K -- "Yes" --> L["Run conf for all accounts"]
K -- "No" --> M["Rebuild apache and nginx for the domain, reload"]
See also
| Command | Description |
|---|---|
cloudflare |
Configure Cloudflare DNS records, SSL, caching, and security settings for one or all hosted domains through the Cloudflare API |
dns |
Add one or all hosted domains to Cloudflare and set up their DNS zone, proxy and cache mode, nameservers, and SSL |
https |
Enable or disable the HTTP to HTTPS redirect for one domain, every domain, or every domain with a Let's Encrypt certificate |
conf |
Rebuild Apache/Nginx virtual hosts, PHP-FPM pools, and SSL for all accounts, or the web configuration of one domain |
purge |
Delete the Cloudflare edge cache (purge everything) |
underattack |
Enable Cloudflare Under Attack Mode for a domain |