# Fresh docker-compose deployed with warning about depricated MongoDB

**URL:** <https://forums.rocket.chat/t/fresh-docker-compose-deployed-with-warning-about-depricated-mongodb/12370>\
**Category:** Community Support\
**Created:** [October 11, 2021, 7:10pm UTC](https://forums.rocket.chat/t/fresh-docker-compose-deployed-with-warning-about-depricated-mongodb/12370 "2021-10-11T19:10:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![realbosselarsson](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/realbosselarsson/32/3189_2.png) [@realbosselarsson](https://forums.rocket.chat/u/realbosselarsson)\
**Post date:** [October 11, 2021, 7:10pm UTC](https://forums.rocket.chat/t/fresh-docker-compose-deployed-with-warning-about-depricated-mongodb/12370/1 "2021-10-11T19:10:56Z")

</div>

I’m trying to set up Rocket.chat with docker-compose (in Portainer on Ubuntu 20.04).

By using the [compose file](https://github.com/RocketChat/Rocket.Chat/blob/develop/docker-compose.yml) linked from the [docs](https://docs.rocket.chat/quick-start/installing-and-updating/docker-containers/docker-compose) I get it running but with a warning about MongoDB:  
`YOUR CURRENT MONGODB VERSION (4.0.27) IS DEPRECATED.`

Is there an updated compose file available that starts with MongoDB 4.2 or what do I need to edit to get 4.2 running?  
All I find is guides to upgrade from 4.0 to 4.2 which should not be necessary when starting fresh?

### Server Setup Information

- Version of Rocket.Chat Server: 4.0.1
- Operating System: Ubuntu 20.01
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: 12.22.1 - x64
- MongoDB Version: 4.0
- Proxy: No, local
- Firewalls involved: No

### Any additional Information

When I edit the compose file from `image: mongo:4.0` to `image: mongo:4.2` I get:

```auto
/app/bundle/programs/server/node_modules/fibers/future.js:313,
						throw(ex);,
						^,
,
MongoServerSelectionError: getaddrinfo EAI_AGAIN mongo,
    at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/sdam/topology.js:439:30),
    at listOnTimeout (internal/timers.js:554:17),
    at processTimers (internal/timers.js:497:7) {,
  reason: TopologyDescription {,
    type: 'Single',,
    setName: null,,
    maxSetVersion: null,,
    maxElectionId: null,,
    servers: Map {,
      'mongo:27017' => ServerDescription {,
        address: 'mongo:27017',,
        error: Error: getaddrinfo EAI_AGAIN mongo,
            at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {,
          name: 'MongoNetworkError',
        },,
        roundTripTime: -1,,
        lastUpdateTime: 878008600,,
        lastWriteDate: null,,
        opTime: null,,
        type: 'Unknown',,
        topologyVersion: undefined,,
        minWireVersion: 0,,
        maxWireVersion: 0,,
        hosts: [],,
        passives: [],,
        arbiters: [],,
        tags: [],
      },
    },,
    stale: false,,
    compatible: true,,
    compatibilityError: null,,
    logicalSessionTimeoutMinutes: null,,
    heartbeatFrequencyMS: 10000,,
    localThresholdMS: 15,,
    commonWireVersion: null,
  },
},
Tried 1 times. Waiting 5 secs...

```

---

<div class="post-metadata">

**Author:** ![debdut.chakraborty](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/debdut.chakraborty/32/2900_2.png) [@debdut.chakraborty](https://forums.rocket.chat/u/debdut.chakraborty)\
**Post date:** [October 12, 2021, 2:06am UTC](https://forums.rocket.chat/t/fresh-docker-compose-deployed-with-warning-about-depricated-mongodb/12370/2 "2021-10-12T02:06:06Z")

</div>

There is a PR open on updating the compose file - [Chore: update compose file by debdutdeb · Pull Request #23426 · RocketChat/Rocket.Chat · GitHub](https://github.com/RocketChat/Rocket.Chat/pull/23426)

---

<div class="post-metadata">

**Author:** ![realbosselarsson](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/realbosselarsson/32/3189_2.png) [@realbosselarsson](https://forums.rocket.chat/u/realbosselarsson)\
**Post date:** [October 12, 2021, 3:54am UTC](https://forums.rocket.chat/t/fresh-docker-compose-deployed-with-warning-about-depricated-mongodb/12370/3 "2021-10-12T03:54:48Z")

</div>

Oh, I missed that in my searches.  
Thank you.
