RocketChat / RocketChat/Rocket.Chat
Can not upload and image with ROOT_URL change, Changing Root Url does not affect ${ __meteor_runtime_config__.ROOT_URL_PATH_PREFIX }
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I am runnning 4 instances of Rocketchat behind Nginx. My root URL is https://xx.yyyy.com. I am using pm2 with example-pm2.json and modified it to reflect the ROOT_URL and port. With the app comes up fine and Chat is working fine. But when I try to upload an image/file in to the chat, it still seems to try to connect http://localhost:3000/ufs so the upload is failng. Also I noticed that even after the root url change the RocketChat.settings.get('Site_Url') always returns localhost:3000
Server Setup Information:
- Version of Rocket.Chat Server:
- Operating System:
- Deployment Method(snap/docker/tar/etc):
- Number of Running Instances:
- DB Replicaset Oplog:
- Node Version:
- mongoDB Version:


This can also be reproduced in the local with a single instance.
Steps to Reproduce:
- Change the root url in to localhost:3333 from localhost:3000.
- run the example-build-run.sh
3.try to upload an image.
Expected behavior:
An image is uploaded and shows up in the chat window.
Actual behavior:

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 with the ROOT_URL configuration and the example-build-run.sh entry point, then reproduce the upload using localhost:3333 while checking meteor_runtime_config.ROOT_URL_PATH_PREFIX and the /ufs target. Done means an image uploads successfully through the changed root URL instead of attempting localhost:3000.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nginx
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100