# $ROOT\_URL, if specified, must be an URL

**URL:** <https://forums.rocket.chat/t/root-url-if-specified-must-be-an-url/17654>\
**Category:** Community Support\
**Created:** [August 24, 2023, 11:01pm UTC](https://forums.rocket.chat/t/root-url-if-specified-must-be-an-url/17654 "2023-08-24T23:01:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nick.phelps](https://avatars.discourse-cdn.com/v4/letter/n/5f9b8f/32.png) [@nick.phelps](https://forums.rocket.chat/u/nick.phelps)\
**Post date:** [August 24, 2023, 11:01pm UTC](https://forums.rocket.chat/t/root-url-if-specified-must-be-an-url/17654/1 "2023-08-24T23:01:44Z")

</div>

### Description

Used the Docker and Docker Compose deployment instructions on [Deploy Rocket.Chat with Docker & Compose](https://docs.rocket.chat/deploy/deploy-rocket.chat/deploy-with-docker-and-docker-compose) but when I attempt to start the container I get this error.

```auto

Error: $ROOT_URL, if specified, must be an URL
    at packages/meteor.js:1328:13
    at packages/meteor.js:1343:4
    at packages/meteor.js:1508:3
    at /app/bundle/programs/server/boot.js:401:38
    at Array.forEach (<anonymous>)
    at /app/bundle/programs/server/boot.js:226:21
    at /app/bundle/programs/server/boot.js:464:7
    at Function.run (/app/bundle/programs/server/profile.js:280:14)
    at /app/bundle/programs/server/boot.js:463:13

```

I’ve attempted using the localhost URL as well as the domain, but I get this error no matter what. I have included my compose and env below.

compose.yml

```auto
volumes:
  mongodb_data: { driver: local }

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-6.8.0}
    restart: always
    labels:
      traefik.enable: "true"
      traefik.http.routers.rocketchat.rule: Host(`${DOMAIN:-}`)
      traefik.http.routers.rocketchat.tls: "true"
      traefik.http.routers.rocketchat.entrypoints: https
      traefik.http.routers.rocketchat.tls.certresolver: le
    environment:
      MONGO_URL: "${MONGO_URL:-\
        mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        ${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      MONGO_OPLOG_URL: "${MONGO_OPLOG_URL:\
        -mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\
        local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}"
      ROOT_URL: ${ROOT_URL:-https://testchat.<<REDACTED.com/chat/home:${HOST_PORT:-3000}}
      PORT: ${PORT:-3000}
      DEPLOY_METHOD: docker
      DEPLOY_PLATFORM: ${DEPLOY_PLATFORM:-}
      REG_TOKEN: ${REG_TOKEN:-}
    depends_on:
      - mongodb
    expose:
      - ${PORT:-3000}
    ports:
      - "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}"

  mongodb:
    image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-5.0}
    restart: always
    volumes:
      - mongodb_data:/bitnami/mongodb
    environment:
      MONGODB_REPLICA_SET_MODE: primary
      MONGODB_REPLICA_SET_NAME: ${MONGODB_REPLICA_SET_NAME:-rs0}
      MONGODB_PORT_NUMBER: ${MONGODB_PORT_NUMBER:-27017}
      MONGODB_INITIAL_PRIMARY_HOST: ${MONGODB_INITIAL_PRIMARY_HOST:-mongodb}
      MONGODB_INITIAL_PRIMARY_PORT_NUMBER: ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}
      MONGODB_ADVERTISED_HOSTNAME: ${MONGODB_ADVERTISED_HOSTNAME:-mongodb}
      MONGODB_ENABLE_JOURNAL: ${MONGODB_ENABLE_JOURNAL:-true}
      ALLOW_EMPTY_PASSWORD: ${ALLOW_EMPTY_PASSWORD:-yes}

```

.env

```auto
### Rocket.Chat configuration

# Rocket.Chat version
# see:- https://github.com/RocketChat/Rocket.Chat/releases
RELEASE=6.8.0
# MongoDB endpoint (include ?replicaSet= parameter)
#MONGO_URL=
# MongoDB endpoint to the local database
#MONGO_OPLOG_URL=
# IP to bind the process to
BIND_IP=127.0.0.1
# URL used to access your Rocket.Chat instance
ROOT_URL=testchat.<<REDACTED>>.com/chat/home
# Port Rocket.Chat runs on (in-container)
#PORT=
# Port on the host to bind to
#HOST_PORT=

### MongoDB configuration
# MongoDB version/image tag
#MONGODB_VERSION=
# See:- https://hub.docker.com/r/bitnami/mongodb

### Traefik config (if enabled)
# Traefik version/image tag
#TRAEFIK_RELEASE=
# Domain for https (change ROOT_URL & BIND_IP accordingly)
#DOMAIN=
# Email for certificate notifications
#LETSENCRYPT_EMAIL=

```

---

<div class="post-metadata">

**Author:** ![alpha](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/alpha/32/4927_2.png) [@alpha](https://forums.rocket.chat/u/alpha)\
**Post date:** [October 27, 2023, 9:33am UTC](https://forums.rocket.chat/t/root-url-if-specified-must-be-an-url/17654/2 "2023-10-27T09:33:41Z")

</div>

Did you manage to fix this? I have the same issue after following the “Deploy with Docker & Docker Compose” guide.

---

<div class="post-metadata">

**Author:** ![rnaff](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/rnaff/32/5267_2.png) [@rnaff](https://forums.rocket.chat/u/rnaff)\
**Post date:** [March 8, 2024, 2:30am UTC](https://forums.rocket.chat/t/root-url-if-specified-must-be-an-url/17654/3 "2024-03-08T02:30:53Z")

</div>

Did you figure this out?

Same issue for me
