Closed GorgiAstro closed 4 years ago
OK my bad, when connecting to the web interface, I get a warning that suggests me to change the site URL... And it is possible to change it in the web interface settings.
@GorgiAstro It appears like you are using my script :) You can change Rocket.Chat environement variables like ROOT_URL in its systemd service in /etc/systemd/system/rocket.chat.service
Yes, but my question was if the site URL is defined by the environment variable ROOT_URL. Because the site URL when Rocket.Chat started (192.168.178.49) was different than the one (192.168.2.2) I had defined in the systemd service file. Now I fixed the site URL from the web interface, but maybe there is an issue in the Rocket.Chat startup process :)
After modifying it have you run systemctl daemon-reload
and then systemctl restart rocket.chat
?
@GorgiAstro I had a similar problem and solved it by dropping mongo database. It appears that ROOT_URL
is read and stored to mongo on first launch. So if you change it later it will be ignored.
@sekrett I'm having the same problem I miss-clicked the option and then my reverse proxy broke and I can't delete the whole database. Do you know which collection has the settings? Or how can I achieve your behavior?
@fzamperin no, I don't know. I dropped entire database.
I have been looking to change this setting for a while. I finally took the time to find it. I'm going to place it here in hopes that it will help someone else...
rocketchat->rocketchat_settings->Site_Url->value
breakdown for clarity rocketchat - db rocketchat_settings - collection Site_Url - Key value - field
Excellent and thank you @michaelgotchosen
Please write a short wiki page for us if possible with the above information.
For anyone who needed a little more clarification on @michaelgotchosen helpful post. You need to modify field in mongo db instance. open mongo shell -> use rocketchat -> db.rocketchat_settings.update({"_id" : "Site_Url"},{$set:{value:"NEW_URL"}})
Thanks. You saved me hours.
Does "packageValue" also need changing?
db.rocketchat_settings.update({"_id" : "Site_Url"},{$set:{packageValue:"NEW_URL"}})
Hello,
I have installed Rocket.Chat on my Raspberry Pi 3 (running up-to-date Raspbian Jessie) through the DPlatform installer. When I have installed it, the Raspberry Pi had a different IP address (192.168.178.49) than it has now (192.168.2.2).
The URL of Rocket.Chat is supposed to be defined at startup by the environment variable ROOT_URL. However, the systemd logs show that Rocket.Chat actually starts with the Site URL 192.168.178.49. On my laptop with the web interface or the Windows Rocket.Chat client, it is not an issue, but it is an issue for the Android and iOS clients: if the IP of the Raspberry Pi does not match the rocket.chat site URL, these clients do not want to connect.
In the systemd service file, this variable is correct:
However, the systemd logs show that the site URL is not the correct one:
Is there a config file defining the site URL? I could not find it.