Skip to main content

Using ngrok with PostgreSQL

Here's a quick guide on running a local postgresql instance on you local machine and getting a public address for it using ngrok. After installing the database, you can connect to it using a standard ngrok TCP tunnel sending traffic to port 5432.

ngrok tcp 5432

Once ngrok is forwarding traffic to your PostgreSQL service, you can use the TCP address provided to connect to it remotely.

psql -h -p 12345 -U postgres -d postgres