Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# Use environment variables

To configure connection settings using environment variables, set `P4PORT` to ``protocol`:`host`:`port``, as in the following examples:

If the server runs on | and listens to port | supports encryption protocol | set `P4PORT` to
--- | --- | --- | ---
your computer | `1666` | nothing (plaintext) | `localhost:1666`
`perforce` | `1666` | SSL/TLS | `ssl:perforce:1666`
`houston` | `3435` | nothing (plaintext) | `tcp:houston:3435`
`example.com` | `1818` | SSL/TLS | `ssl:example.com:1818`

If you do not specify a protocol in your `P4PORT` setting, `tcp:` (plaintext communication over TCP/IP) is assumed. If the P4 Server has been configured to support SSL/TLS, you can encrypt your connection to P4 Server by using `ssl:` as the protocol.

Other protocols (for example, `tcp4:` to require a plaintext IPv4 connection, or `ssl64:` to require an encrypted connection, but to prefer the use of the IPv6 transport instead of IPv4) are available for use in mixed networking environments.

To learn more, see Configure for IPv6 networks.

Your search for returned results