
Quick answer: Cloudflare Tunnel and Zero Trust Access are excellent for a private Pterodactyl web panel because
cloudflared makes an outbound connection and the origin no longer needs a public web listener. They are not a universal proxy for Wings SFTP or Minecraft allocation ports. Design each protocol separately, or the Panel may look protected while nodes and game traffic remain exposed or stop working.Last reviewed: 31 August 2026 against current Cloudflare One and Pterodactyl 1.x documentation.
Choose the correct protection model
| Traffic | Recommended path | Important limitation |
|---|---|---|
| Private administrator Panel | Cloudflare Tunnel + Access | Every human and automated client must satisfy Access policy |
| Public customer Panel | Proxied DNS + Full (strict) TLS, WAF and rate controls | Access login can obstruct customers and integrations |
| Wings API/WebSocket | Direct TLS, private network, or carefully designed proxy | Official docs say proxying Wings provides little benefit because game ports expose the node IP |
| Wings SFTP (normally 2022) | Direct TCP with firewall controls | Normal public Tunnel hostnames stream TCP through a WebSocket and require a client-side Cloudflare connector |
| Minecraft allocations | Direct UDP/TCP or a dedicated game-traffic protection service | The standard orange-cloud proxy does not proxy arbitrary Minecraft ports |
This distinction is the central design decision. Cloudflare can hide and authenticate your web origin without hiding the game node that players must reach directly.
1. Prepare a local-only Panel origin
Complete a normal Pterodactyl Panel installation first. Confirm it works locally before adding a tunnel. When
cloudflared runs on the Panel server, the published application can target http://127.0.0.1:80 or another local port.Where practical, bind the origin web server to loopback or block public ingress to its web ports after Tunnel is healthy. Keep an emergency access path such as provider console or a VPN so an Access or DNS mistake does not lock out administrators.
2. Create Access before publishing the route
Cloudflare recommends creating the Access application before the Tunnel route. Otherwise the hostname is public during the gap.
- In Cloudflare Zero Trust, open Access controls > Applications.
- Create a Self-hosted application for the exact Panel hostname.
- Add an Allow policy limited to your identity provider group, verified email domain or explicit administrator emails.
- Set a session duration appropriate for an administration panel. Shorter is safer on shared devices.
- Add an immediate Block fallback for everyone else.
Access is an outer identity gate. It does not replace Pterodactyl accounts, permissions or two-factor authentication. Keep both layers.
3. Create the Cloudflare Tunnel
In the current dashboard, go to Networking > Tunnels, create a named tunnel and install
cloudflared using Cloudflare's command for your server. The connector token is a secret; store it locally and never paste it into support chats.Add a published application route:
- Hostname:
panel.example.com - Service:
http://127.0.0.1:80when Nginx terminates locally, or the exact local service you designed - Access protection: enable the application created before the route
Cloudflare Tunnel supports WebSockets, which Pterodactyl's browser console needs. You should not add caching to authenticated Panel routes.
4. Configure Pterodactyl for a reverse proxy
Set
APP_URL=https://panel.example.com. Pterodactyl's reverse-proxy documentation also requires trusted proxy configuration so generated URLs, client IP handling and secure-request detection work correctly.Avoid leaving
TRUSTED_PROXIES=* permanently when you can specify the actual local proxy path or trusted addresses. With cloudflared and Nginx on the same machine, loopback is often the relevant proxy hop, but confirm your own request path rather than copying a value blindly.After editing
.env:
Bash:
cd /var/www/pterodactyl
sudo php artisan optimize:clear
sudo systemctl restart pteroq
sudo systemctl reload nginx
5. Protect automated clients correctly
Cloudflare Access service tokens are credential pairs for non-browser clients. A Service Auth policy accepts the token through
CF-Access-Client-Id and CF-Access-Client-Secret headers.Do not assume Wings or every Pterodactyl integration can add those headers. Before putting Access in front of an endpoint:
- Identify every browser, API client, webhook and node that calls it.
- Confirm the client can present Access credentials.
- Create a separate, narrowly scoped service token.
- Store its secret in a vault or local protected configuration.
- Set rotation and expiry reminders.
- Test before enforcing the policy.
If a machine client cannot send Access headers, use a separate hostname or a private network path instead of weakening the human login policy.
6. Treat Wings as a separate trust boundary
Pterodactyl documents Wings API traffic on 8080 or 8443 and SFTP on 2022. It also warns that Cloudflare proxying Wings is not particularly beneficial because players connect directly to allocation ports and reveal the node IP.
If you choose to proxy a Wings hostname through the ordinary Cloudflare proxy, the official configuration notes using a supported HTTPS port such as 8443. That does not proxy SFTP. It also does not protect the Minecraft allocations.
For most operators, the clearer model is:
- Panel web traffic through Tunnel or proxied HTTPS.
- Panel-to-Wings API over direct TLS or a private network.
- SFTP direct on 2022 with authentication and firewall/rate controls.
- Game allocations direct or behind a purpose-built game proxy/protection service.
Continue with the Pterodactyl Wings hardening guide for Docker, firewall and port-specific controls.
7. Validate the deployment
- From an unauthorized browser, confirm Access blocks the Panel before Pterodactyl loads.
- From an authorized browser, log in and open a server console for at least several minutes.
- Check browser developer tools for failed WebSocket, API, CORS or mixed-content requests.
- Confirm the origin web port is no longer reachable directly from the Internet if Tunnel is meant to hide it.
- Verify Panel-to-Wings communication independently.
- Verify SFTP with a normal client independently.
- Join a game server through its allocation independently.
- Restart
cloudflaredand reboot the server to confirm systemd recovery. - Review Access logs for expected identities and service tokens.
What Cloudflare Zero Trust does not solve
- A compromised Pterodactyl administrator account.
- Weak node SSH keys or a publicly exposed Docker API.
- Unsafe plugins running inside game containers.
- DDoS traffic sent directly to Minecraft allocation ports.
- Lost APP_KEY or untested backups.
- Over-permissive Pterodactyl roles.
Primary sources
- Cloudflare: Set up Cloudflare Tunnel
- Cloudflare: Publish a self-hosted application
- Cloudflare: Service tokens
- Cloudflare Tunnel FAQ and WebSocket support
- Pterodactyl: Reverse proxy configuration
- Pterodactyl: Wings additional configuration
Build an environment-specific plan with the free Pterodactyl Installation Prompt Generator, or ask Shyam Studio to review a production deployment.
Attachments
Last edited: