Phantombot over SSL giving: WebSocket Disconnected - Retrying Connection Every 5 Seconds



Maybe it’s wiser to use the dev version for this type of problem, but regardless:

I’ve set up phantombot on my server to use ssl on a subdomain in conjunction with the java keystore (How to Setup PhantomBot with NGINX as a Reverse Proxy and Cloudflare and How to Enable SSL on PhantomBot). It seems that everything went alright when following these 2 guides (they seem pretty straightforward).

The problem is that if I attempt to connect to the panel it’s just not connecting properly, and gives the ‘WebSocket Disconnected - Retrying Connection Every 5 Seconds’. When launching phantombot in a panel it does not give any errors at all, it’s just connecting to the usual accounts and channels as it should. It’s just the panel that errs. The connection itself is over https and seems fine.

When using plain http and connecting locally everything was working decently. But isn’t running phantombot over http a bit of a risk? This is my homeserver, i’d like to have it as safe as possible.

(I’ll add that the yt-player has never worked yet…not locally nor over https, so let’s leave that out for now. I was originally thinking to fix that later, as it’s not that important for now. I’d really like the panel to work over https first.)

I’m not entirely sure what other info you would like to have, so please go ahead and let me know what you need to know.


Sorry, I forgot to put this clearly: This is all on the most recent stable version.


Did you update the port that the web socket runs on? Cloudflare limits you to certain ports for SSL. Also, running PB with just HTTP doesn’t matter, there’s no important information being transferred.


sorry I didn’t put this clearly: This is not using cloudflare. I just used the nginx configuration from the guide that’s given. If it’s really safe to go http then I might stick to that for the time being and give it another shot in a little while.


Well I did set up an AAA instead of a CNAME. I’ll try that first.


I’ll stick to http for now and will retry in a few weeks.


Time for some necrobumping: I retried and things were ‘automagically’ working at first try.

In short, the error was on my side:
I use openrc instead of systemd and as of now only have written a half-baked init that is incapable of properly closing phantombot. However, with every restart of nginx it is imperative that phantombot is restarted, otherwise the ‘websocket disconnected’ message will appear. This in itself is probably not perfect (?). Should i open a new thread or file a bug report about this?

Also, I have to manually add port 25000 to the url ( This is fixed in future versions right?


I can restart PhantomBot just fine while nginx is running, also, if you have to enter a port, your reverse proxy isn’t working. Now if you do need to restart nginx every time, we can’t do much about it, it’s more of an “issue” on nginx’s side.


Luckily I don’t need to restart nginx every time, so it’s not going to be too cumbersome. I’ll have another look at it in a little while and see if I can make some more progress then. Things are fine now though, the most important thing, a secure ssl connection to with a fully functional phantombot, is working.


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