RocketChat / RocketChat/Rocket.Chat
ROOT_URL env var is ignored after first run
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
The ROOT_URL environment variable is ignored after first run. Instead db.rocketchat_settings.Site_Url from mongodb is used.
There are even blogposts about this issue: https://www.ryadel.com/en/rocket-chat-change-root_url-site-url-rocketchat/
Steps to reproduce:
- Install rocketchat
- set
ROOT_URLin the systemd service file - start and setup rocketchat
- stop rocketchat
- change
ROOT_URLin the systemd service file - start rocketchat
Expected behavior:
Site_Url gets updated after every restart of rocketchat. Even better would be to not store it in mongodb at all to enable gracefull migration of parts of a cluster or use different values based on for example the used frontend url for this instance.
Actual behavior:
Site_Url (used for example for oauth redirects) is still set to the old value
Server Setup Information:
- Debian Buster
- Deployment Method: tar
- Rocketchat Version 3.12.3
- Number of Running Instances: 2
- Apps Engine Version 1.23.0
- Node Version v12.22.0
- Database Migration218 (April 3, 2021 4:11 PM
- MongoDB 4.2.13 / wiredTiger (oplog Enabled)
Client Setup Information
- any
Relevant logs:
should not be needed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how ROOT_URL is read during startup and how db.rocketchat_settings.Site_Url is persisted and used for OAuth redirects. Reproduce the restart scenario with two instances, then verify that the configured URL is handled consistently after every restart without breaking existing settings behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, typescript
- Domain
- authentication, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100