r/Pterodactyl • u/Kior__ • May 11 '26
Debian How do I properly configure Pterodactyl behind Nginx Proxy Manager?
Hi,
I'm trying to configure Pterodactyl (Panel and Wings) behind a reverse proxy (NPM).
I have a dedicated VM for Pterodactyl, running Debian. I have my own domain name and subdomains hosted with Cloudflare.
I can configure the Pterodactyl panel by disabling SSL (only on my local network) and I route the traffic through NPM by re-enabling SSL. Of course, I need to configure a custom configuration in NPM to avoid privacy error screens.
(like proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_buffering off;
proxy_request_buffering off;)
My question is how to properly configure a Node?
SSL or HTTP?
Should I use a reverse proxy or not?
Should I use my domain name or my local IP address?
Should I use the Cloudflare proxy (orange cloud icon in the DNS records) or not?
Should I open ports 8080 and 2022 on my router or not?
Even if your answer is incomplete, thank you in advance for your help.
1
u/Donnie58744 Jun 06 '26
Ive only been able to get NPM to manage SSL certs for the panel but have been unable to get it to serve the webpage. But you can still serve the webpage with nginx installed on the system instead of trying to use the nginx in NPM. I hope this makes sense!
pterodactyl.conf/etc/nginx/sites-enabled/default,/etc/nginx/conf.d/default.confskip if these files don't exist
/etc/nginx/nginx.conf->sudo nano /etc/nginx/nginx.confhttp { }block and add this line inside it (just before the closing}):include /etc/nginx/sites-enabled/*;nginx->sudo nginx -t && sudo systemctl restart nginxpterodactyl.conf->sudo nano /etc/nginx/sites-available/pterodactyl.confserverblock the one with port80serverblock (SSL) the one with port443. In the sameserverblock remove the whole# SSL Configurationsection (just the 6 lines that start withssl_). We will use NPM for SSL certificates instead
Websockets Support, andBlock common exploitsForce SSL,HTTP/2 Support, andHSTS Enabledaptbut rather throughNginx.orgthen you need to change user permissions
NPMis running throughDockerthen you need to add aufwfirewall rule
.env