An Nginx manager built using Next.js 13 & Tailwind CSS that lets you easily reverse proxy your Pterodactyl Panel servers using a normal proxy or a secure one
This project is in its early stages and shouldn't be used in production! This should be installed on every node that you would like to reverse proxy so the traffic is as secure as it can be. Please install and run this as a root user to prevent issues.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 18
npm use 18
sudo apt-get install nginxmkdir /var/www/pterotunnel
cd /var/www/pterotunnelcurl -Lo pterotunnel.zip https://github.com/kragleh/pterotunnel/releases/latest/download/pterotunnel.zip
unzip pterotunnel.zipcp .env.example .env
nano .envWarning! Dont use an url with / at the end of it!
panel - Is your Pterodactyl panel url Ex: https://panel.example.host
tunnel - Is the url you are accessing this from Ex: https://tunnel-node.example.host
npm installnpm run buildnpm install -g pm2
pm2 start npm --name pterotunnel -- run start
pm2 save
pm2 startupnano /etc/nginx/sites-enabled/pterotunnel.confPaste this below to the nginx configuration file and replace %domain% with your domain
server {
listen 80;
server_name %domain%;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name %domain%;
ssl_certificate /var/www/pterotunnel/ssl/tunnel/proxy.crt;
ssl_certificate_key /var/www/pterotunnel/ssl/tunnel/proxy.key;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8888;
}
}
Add your certificate using these commands
# For certificate
nano /var/www/pterotunnel/ssl/tunnel/proxy.crt
# For key
nano /var/www/pterotunnel/ssl/tunnel/proxy.keyRestart nginx to apply changes
systemctl restart nginx