Skip to main content

Panel domain

The Panel domain tab of the Qubix settings window. It lets you move the admin panel onto a different domain. The same tab holds the Cloudflare origin port — the single port Cloudflare uses to reach your server.

Who sees the tab

This tab is shown only to a role that is allowed to manage the system.

Open the port in your firewall first​

The port your server accepts outside connections on must be open in the host's inbound firewall. Which port that is:

  • Direct mode — ports 443 and 80. The panel is served on 443; port 80 is where the Let's Encrypt certificate is issued and later renewed automatically. The automatic check below looks at 443 only, so a closed port 80 passes it unnoticed and then breaks the certificate issuance — open both at once.
  • Via Cloudflare mode — the port shown in the Cloudflare origin port section further down this tab.

You do not have to check this by hand. Before switching, Qubix probes the port from the outside, from the internet. If the port is closed, the domain change is refused and the screen shows the port number together with ready-made commands — run the one that matches your firewall on the host:

Bash
ufw allow 443/tcp
firewall-cmd --permanent --add-port=443/tcp && firewall-cmd --reload
iptables -I INPUT -p tcp --dport 443 -j ACCEPT

For port 80 run the same command with 80 in place of 443.

On a server rented from Qubix you open nothing yourself: 80, 443 and 8443 are open from the start, and any other Cloudflare origin port is opened when you pick it, before the check, and closed again once the panel no longer listens on it.

The check cannot be turned off from the panel: a closed port means you would lose access to the panel right after the switch. Open the port and repeat the change. The check is not a guarantee: if the check itself could not run, the domain change goes ahead without it — so open the port beforehand in any case.

How to move the panel​

  1. Open Qubix settings → Panel domain. The line under the heading shows Currently and the current domain, with the serving mode after a dot: behind Cloudflare, straight from this server or both behind Cloudflare and directly.
  2. In the Move to another domain group, enter the domain in the New domain field; the example in it reads dash.example.com, and the info mark says: DNS has to be set up in advance
  3. Choose the serving mode in the Mode list — Via Cloudflare or Direct. The info mark of the list explains the chosen one. For the first: The domain is served behind Cloudflare (Full): the server presents a self-signed certificate, Cloudflare must already serve the zone. For the second: The domain is served straight from this server with its own certificate: the domain's A-record must point to this server.
  4. Click Change domain…; while the change runs, the button reads Changing…. A short warning stands above it: The current session will close — after the change, open the Qubix Panel at the new address. If the field is empty, the panel answers Enter the new domain. The dialog titled Change the admin-panel domain asks Change the admin-panel domain to …? The current session will stop working — you will continue on the new domain. and has the Change button. After the confirmation Qubix checks the port, switches the panel over using the same machinery as the initial install, and returns a new login link on the chosen domain; the group then says Domain changed. Open the admin panel on the new address (this session will stop working):

The note under the group says: Move the admin panel onto a different domain. The system re-issues the certificate, rebuilds the web server and reassigns the domain — if anything fails it rolls back to the current domain, so the box is never left without a working admin panel.

A domain connected through your own Cloudflare can't host the panel: Qubix refuses with the message “This domain's zone is in your own Cloudflare account, so the domain cannot be moved to our Cloudflare from here. Delete it and connect it again.”

Nor can the panel move onto a domain that already serves campaigns or a PWA app: at the panel's address they would stop opening. Qubix refuses before changing anything.

The current session will end

Changing the admin panel's domain ends the current session — the panel stops being served on the old address. Open the new login link and sign in again. If the new domain is unreachable, its port is closed, Cloudflare did not accept the port rule in its zone (when the Cloudflare origin port is not 443) or its certificate is not ready yet, the change is reported as an error and nothing is moved.

Cloudflare origin port​

The Cloudflare origin port section sits under the domain-change form. It shows the current port and lets you choose another of the ports Cloudflare reaches a server on: 443 ((recommended)), 2053, 2083, 2087, 2096 and 8443. The info mark next to the name of the field says: One for all domains in Cloudflare mode and, after the dot, Current: the port in force. The note under the section says: The single port Cloudflare uses to reach this box for cf-mode domains. Choose it here — for example if you connected Cloudflare after install. All cf domains use this one port. There is one such port for the whole server — every domain served in the Via Cloudflare mode uses it; a domain has no port of its own.

  1. Choose a value in the Origin port field.
  2. Click Change port; while the check and the change run, the button reads Checking and applying….
  3. Qubix probes the new port from the outside, moves the server onto it and re-points every Cloudflare zone it manages to the new port, whichever Cloudflare account the zone is in: the main key's, a company key's or a personal key's. Qubix changes the zone of a domain connected with a personal key with the key of the domain's owner and changes only the Origin Rules rule with the port in it.

Domains connected through your own Cloudflare are the exception: Qubix doesn't change their zones, even if a key to the account is saved. When you choose a port other than the current one, the section lists them under the line Via your Cloudflare: for these domains the port in the Origin Rules rule is changed there, to …; with port 443, delete the rule: — the port in their Origin Rules rule is changed by the owner of the zone, in their own Cloudflare; with port 443 the rule is deleted. The server moves to the new port at once, and until the rule matches it, these domains may stop opening — warn the owners of these domains before the change.

If some Cloudflare zone managed by Qubix did not update, the panel names its domains, with the reason under each, in two lists. Under the first heading, Some Cloudflare zones did not update — these domains stayed on the old port and will not open until you retry the port change: are the domains a repeat takes over: the zone lookup ran out of time, or Cloudflare gave no answer — the connection dropped, or a page came instead of Cloudflare's answer. They stay on the old port and will not open until you repeat the port change. Under the second heading, These domains stayed on the old port: repeating the port change alone will not help. Remove the cause shown for each domain, then change the port again. are the domains a repeat alone will not help: the domain's zone was not found among the zones its account's Cloudflare key can see, Cloudflare keeps the domain's zone in a status other than active (the reason names it — pending, for example, until the domain's nameservers point to Cloudflare), the key of the zone's account is unavailable (for a personal account's zone — the domain owner's key was deleted), Cloudflare refused the request — rejected the key (a revoked one, for example), found it lacking a permission or named a reason of its own — or a redirect to another address came instead of an answer. Remove the cause shown for each domain, then change the port again. To apply the current port again, leave it selected and click Change port: the button stays available, the server stays where it is, and only the zones are rewritten.

The panel's own domain is different: if Qubix can't re-point its zone to the new port — the zone was not found (Cloudflare refused the lookup, the key doesn't see the zone, the lookup ran out of time) or Cloudflare keeps it in a status other than active, the key of the zone's account is unavailable, or Cloudflare did not accept the new rule in the zone (refused the write, the key may not edit the rules, the zone's rules could not be read) — the port is not changed at all. The panel names the domain and the reason, and the server stays on the current port or returns to it: otherwise the panel itself would stop opening through Cloudflare, and the port could no longer be changed back from it. Remove the cause, then change the port again. When the current port is applied again, nothing moves, so the panel's domain is named in the lists like any other domain.

Cloudflare error 521

If Cloudflare cannot reach your server on this port, the visitor sees a Cloudflare page with error 521 instead of the site: the origin server is unreachable. The cause is almost always the same — the port is closed in the host's inbound firewall. Open it with the command above and make sure the Cloudflare origin port section names the same port the server listens on.

What's next​