Cloudflare integration
Put your game servers behind Cloudflare, and keep their addresses updated for you.
License required
The Cloudflare integration needs the Cloudflare Integration license feature. Without it the Cloudflare tab does not appear.
BadgerPanel connects to one Cloudflare zone. From the panel you manage DNS records, tunnels, and firewall rules, and you read the Cloudflare analytics. The panel can also create DNS records for new nodes and new game servers by itself.
Navigate to Admin > Infrastructure > Network, then click the Cloudflare tab.
You need the Manage Cloudflare permission.
The page has five tabs: Overview, DNS, Tunnels, Firewall, and Analytics.
Overview tab
API configuration
| Field | Description |
|---|---|
| API Token | A Cloudflare API token. The token needs Zone:DNS:Edit and Zone:Zone:Read on the target zone. |
| Zone ID | The zone identifier of your domain. The Cloudflare overview page of the domain shows this value. |
| Account ID | Your Cloudflare account identifier. Tunnel management needs this value. |
Click Test Connection to check the credentials. On success the page names the zone and its status.
Settings
| Setting | Description |
|---|---|
| Enable Cloudflare Integration | The master switch for every Cloudflare feature. |
| Auto-create DNS for Nodes | Creates an A record when you add a node. |
| Auto-create SRV Records for Game Servers | Creates an SRV record when the panel deploys a game server. |
| Proxy by Default | Turns on the Cloudflare proxy (the orange cloud) on a new record. |
WARNING
The panel never proxies a node A record, even when Proxy by Default is on.
Click Save Settings to store the credentials, the toggles, and the egg SRV mappings.
Egg SRV mappings
This card appears only when Auto-create SRV Records for Game Servers is on. It lists every egg with a dropdown. The options are:
| Option | Result |
|---|---|
| None (no SRV record) | The panel creates no SRV record for a server with this egg. |
| Minecraft (_minecraft._tcp) | The panel creates a _minecraft._tcp SRV record. |
| TeamSpeak 3 (_ts3._tcp) | The panel creates a _ts3._tcp SRV record. |
| Arma 3 (_arma3._tcp) | The panel creates an _arma3._tcp SRV record. |
| Custom | You give your own service name. |
What the panel automates
| Event | Result |
|---|---|
| You add a node | The panel creates an A record for the node hostname, with an automatic TTL and no proxy. |
| You delete a node | The panel deletes every record that it created for that node. |
| The panel deploys a server | If the egg of that server has an SRV mapping, the panel creates an SRV record. The target is the node hostname and the port is the primary allocation. |
| You delete a server | The panel deletes the records that it created for that server. |
The panel marks each record that it creates. The DNS tab shows a BadgerPanel badge on those records.
Automation is panel-wide. The node form and the server form hold no Cloudflare options.
DNS tab
This tab lists the records in your zone.
Filter the list with the type dropdown (All Types, A, AAAA, CNAME, SRV, TXT, MX) and with the search box.
| Column | Description |
|---|---|
| TYPE | The record type. |
| NAME | The record name. |
| CONTENT | The record value. |
| PROXIED | Proxied or DNS only. |
| MANAGED | A BadgerPanel badge on a record that the panel created. |
| ACTIONS | A bin icon to delete the record. |
Click the bin icon and confirm to delete a record from Cloudflare.
TIP
This tab has no create control and no edit control. Add a record by hand in the Cloudflare dashboard.
Tunnels tab
This tab needs the Account ID in the Overview tab.
To create a tunnel, type a name in the box, then click Create. The panel creates the tunnel in your Cloudflare account.
Each tunnel is a card with a status dot, the tunnel name, the tunnel identifier, and the number of connections.
| Dot colour | Meaning |
|---|---|
| Green | The tunnel is healthy. |
| Yellow | The tunnel is degraded. |
| Red | The tunnel is down. |
| Grey | The state is unknown. |
Click the bin icon and confirm to delete a tunnel. Any route through that tunnel then stops.
Firewall tab
Quick actions
Two cards handle one address at a time:
- Quick Block IP - enter an address, then click Block.
- Quick Allow IP - enter an address, then click Allow.
Rules table
| Column | Description |
|---|---|
| ACTION | The rule action. Red marks a block. Green marks an allow. |
| DESCRIPTION | The rule description. |
| EXPRESSION | The Cloudflare rule expression. |
| DELETE | A bin icon to delete the rule. |
Analytics tab
Choose the period with the Last 24 Hours, Last 7 Days, and Last 30 Days buttons.
| Card | Description |
|---|---|
| Total Bandwidth | The data transfer, with the cached part below it. |
| Total Requests | The number of HTTP requests, with the cached part below it. |
| Threats Blocked | The number of attacks that Cloudflare stopped. |
| Cache Rate | The percentage of requests that came from the Cloudflare cache. |
