# Migrating database from Meteor built in MongoDB

This guide will help you migrate from the built-in Meteor mongo server to an external mongo server.

{% hint style="info" %}
We do not advise running Rocket.Chat in production from source using the meteor command. Instead we recommend using a separate mongo database and using a compiled meteor bundle. Either our official release or your own.

See our [recommended deployment methods](https://github.com/Roxie-32/docs/blob/main/setup-and-configure/rocket.chat-environment-configuration/mongodb-configuration/broken-reference/README.md).
{% endhint %}

Before starting make sure meteor is running.

Then run: `mongodump -h 127.0.0.1 --port 3001 -d meteor`

It'll dump the database in a folder called dump.

Then install mongodb on your system. Please see the [mongo section](https://github.com/Roxie-32/docs/blob/main/setup-and-configure/rocket.chat-environment-configuration/mongodb-configuration/broken-reference/README.md) in one of our guides for your current OS

Once Mongo is installed restore the data using: `mongorestore -d meteor dump/meteor`

If you want to use a different database, you'd take this as your opportunity to change the database name. Replacing -d meteor with your desired database name.

Then follow the remainder of the guide on [setting up Rocket.Chat](https://github.com/Roxie-32/docs/blob/main/setup-and-configure/rocket.chat-environment-configuration/mongodb-configuration/broken-reference/README.md) for your current OS.
