# RocketChat with Suffix in ROOT\_URL working only in API Calls and it's failing in WEB UI

**URL:** <https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868>\
**Category:** Community Support\
**Tags:** rocketchat-apps\
**Created:** [September 25, 2023, 1:44pm UTC](https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868 "2023-09-25T13:44:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![karunakaran](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@karunakaran](https://forums.rocket.chat/u/karunakaran)\
**Post date:** [September 25, 2023, 1:44pm UTC](https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868/1 "2023-09-25T13:44:35Z")

</div>

Hi Team,

We have deployed rocket chat application in Kubernetes cluster by using helm chart and we have provided -“-set host=devdomaincom/rocketchat”

Post deployment , i am able to hit the API Calls but Web UI not realize the context path and directly going with default API Calls

example :

**Require** : [http://dev.domain.com/rocketchat/admin/settings](http://dev.domain.com/rocketchat/admin/settings)  
**getting response :** [http://dev.domain.com/admin/settings](http://dev.domain.com/admin/settings)

chat version: rocketchat-6.4.1  
App version: 6.3.4  
Image : registry.rocket.chat/rocketchat/rocket.chat:6.3.4

Could you please help me if i missed anything during deployment or else should we pass more variable during helm installation.

Note: set host=devdomaincom/rocketchat , removed the dots , since i am not able to add more that 2 links

Thanks,  
Karunakaran

---

<div class="post-metadata">

**Author:** ![stefan.badenhorst](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@stefan.badenhorst](https://forums.rocket.chat/u/stefan.badenhorst)\
**Post date:** [September 27, 2023, 11:10am UTC](https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868/2 "2023-09-27T11:10:04Z")

</div>

Try also setting the `Site_Url`  
I’m using ENV vars `ROOT_URL` and `OVERWRITE_SETTING_Site_Url`

---

<div class="post-metadata">

**Author:** ![karunakaran](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@karunakaran](https://forums.rocket.chat/u/karunakaran)\
**Post date:** [September 28, 2023, 6:51am UTC](https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868/3 "2023-09-28T06:51:46Z")

</div>

@stefan.badenhorst thanks for the response,

i have made site\_Url setting in Web UI as per my need also below ENV cars i have set under my RC deployment configuration.

Current Site URL : [https://dev.domain.com/rocketchat/](https://dev.domain.com/rocketchat/)

- name: ROOT\_URL  
value: [https://dev.domain.com/rocketchat/](https://dev.domain.com/rocketchat/)
- name: OVERWRITE\_SETTING\_Site\_Url  
value: [https://dev.domain.com/rocketchat/](https://dev.domain.com/rocketchat/)

But still i am facing same issue , API Calls are working fine only in WEB UI i am not able to navigate to any of the fields and it’s working when i hit the exact URL.

Example:

Working if i use this URL’s directly :

[https://dev.domain.com/rocketchat/admin/settings](https://dev.domain.com/rocketchat/admin/settings)  
[https://dev.domain.com/rocketchat/admin/rooms](https://dev.domain.com/rocketchat/admin/rooms)  
[https://dev.domain.com/rocketchat/admin/users](https://dev.domain.com/rocketchat/admin/users)  
[https://dev.domain.com/rocketchat/channel/general](https://dev.domain.com/rocketchat/channel/general)  
[https://dev.domain.com/rocketchat/group/testing](https://dev.domain.com/rocketchat/group/testing)

Above fields are not working if i click on the WEB UI.

Can you please help us if i missed any configuration during the deployment of helm chat. Also let me know if i need to add any ENV vars in the deployment confuguration.

---

<div class="post-metadata">

**Author:** ![stefan.badenhorst](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@stefan.badenhorst](https://forums.rocket.chat/u/stefan.badenhorst)\
**Post date:** [September 28, 2023, 8:36am UTC](https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868/4 "2023-09-28T08:36:06Z")

</div>

I don’t know if this will help you, but this is an example setup:

```auto
---
apiVersion: v1
kind: Service
metadata:
  labels:
    my.service: rocketchat-server
  name: rocketchat-server
spec:
  ports:
    - name: "1990"
      port: 1990
      targetPort: 1990
  selector:
    my.service: rocketchat-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    my.service: rocketchat-server
  name: rocketchat-server
spec:
  replicas: 1
  selector:
    matchLabels:
      my.service: rocketchat-server
  template:
    metadata:
      labels:
        my.service: rocketchat-server
    spec:
      containers:
        - env:
            - name: ADMIN_EMAIL
              value: rocket@dummy.not
            - name: ADMIN_PASS
              value: rocket_pass
            - name: ADMIN_USERNAME
              value: rocket_admin
            - name: CREATE_TOKENS_FOR_USERS
              value: "true"
            - name: MONGO_OPLOG_URL
              value: mongodb://rocketchat-mongo:27017/local
            - name: MONGO_URL
              value: mongodb://rocketchat-mongo:27017/rocketchat?replicaSet=rs0&directConnection=true
            - name: OVERWRITE_SETTING_Allow_Marketing_Emails
              value: "false"
            - name: OVERWRITE_SETTING_Apps_Framework_enabled
              value: "false"
            - name: OVERWRITE_SETTING_Cloud_Service_Agree_PrivacyTerms
              value: "false"
            - name: OVERWRITE_SETTING_Country
            - name: OVERWRITE_SETTING_Industry
            - name: OVERWRITE_SETTING_Language
            - name: OVERWRITE_SETTING_Layout_Home_Body
            - name: OVERWRITE_SETTING_Organization_Name
              value: testserver
            - name: OVERWRITE_SETTING_Organization_Type
            - name: OVERWRITE_SETTING_Register_Server
              value: "false"
            - name: OVERWRITE_SETTING_Server_Type
            - name: OVERWRITE_SETTING_Show_Setup_Wizard
              value: completed
            - name: OVERWRITE_SETTING_Site_Name
              value: testserver
            - name: OVERWRITE_SETTING_Site_Url
              value: http://testserver/chat
            - name: OVERWRITE_SETTING_Size
            - name: OVERWRITE_SETTING_Statistics_reporting
              value: "false"
            - name: OVERWRITE_SETTING_Website
              value: testserver
            - name: PORT
              value: "1990"
            - name: ROOT_URL
              value: http://testserver/chat
          image: rocketchat/rocket.chat:5.4.2
          livenessProbe:
            exec:
              command:
                - node
                - --eval
                - 'const http = require(''http''); const options = {host: ''0.0.0.0'', port: 1990, timeout: 2000, path:''/health''}; const healthCheck = http.request(options, (res) => {console.log(''HEALTHCHECK STATUS:'', res.statusCode); if (res.statusCode == 200) {process.exit(0);} else {process.exit(1);}}); healthCheck.on(''error'', function (err) {console.error(''ERROR''); process.exit(1);}); healthCheck.end();'
            failureThreshold: 5
            initialDelaySeconds: 200
            periodSeconds: 10
            timeoutSeconds: 20
          name: rocketchat-server
          ports:
            - containerPort: 1990
              protocol: TCP
      restartPolicy: Always
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  labels:
    my.service: rocketchat-server
  name: rocketchat-server
spec:
  entryPoints:
    - web
  routes:
  - match: Host(`testserver`) && PathPrefix(`/chat`)
    kind: Rule
    services:
    - name: rocketchat-server
      port: 1990

```

---

<div class="post-metadata">

**Author:** ![karunakaran](https://avatars.discourse-cdn.com/v4/letter/k/977dab/32.png) [@karunakaran](https://forums.rocket.chat/u/karunakaran)\
**Post date:** [October 4, 2023, 8:03am UTC](https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868/5 "2023-10-04T08:03:05Z")

</div>

> [@karunakaran](#):
>
> [https://dev.domain.com/rocketchat/](https://dev.domain.com/rocketchat/)

@stefan.badenhorst unfortunately it didn’t work.

Step 1: helm install rocketchat -f values.yaml --namespace rc rocketchat/rocketchat

values.yaml contain below details:

mongodb:  
auth:  
passwords:  
- rocketchat  
rootPassword: rocketchatroot

host: [dev.domain.com/rocketchat/](http://dev.domain.com/rocketchat/)

service:  
type: NodePort  
port: 3000

We have used above configuration for helm installation , Post helm deployed successfully.

Step 2: we have edited the rocketchat deployment file with given suggested deployment file. Post that same issue, API calls are working fine and WEB UI not working properly.

Also we found in below Repo , that have defined the routes on the code. Can you please check and suggest will that require to modify if yes then we need to change and create our own deployment image.

> <https://github.com/RocketChat/Rocket.Chat/blob/develop/apps/meteor/client/views/admin/routes.tsx>

---

<div class="post-metadata">

**Author:** ![stefan.badenhorst](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@stefan.badenhorst](https://forums.rocket.chat/u/stefan.badenhorst)\
**Post date:** [October 4, 2023, 8:32am UTC](https://forums.rocket.chat/t/rocketchat-with-suffix-in-root-url-working-only-in-api-calls-and-its-failing-in-web-ui/17868/6 "2023-10-04T08:32:36Z")

</div>

Since it is working for me I thought I would just share my config, but if you are still having issues, I’ll probably not be able to help, sorry.
