Oplog tailing on locally hosted MongoDB: Is it possible?

I’ve worked through a few sample projects and tutorials, but other than that I’m very new to Meteor/Mongo.

I’m wondering if it is possible to host my own (non-Meteor) MongoDB and still make use of OpLog Tailing? Currently I have my nascent Meteor app connected to a previously existing MongoDB running locally (I set MONGO_URL). But based on what I’ve read it doesn’t seem to be using the OpLog (lacking the real time features). Which are fully functional if I run without setting MONGO_URL.

I’m assuming it might work if I set the associated OpLog environment variable. But, if that is the case, how do I find that? Or is that feature only available through Atlas and not through local Mongo databases? Every similar question I’ve found doesn’t involve someone using a locally hosted DB, and I don’t really want to pay the subscription, but I do want to have the ability to have multiple real time Meteor apps connected to the same database.

This is a for a very small web app, that I really only want available on a LAN (that’s why I’d like to host locally, if possible). I’ll likely only have 20-50 users at a time.

Of course it is possible. Here’s some advice on how to set it up, which is pretty actual despite being from 2016: https://ianhowson.com/blog/oplog-on-ubuntu-mongodb-meteor/

UPDATE: if you intend to use PM2 to run your Meteor app, which is a pretty solid choice, here’s a repository that may come in handy: https://github.com/ramezrafla/meteor-deployment. The pm2.json file shows how to pass the environment variables to Node, including the URL for Oplog.

1 Like

Thanks a bunch. This is exactly what I was looking for.

Glad I could help, good luck with the deployment!