# Error when installing from docker-compose

**URL:** <https://forums.rocket.chat/t/error-when-installing-from-docker-compose/14294>\
**Category:** Community Support\
**Created:** [June 14, 2022, 8:02pm UTC](https://forums.rocket.chat/t/error-when-installing-from-docker-compose/14294 "2022-06-14T20:02:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasai](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@vasai](https://forums.rocket.chat/u/vasai)\
**Post date:** [June 14, 2022, 8:02pm UTC](https://forums.rocket.chat/t/error-when-installing-from-docker-compose/14294/1 "2022-06-14T20:02:14Z")

</div>

Hello! I try to install rocket.chat according to the docker-compose [documentation](https://docs.rocket.chat/quick-start/installing-and-updating/rapid-deployment-methods/docker-and-docker-compose/docker-containers), but when I run `docker-compose up -d` I get an error:

```bash
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.rocketchat.ports contains unsupported option: 'host_ip'

```

my file is `docker-compose.yml` taken from the official repository:

```nohighlight
version: "3.7"

volumes:
  mongodb_data: { driver: local }

services:
  rocketchat:
    image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest}
    restart: on-failure
    labels:
      traefik.enable: 'true'
      traefik.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:-http://localhost:${HOST_PORT:-3000}}
      PORT: ${PORT:-3000}
    depends_on:
      - mongodb   
    expose:
      - ${PORT:-3000}
    ports:
      - host_ip: ${BIND_IP:-0.0.0.0}
        target: ${PORT:-3000}
        published: ${HOST_PORT:-3000}
        protocol: tcp
        mode: host

  mongodb:
    image: docker.io/bitnami/mongodb:${MONGODB_VERSION:-4.4}
    restart: on-failure
    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}

```

My `.env` file

```bash
### Rocket.Chat configuration

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

### MongoDB configuration
# MongoDB version/image tag
#MONGODB_RELEASE=
# 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=mydomain.com
# Email for certificate notifications
#LETSENCRYPT_EMAIL=

```

When running the old [docker-compose.yml](https://github.com/RocketChat/Docker.Official.Image/commit/bb85059cb0af244c812a64aad49bd0eb7fd349bf#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3) file there was no such problem.

Please tell me what caused this problem and how to properly fix it?

---

<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:** [June 14, 2022, 8:54pm UTC](https://forums.rocket.chat/t/error-when-installing-from-docker-compose/14294/2 "2022-06-14T20:54:10Z")

</div>

Hi! Welcome to our Community!

I just faced this issue today, and learned that my docker version was too old.

After updating to latest version, it worked properly:

$ docker --version  
Docker version 20.10.17, build 100c701

---

<div class="post-metadata">

**Author:** ![vasai](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@vasai](https://forums.rocket.chat/u/vasai)\
**Post date:** [June 15, 2022, 7:57am UTC](https://forums.rocket.chat/t/error-when-installing-from-docker-compose/14294/3 "2022-06-15T07:57:25Z")

</div>

Thanks for the advice, but I already have the latest version of docker installed. But you gave me the idea to check the docker-compose version and that was really the problem, 1.29.2 was installed.

---

<div class="post-metadata">

**Author:** ![fongang.rodrique](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@fongang.rodrique](https://forums.rocket.chat/u/fongang.rodrique)\
**Post date:** [June 15, 2022, 9:13am UTC](https://forums.rocket.chat/t/error-when-installing-from-docker-compose/14294/4 "2022-06-15T09:13:27Z")

</div>

Did you succeed on this? Which version of docker-compose did you update to?
