# Mongo DB location

**URL:** <https://hub.mender.io/t/mongo-db-location/6518>\
**Category:** General Discussions\
**Created:** [January 26, 2024, 6:18pm UTC](https://hub.mender.io/t/mongo-db-location/6518 "2024-01-26T18:18:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjsteele](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jjsteele](https://hub.mender.io/u/jjsteele)\
**Post date:** [January 26, 2024, 6:18pm UTC](https://hub.mender.io/t/mongo-db-location/6518/1 "2024-01-26T18:18:03Z")

</div>

I an installing mender-server on EC2 and I want all the data to be on a seperate drive from the boot drive. Is there a way to do this during setup? I’m using docker-compose not Kubernetes.

Thanks,

John

---

<div class="post-metadata">

**Author:** ![robgio](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/robgio/32/1760_2.png) [@robgio](https://hub.mender.io/u/robgio)\
**Post date:** [January 29, 2024, 1:02pm UTC](https://hub.mender.io/t/mongo-db-location/6518/2 "2024-01-29T13:02:55Z")

</div>

Hi @jjsteele ,  
the [demo docker-compose setup](https://github.com/mendersoftware/integration?tab=readme-ov-file#running-the-demo-server) allows you to quickly spin up a complete environment with a sample MongoDB instance in the docker composition. Docker volumes are located into `/var/lib/docker/volumes` by default, so the quickest solution is to have a partition dedicated to `/var/lib/docker` in your OS setup.

In alternative, you could just run a standalone MongoDB setup and choose the storage configuration that best suites your needs. Then you have to tweak the docker compose example, to match your external MongoDB, instead of the docker compose service one.

---

<div class="post-metadata">

**Author:** ![jjsteele](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jjsteele](https://hub.mender.io/u/jjsteele)\
**Post date:** [January 29, 2024, 2:50pm UTC](https://hub.mender.io/t/mongo-db-location/6518/3 "2024-01-29T14:50:41Z")

</div>

@robgio Thanks for that, the partition seems the easist way to go and works find.

John
