If you're looking to expose your local PostgreSQL instance, Localtonet is a fitting solution. Here's how:

  1. Setting up the Localtonet TCP Tunnel for PostgreSQL:

    • Start by ensuring that the Localtonet App is properly installed for your operating system. Downloads
    • Head over to the TCP-UDP Page within the application.
    • From the available Protocol Types, select TCP.
    • Choose the AuthToken you have set in the Localtonet App.
    • Specify the server on which you'd like your tunnel to run.
    • For PostgreSQL, point the IP to your local address, typically IP: 127.0.0.1, and the Port to PostgreSQL's default port, 5432.
    • Initiate your tunnel by pressing the Start button.
  2. Remotely Accessing the PostgreSQL Database: With your tunnel now active, Localtonet will grant you an address. This distinctive address corresponds to your PostgreSQL server, and you can connect remotely as though accessing it locally.

Remember to take note of the Localtonet TCP address and port, as you'll need this information to connect using your preferred database management tool or any application that requires access.

CAUTION: By default, the tunnel you've crafted is publicly accessible. Given the potential security implications, if you're using Localtonet's premium features, it's wise to leverage IP Restrictions to narrow down access only to trusted IP addresses.