How to change Site URL?

Description

I know this seems like it would be simple, however I cannot figure it out. The Site URL value seems unchanged despite adjusting my configuration files, for example:

In docker-compose.yml
changing -
ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}}
to -
ROOT_URL: https://ELK-Stack.uhtasi.local

In .env I have the following settings -
ROOT_URL=https://ELK-Stack.uhtasi.local
DOMAIN=ELK-Stack.uhtasi.local

and recreating my docker container it still seems unchanged (see below log).

Server Setup Information

  • Version of Rocket.Chat Server: 6.10.0
  • Operating System: Linux CentOS 7
  • Deployment Method: docker compose
  • Number of Running Instances: 1
  • DB Replicaset Oplog: not sure
  • NodeJS Version: not sure
  • MongoDB Version: 5.0
  • Proxy: n/a
  • Firewalls involved: firewalld

Any additional Information

Despite applying the changes to my configs, this still comes up in the docker logs (Site URL still seems set to the localhost):

+-------------------------------------------------+
|                  SERVER RUNNING                 |
+-------------------------------------------------+
|                                                 |
|  Rocket.Chat Version: 6.10.2                    |
|       NodeJS Version: 14.21.3 - x64             |
|      MongoDB Version: 5.0.24                    |
|       MongoDB Engine: wiredTiger                |
|             Platform: linux                     |
|         Process Port: 3000                      |
|             Site URL: http://10.100.10.36:3000  |
|     ReplicaSet OpLog: Enabled                   |
|          Commit Hash: 822d32f76f                |
|        Commit Branch: HEAD                      |
|                                                 |
+-------------------------------------------------+

I mainly need to change because it also seems to be messing with my nginx set-up.

1 Like

So by changing this

ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}}

The compose file won’t read this from the env file.

ROOT_URL=https://ELK-Stack.uhtasi.local

So

ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}}

Means read the ROOT_URL from the env file OR use localhost

This:

DOMAIN=ELK-Stack.uhtasi.local

I don’t think is required anywhere? Except if you use Traefik? Not required for Nginx.

Set your compose file & .env correctly, remove the existing container with docker rm {container} and then up -d again to re-create the container.

I mainly need to change because it also seems to be messing with my nginx set-up.

ROOT_URL should be the EXTERNAL domain that you use to access Rocket. Not an internal one.

For nginx setup look at this.

‘server’ will be the IP of your server - either localhost if it is on the same machine or another local IP if rocket is hosted on another local machine.

https://docs.rocket.chat/docs/configuring-ssl-reverse-proxy

1 Like

No I mean I am putting the https://ELK-Stack.uhtasi.local directly in the docker-compose config, like without using any environmental variables for the ROOT_URL setting.

Ideally I would like to be able to access Rocket.Chat in the browser through https://ELK-Stack.uhtasi.local while also going through nginx.