# How to change ROOT\_URL in docker-compose with everything up

**URL:** <https://forums.rocket.chat/t/how-to-change-root-url-in-docker-compose-with-everything-up/11573>\
**Category:** Community Support\
**Created:** [July 5, 2021, 6:56pm UTC](https://forums.rocket.chat/t/how-to-change-root-url-in-docker-compose-with-everything-up/11573 "2021-07-05T18:56:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinculo](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@vinculo](https://forums.rocket.chat/u/vinculo)\
**Post date:** [July 5, 2021, 6:56pm UTC](https://forums.rocket.chat/t/how-to-change-root-url-in-docker-compose-with-everything-up/11573/1 "2021-07-05T18:56:46Z")

</div>

Hello, im here to ask about a little thing that i didnt find how to solve it,  
i have my rocket chat running after a docker-compose, for an accident i started it as localhost:3000 and now im getting some problems because of that, so i have to change it to my domain adress instead of “localhost”.

rocketchat:  
image: registry.rocket.chat/rocketchat/rocket.chat:3.13.5  
command: \>  
bash -c  
“for i in `seq 1 30`; do  
node main.js &&  
s=$$? && break || s=$$?;  
echo “Tried $$i times. Waiting 5 secs…”;  
sleep 5;  
done; (exit $$s)”  
restart: unless-stopped  
volumes:  
- ./uploads:/app/uploads  
environment:  
- PORT=3000

```
  - ROOT_URL=http://localhost:3000 >>> MY DOMAIN
           /\ ------ This is what i want to change
  

  - MONGO_URL=mongodb://mongo:27017/rocketchat
  - MONGO_OPLOG_URL=mongodb://mongo:27017/local
  - MAIL_URL=smtp://smtp.email

```

I would be very grateful if someone could help me with this little problem

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [July 5, 2021, 7:40pm UTC](https://forums.rocket.chat/t/how-to-change-root-url-in-docker-compose-with-everything-up/11573/2 "2021-07-05T19:40:14Z")

</div>

HI!

You can change the ROOT\_URL environment variable, then issue the command, where you docker-compose.yml is:

`docker-compose up -d`

it will recreate the container, changing the root\_url to what you want. While this happens, Rocket.Chat will be unavailable until it start up again.

Also, if you want to upgrade, change the version at the image attribute to the latest one.

Of course, do some backups before 🙂

Happy Rocking!

---

<div class="post-metadata">

**Author:** ![vinculo](https://avatars.discourse-cdn.com/v4/letter/v/67e7ee/32.png) [@vinculo](https://forums.rocket.chat/u/vinculo)\
**Post date:** [July 5, 2021, 7:52pm UTC](https://forums.rocket.chat/t/how-to-change-root-url-in-docker-compose-with-everything-up/11573/3 "2021-07-05T19:52:15Z")

</div>

Thank you very much!!!

(pelo seu nome aparentemente vc é br, me salvou demais hahahaha)

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [July 5, 2021, 8:02pm UTC](https://forums.rocket.chat/t/how-to-change-root-url-in-docker-compose-with-everything-up/11573/4 "2021-07-05T20:02:55Z")

</div>

Tamo junto, parça 😉

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [July 6, 2021, 9:30am UTC](https://forums.rocket.chat/t/how-to-change-root-url-in-docker-compose-with-everything-up/11573/5 "2021-07-06T09:30:26Z")

</div>

Please mark as ‘Solved’ if this fixes your issue.

Thanks.
