For applications or projects that require access to your local MongoDB instance from remote locations, Localtonet offers a convenient solution. Here's how you can utilize Localtonet to expose your MongoDB server:

  1. Setting up the Localtonet TCP Tunnel for MongoDB:

    • Ensure you've completed the Localtonet App installation tailored for your operating system. Downloads
    • Navigate to the TCP-UDP Page within the application.
    • Choose TCP from the available Protocol Types.
    • Select the AuthToken that you've previously entered in the Localtonet App.
    • Determine the server you'd like your tunnel to run on.
    • For MongoDB, set the IP to your local address, typically IP: 127.0.0.1, and the Port to MongoDB's default port, which is 27017.
    • Activate your tunnel by clicking the Start button.
  2. Accessing the MongoDB Server Remotely: Once the tunnel is running, Localtonet will provide an address. This unique address will connect to your MongoDB server, enabling remote interactions just as if it were locally accessed.

CAUTION: The newly established tunnel is by default open to everyone. It's paramount to consider security aspects. If you're on a premium Localtonet plan, you can implement IP Restrictions to limit access, ensuring only trusted IP addresses can connect.