Different apps same database using meteor up?


I have deployed two apps using meteor up : telescope and main app. Meteor up created two different databases for these apps. How can I change it to use only one?


Easy way to deploy two meteor apps running on the same database, with oplog?

In your mup.json there is

  "ROOT_URL": "...",

Just make sure that your MONGO_URL is the exact same in both mup.json files and you should be good to go.


I tried but It didn’t work.


@arunoda : Can you help, please? Thank you!


If you asked to create a DB via mup. Then there is db running on localhost.
So, use “mongodb://localhost/some-common-db-name” as the MONGO_URL

If this is mupx, use “mongodb://mongodb/some-common-db-name”


Thanks @arunoda , I set up the env for subdomain as

“env”: {
“PORT”: 8000,
“ROOT_URL”: “http://sub.mymaindomain.com”,
“MONGO_URL”: “mongodb://mongodb/main”

It still creates a different database with the appname.

Install meteor on remote server

and if I set “setupMongo”: false,

I get Error: failed to connect to [mongodb:27017]
in logs


Can anyone please point out what am I doing wrong? Thanks.


As arunoda have mentioned, set “mongodb://localhost” : "MONGO_URL": "mongodb://localhost/main". Worked for me :slight_smile: