Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
How to configure new port for mongodb

I am currently using port 27017 for mongodb and everything is working proper. We want to configure new port for security purpose.

Can you help me how we can configure this?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

This way,

  1. While startiing mongo pass port argument

    mongod --port your desired port

    mongod --port 19000

    Start Mongo with port:

    mongo --port your desired port

    mongo --port 19000

2.change the port in the mongodb.config file and pass the config file as input.

port = Ur desired port

over 4 years ago · Santiago Trujillo Report

0

Change the /etc/mongod.conf file for persistence

change net: section as

net:
   bindIp: 127.0.0.1
   port: <The port number you want to listen>

Command line option --port <port> can also be used but will not remain persistent and you need to specify the same every time you start Mongod

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!