Nginx reverse proxy with cloudflare (Panel not loading)

PhantomBot Version: 3.0.0 (Revision: fcc08b51)
OS Version: Linux
Java Version: 1.8.0_212-8u212-b01-1~deb9u1-b01
Browser and Version (for Panel Support): 1.0.0
Stock PhantomBot: Yes

I followed this guide and managed to got it somewhat working.

Nginx listen on port 443 and points to https://localhost:25000

I enable HTTPS for PhantomBot and changed the panel port to 2053 (since the guide said that Cloudflare doesn’t allow the default port).

Accessing the bot directly using the external IP works as expected. I do get the “Not secure” red cross by Chrome but that would be because the cert is for the domain.

When accessing through the domain (Cloudflare), the main page loads up perfectly fine but when clicking the panel and logging in, the page is stuck on loading. Similar to this.

I do have all the ports open. 80, 443, 25000-25004, 2053. I’m not that well versed in all of these, but I’m sure I did something wrong with Nginx reverse proxy since accessing through the IP works fine.

One thing to mention is that in Chrome console when clicking the panel, it tried to connect the panel at 25004 and failed. I did a double check and PhantomBot is accepting connections on port 2053 for the panel. I’m not sure why that’s the case.

Hope this can be resolved. Thank you in advance and do let me know if I miss any key information.

Based on your last sentence, try to do this once from the PhantomBot directory (where lives):

Stop PhantomBot
rm web/panel/js/utils/panelConfig.js
Start PhantomBot

PhantomBot will regenerate at the next boot (as long as it has permissions in the directory to do so, although it should be regenerating it every time - which makes me wonder if you have something else going on).

Perfect! Thank you so much @IllusionaryOne

There are a few things left. When accessing the panel, I’m getting some yellow warning in Chrome console. I assume this can be ignored?

Once again, thank you!

1 Like

Can be ignored.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.