Installing Pterodactyl Panel with Cloudflare Tunnel
This guide will walk you through installing Pterodactyl Panel and Wings behind a Cloudflared, including SFTP configuration. This setup eliminates the need to open ports for the panel, wings, or SFTP.
Table of Contents
Prerequisites
Port Forwarding Alternatives
Panel Installation
Wings Installation
Cloudflare Tunnel Configuration
SMTP Setup
SFTP Configuration
Troubleshooting
Prerequisites
Supported Operating Systems
Ubuntu 20.04, 22.04, 24.04
RHEL / Rocky Linux / Alma Linux 8, 9
Debian 11, 12
Requirements
Domain name (any registrar)
Domain configured with Cloudflare DNS
Port Forwarding Alternatives
While some game servers may require port forwarding, there are alternatives:
Playit.gg Integration
Manual Solution
Have customers use playit.gg individually
Requires manual port management
Automated Solution (In Development)
Automatic IP generation via playit.gg
Currently limited by lack of API
Requirements:
Manual IP creation or Playit team collaboration
Pterodactyl feature integration
Firewall implementation
Manual port forwarding for each customer
Potential for firewall feature with manual review
Panel Installation
1. Dependencies Installation
For Ubuntu 20.04 only:
Update and install packages:
2. Composer Installation
3. Panel Setup
4. Database Configuration
Access MySQL/MariaDB:
Create database and user:
5. Environment Setup
Configure environment:
Setup prompts:
Default egg author email: [Enter to skip]
Application URL:
https://panel.domain.com
Timezone: [Enter for UTC]
[Enter] x5
Cache driver: Type 'no'
[Enter] for remaining prompts
Database configuration:
Database prompts:
[Enter] x4
Enter database password
[Enter] to continue
6. Database Migration
7. Admin Account Creation
Follow prompts:
Type 'yes'
Email address
Username
First name
Last name
Password
8. Directory Permissions
9. Crontab Configuration
Add to crontab:
10. Queue Worker Setup
Create service file:
Add content:
Enable services:
11. Nginx Configuration
Remove default config:
Create SSL certificates:
Create Nginx configuration:
Add configuration:
Replace your_domain
with server's local IP (use ip a
).
For non-RHEL systems:
Restart Nginx:
Wings Installation
1. Docker Installation
2. Swap Configuration (Skip for WSL)
Edit GRUB configuration:
Add swapaccount=1
to GRUB_CMDLINE_LINUX_DEFAULT
, then:
3. Wings Setup
Cloudflare Tunnel Configuration
1. Create Tunnel
Access Cloudflare Zero Trust Dashboard
Navigate to Networks → Create a Tunnel
Name your tunnel
Choose Docker deployment
2. Deploy Tunnel
Modify the provided Docker command:
3. Configure Public Hostnames
Panel Configuration
Subdomain: panel
Type: HTTPS
URL: [local-IP]
Enable "No TLS Verify"
Wings Configuration
Subdomain: node
Type: HTTPS
URL: [local-IP]:8080
Enable "No TLS Verify"
4. Panel Node Configuration
Settings → Locations
Create new location
Nodes → Create New
Name: [your choice]
FQDN: node.domain.com
Memory: [set limit]
Disk: [set limit]
Update daemon port to 443
SMTP Setup
[In Progress - Email configuration documentation]
SFTP Configuration
Troubleshooting
Database Connection Issues
Verify credentials in .env
Check database service status
Confirm proper permissions
Cloudflare Tunnel Problems
Verify tunnel token
Check Docker logs
Confirm hostname configuration
Permission Issues
Verify directory ownership
Check service user settings
Confirm SSL certificate permissions
SSL Certificate Errors
Verify certificate paths
Check certificate validity
Confirm permissions
Additional Resources
Last updated