Private Networking

Private Networking

Private Networking allows services to use a fixed hostname to connect to another service in the same project.

Find the Hostname

Open the "Networking" section of the service to find the hostname under "Private."

find hostname

Connect to the Service

Use the hostname above to connect to this service (in this example, PostgreSQL). Additionally, according to the documentation of PostgreSQL, the port is injected into the POSTGRES_PORT environment variable. So, you can fill in your connection information as follows:

  • Hostname: The hostname you found in the previous step, in this example, it is postgresql.zeabur.internal.
  • Port: Retrieve the value from the POSTGRES_PORT environment variable, which is defaulted to 5432 (opens in a new tab).

Important Notes

  • Changing the service name does not change the hostname.