Skip to content

Cloudflare Integration

License Required

Cloudflare integration requires the Cloudflare Integration license add-on. Without this license, the Cloudflare integration will not be available.

BadgerPanel integrates with Cloudflare to manage DNS records, tunnels, firewall rules, and view analytics directly from the panel.


Connecting Cloudflare

Navigate to Admin > Settings > Cloudflare and enter your Cloudflare credentials:

FieldDescription
API TokenA Cloudflare API token with permissions for DNS, Firewall, and Analytics on the target zone
Zone IDThe zone identifier for your domain, found on the domain overview page in Cloudflare
Account IDYour Cloudflare account identifier, found in the URL or sidebar of your Cloudflare dashboard

Click Save after entering your credentials.


Testing the Connection

After saving, click Test Connection to verify that the API token, zone ID, and account ID are valid and that BadgerPanel can communicate with the Cloudflare API. A success or failure message will appear immediately.


Settings

The Cloudflare settings page includes several toggles that control integration behavior:

SettingDescription
Enable/DisableMaster toggle for the entire Cloudflare integration
Auto-DNS for NodesAutomatically create A/AAAA records when nodes are added to the panel
Auto-SRV for Game ServersAutomatically create SRV records for game servers based on their egg's SRV mapping
Proxy by DefaultEnable Cloudflare proxy (orange cloud) on automatically created records

Egg SRV Mapping

Each egg can be configured with an SRV mapping type that determines how SRV records are created when a server using that egg is provisioned. Configure this from the egg editor.

Available mapping options:

MappingDescription
NoneNo SRV record is created
MinecraftCreates a _minecraft._tcp SRV record
TeamSpeak 3Creates a _ts3._udp SRV record
Arma 3Creates an _arma3._udp SRV record
CustomAllows specifying a custom service and protocol for the SRV record

DNS Management

Navigate to Admin > Settings > Cloudflare > DNS Management to view and manage DNS records for your zone.

Listing and Filtering

The DNS table lists all records in your Cloudflare zone. Use the filters to narrow results by:

  • Record type - A, AAAA, CNAME, SRV, MX, TXT, etc.
  • Name - search by record name

Records that were created by the panel display a Managed by BadgerPanel badge. These records are maintained automatically and will be updated or removed as nodes and servers change.

Creating Records

Click Create Record and fill in:

  • Type - the DNS record type
  • Name - the record name (subdomain or @ for root)
  • Content - the record value (IP address, hostname, etc.)
  • TTL - time to live (Auto or a specific duration)
  • Proxy - whether to route traffic through Cloudflare's proxy

Editing and Deleting Records

Click any record to edit its fields, or use the Delete button to remove it. Changes are applied to Cloudflare immediately.


Tunnels

Navigate to Admin > Settings > Cloudflare > Tunnels to manage Cloudflare Tunnels.

Creating a Tunnel

Click Create Tunnel and provide a name. BadgerPanel will create the tunnel in your Cloudflare account and display the connection token.

Status Indicators

Each tunnel displays a status indicator:

StatusDescription
HealthyTunnel is connected and passing traffic normally
DegradedTunnel is experiencing intermittent connectivity
DownTunnel is disconnected or unreachable

Deleting a Tunnel

Click Delete on a tunnel to remove it from both BadgerPanel and Cloudflare. Active connections through the tunnel will be terminated.


Firewall

Navigate to Admin > Settings > Cloudflare > Firewall to manage firewall rules.

Quick Actions

Use the quick action buttons to rapidly block or allow an IP address without creating a full rule.

Managing Rules

The rules table shows all active firewall rules with their action, target, and status. Click a rule to edit it or delete it.

Action Types

ActionDescription
BlockDeny all traffic from the matched source
ChallengePresent a CAPTCHA challenge before allowing access
AllowExplicitly permit traffic, bypassing other rules
LogRecord the request without taking any action

Analytics

Navigate to Admin > Settings > Cloudflare > Analytics to view traffic and security metrics.

Available Metrics

MetricDescription
BandwidthTotal data transferred, split into cached and uncached portions
RequestsTotal HTTP requests served through Cloudflare
Threats BlockedNumber of malicious requests blocked by Cloudflare
Cache RatePercentage of requests served from Cloudflare's cache

Time Period Selector

Use the time period selector to view analytics for different ranges - from the last 24 hours up to the last 30 days.

BadgerPanel Documentation