How to install Ptero-panel With Cloudflare Tunnel
Step 1/6
apt update && apt install curl -y
Step 2/6
bash <(curl https://pterodactyl-installer.se)
- type in your domain/subdomain, for example panel.kynexlabs.com
- no ufw
- HTTPS using Let's Encrypt? type n
- Assume SSL? type y
- agree HTTPS request? type n
##############################################################
* Hostname/FQDN: sub.domain
* Configure Firewall? false
* Configure Let's Encrypt? false
* Assume SSL? true
##############################################################
Step 3/6
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /2.pem -out /1.pem -subj "/CN=localhost"
sed -i 's|^\s*ssl_certificate\s\+.*| ssl_certificate /1.pem;|' /etc/nginx/sites-available/pterodactyl.conf
sed -i 's|^\s*ssl_certificate_key\s\+.*| ssl_certificate_key /2.pem;|' /etc/nginx/sites-available/pterodactyl.conf
sed -i 's/\b443\b/8443/g; s/\b80\b/8000/g' /etc/nginx/sites-available/pterodactyl.conf
systemctl restart nginx
Step 4/6 - Cloudflare Tunnel
Go to one.dash.cloudflare.com
- Network → Tunnels → Create Tunnel
- Select cloudflared, name it whatever you want
- Choose Debian → click under "If you don’t have cloudflared installed on your machine"
- Paste the copied install command into the VPS shell
- Then click under "After you have installed cloudflared on your machine, you can install a service to automatically run your tunnel whenever your machine starts"
- Again, Paste the copied install command into the VPS shell.
- Now click next, use the same subdomain Enter Your Subdomain
- Service Type: https
- Service URL: localhost:8443
- Additional Settings → TLS → enable "No TLS Verify"
- Click save hostname
Go to https://sub.domain (or whatever your subdomain is) and check if it works.
if it works; Congrats, You've setup the panel properly.
Step 5/6 (Wings)
- Do step 1 again, but select 1 this time
- Say y to "Unsupported type of virtualization"
- n to UFW, DB user, Let's Encrypt
- Refer to step 4, but in Cloudflare: tunnel name → edit → public hostnames → add new
- Use the node subdomain enter your subdomain)
- Service URL: localhost:443
- Additional Settings → TLS → enable "No TLS Verify"
apt install screen -y && screen -S 10
Step 6/6 (Still Wings)
- Login to panel
- Admin → Locations → Create one (for me: US1)
- Admin → Nodes → Add node (name it whatever)
- Daemon Port: 443
- SSL: Not Behind Proxy
- Use the node subdomain as the FQDN (for me: node.KynexLabs.com)
- Copy config token and Paste As usual
If panel and node are on different hosts:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /2.pem -out /1.pem -subj "/CN=localhost"
sed -i 's|^\(\s*cert:\s*\).*|\1/1.pem|' /etc/pterodactyl/config.yml
sed -i 's|^\(\s*key:\s*\).*|\1/2.pem|' /etc/pterodactyl/config.yml
systemctl restart wings
If panel and node are on the same host:
sed -i 's|^\(\s*cert:\s*\).*|\1/1.pem|' /etc/pterodactyl/config.yml
sed -i 's|^\(\s*key:\s*\).*|\1/2.pem|' /etc/pterodactyl/config.yml
systemctl restart wings
See if there is a green heart, if yes; Congrats, You've setup wings properly.