Add replication in MongoDB instance

Hey all, I have deployed the MongoDB database, now I want to add the replication option i.e. change it from standalone to a replica set. Locally I was able to update the mongod.conf file and then initiate it using the Mongo shell but I am not sure how to do that on Railway. Any help is appreciated.
5 Replies
Percy
Percy12mo ago
Project ID: 54434c06-b979-4b6e-b963-b04603febc49
hey_rahul
hey_rahul12mo ago
54434c06-b979-4b6e-b963-b04603febc49
Brody
Brody12mo ago
for this you would have to deploy and maintain your own mongo database, you can do this with a service and a volume, then connect to it over the internal network, and since this is your service you are free to make all the changes to mongod.conf you want
hey_rahul
hey_rahul12mo ago
Hey, sorry for late reply. I did already figure out that I would have to deploy my own instance, so did exactly that. Thanks for the help.
Brody
Brody12mo ago
very cool!