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

Options:

Examples


Hiding credentials

By default, porter datastore connect hides the datastore username and password from the terminal output to prevent accidental credential leakage (for example, via screenshots, shared terminals, or pasted logs). The tunnel host, port, and database name are still printed so you can connect with a client that already has the credentials configured. When you need to view the credentials — for example, to copy them into a database client for the first time — pass --show-credentials:
With --show-credentials, the output also includes an example psql or redis-cli command pre-filled with the connection details.

Connecting to your datastore

While the tunnel is running, connect using your preferred client in a separate terminal:
The tunnel stays open until you press CTRL-C. Keep the terminal open while you need access to the datastore.
Credentials shown with --show-credentials are sensitive. Avoid running the command in shared sessions, recorded terminals, or screen-shared environments where the output could be captured.