Home Net Guide

Home / Port numbers / Port 27017

Port 27017: MongoDB

Connections to MongoDB databases. Port 27017 uses TCP.

Port
27017
Commonly used for
MongoDB
Transport
TCP
Encrypted
Optional (TLS)
Range
User (registered) port, 1024 to 49151
Our advice
Keep it closed to the internet
IANA registration
mongodb Mongo database system (TCP)

Registration: IANA Service Name and Transport Protocol Port Number Registry, retrieved 15 November 2026. The registered name can differ from the everyday use, because popular software often adopts a port without registering it. The description and advice are written by Home Net Guide and describe common practice: any program can be set to use any port.

What port 27017 is used for

Port 27017 is the default for MongoDB, a database that stores records as flexible JSON-like documents. Applications and the mongosh shell connect to it.

Should port 27017 be open?

Older versions accepted connections from anywhere with no password. In 2017 tens of thousands of such databases were wiped and held to ransom. Since version 3.6 MongoDB listens only on the local machine by default. If it must be reached remotely, enable authentication and TLS and restrict the source addresses.

Related ports

  • Port 6379 (Redis): the Redis in-memory data store and cache
  • Port 9200 (Elasticsearch): the Elasticsearch search and analytics API
  • Port 5984 (CouchDB): the Apache CouchDB database API
  • Port 3306 (MySQL and MariaDB): connections to MySQL and MariaDB databases

See all port numbers for the full list and how ports, TCP and UDP work.

Previous: Port 27015 (Steam and Source game servers) · Next: Port 31337 (Back Orifice)