I wanted to test Rocket.Chat, so I installed it locally via Docker on Windows 10. Everything worked very well, and I was able to get into the admin panel, register myself, and also connect to the desktop app. Then, I wanted to get the mobile app running on Android but ran into an issue. I couldn’t use localhost as the server IP. I looked up my computer’s IP and tried that with various combinations (with and without http, with and without port 3000), but I kept getting a “network request failed” message.
To ensure the ports were open correctly, I tried accessing the admin panel on my mobile phone. Interestingly, when I used my computer’s IP on port 3000, I could reach the admin panel on my phone, which means that all ports are open and that the IP address is technically correct.
Additionally, I tried something else: I typed in the PC address and port 3000 in my browser, and I was able to reach the admin panel. Rocket.Chat then asked me to change the server address, which I confirmed. However, after confirming, I can no longer reach the admin panel.
So, my question is: Why is the mobile app not accepting that IP address? Is there a trick to getting the mobile app running locally? And why can’t I reach the admin panel after changing the server address as prompted by Rocket.Chat?
To be brutally honest, Rocket is designed to run on a standalone server, and really to use a reverse proxy and SSL certs for security.
Trying to run it on a Windows desktop is OK if you want to test ON THAT DESKTOP but pretty well useless otherwise. It is not a supported configuration for proper deployment. You have done well it get it running!
Firewalls will fight you, because it is designed as a desktop, not a server.
The iOS app won’t even connect to Rocket without a SSL certificate.
Android may, but will likely sulk
I couldn’t use localhost as the server IP
You need to understand more about networking. There are squillions of pages out there and it will be worth your time reading some basic stuff.
localhost = 127.0.0.1 = THIS MACHINE
No one else on your network can access that. 127.0.0.1 on say a Android phone will resolve to itself, not your desktop,
Interestingly, when I used my computer’s IP on port 3000, I could reach the admin panel on my phone, which means that all ports are open and that the IP address is technically correct.
Perfectly normal. You can only access your desktop remotely by connecting to its own IP address on your local network assuming your firewall is open with the correct ports (we won’t go into accessing it from an address OUTSIDE your local network)
Rocket.Chat then asked me to change the server address,
And that is where it all went wrong as you didn’t understand what that actually meant.
So you changed it to a domain name (not address) that will not resolve on your network, and that broke it.
If you told the machine it was chat.mydesktop.localnetwork that name actually needs to resolve on your network to your desktop. When other devices look for chat.mydesktop.localnetwork it needs to resolve to the IP address of your desktop and likely it doesn’t.
Have a read about DNS etc.
A lot of your issues will be resolved by doing the long hard yards of learning - such is the life of a systems administrator
Please ask if we can explain or help further.
I wrote this some years ago.
The bit here may help you (I am not trying to annoy you or put you down - we all started knowing nothing, but some of the links here made me re-address how I tackled problems 30+ years ago )
One of the big issues I have with modern IT and places like M$ is they dumb everything down and then users get stuck and frustrated if they can’t simply point and click.
Education is the key, so if we can help that then it is a win