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:
| Field | Description |
|---|---|
| API Token | A Cloudflare API token with permissions for DNS, Firewall, and Analytics on the target zone |
| Zone ID | The zone identifier for your domain, found on the domain overview page in Cloudflare |
| Account ID | Your 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:
| Setting | Description |
|---|---|
| Enable/Disable | Master toggle for the entire Cloudflare integration |
| Auto-DNS for Nodes | Automatically create A/AAAA records when nodes are added to the panel |
| Auto-SRV for Game Servers | Automatically create SRV records for game servers based on their egg's SRV mapping |
| Proxy by Default | Enable 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:
| Mapping | Description |
|---|---|
| None | No SRV record is created |
| Minecraft | Creates a _minecraft._tcp SRV record |
| TeamSpeak 3 | Creates a _ts3._udp SRV record |
| Arma 3 | Creates an _arma3._udp SRV record |
| Custom | Allows 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:
| Status | Description |
|---|---|
| Healthy | Tunnel is connected and passing traffic normally |
| Degraded | Tunnel is experiencing intermittent connectivity |
| Down | Tunnel 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
| Action | Description |
|---|---|
| Block | Deny all traffic from the matched source |
| Challenge | Present a CAPTCHA challenge before allowing access |
| Allow | Explicitly permit traffic, bypassing other rules |
| Log | Record the request without taking any action |
Analytics
Navigate to Admin > Settings > Cloudflare > Analytics to view traffic and security metrics.
Available Metrics
| Metric | Description |
|---|---|
| Bandwidth | Total data transferred, split into cached and uncached portions |
| Requests | Total HTTP requests served through Cloudflare |
| Threats Blocked | Number of malicious requests blocked by Cloudflare |
| Cache Rate | Percentage 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.
