Skip to main content
porter datastore connect creates a secure tunnel to connect to Porter-provisioned datastores from your local machine.

Prerequisites

  • You’ve logged in to the Porter CLI after running porter auth login
  • You’re connected to the correct project by running porter config set-project
  • You have a Porter-provisioned datastore (PostgreSQL, Redis, etc.)

Usage

porter datastore connect <DATASTORE_NAME> [flags]
Options:
FlagDescription
--portLocal port for the tunnel (default: 8122)

Examples

porter datastore connect my-postgres

Connecting to Your Datastore

While the tunnel is running, connect using your preferred client in a separate terminal:
psql -h 127.0.0.1 -p 8122 -U postgres -d postgres
The tunnel stays open until you press CTRL-C. Keep the terminal open while you need access to the datastore.
The connection credentials are displayed when the tunnel starts. Make sure to note the password if you need it for your client.