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

P4 Server Administration Documentation | 2025.1

# Tell P4 Server applications which port to connect to

The `p4d` service and P4 Server applications communicate with each other using TCP/IP. When `p4d` starts, it listens (by default) for plaintext connections on port `1666`. P4 Server applications like `p4` assume (also by default) that the corresponding `p4d` is located on a host named `perforce`, listening on port `1666`, and that communications are performed in plaintext.

If `p4d` is to listen on a different host or port and/or use a different protocol, either specify the configuration with the -p `protocol`:`host`:`port` flag when you start `p4d` (as in, `p4d -p ssl:perforce:1818`), or by the contents of the `P4PORT` environment variable.

Plaintext communications are specified with `tcp:host:port` and SSL encryption is specified with `ssl:port`. (To use SSL, you must also supply or generate an x509 certificate and private key, and store them in a secure location on your server. See SSL/TLS connections between client and server for details.)

The preferred syntax for specifying the port is the following:

``protocol`:`host`:`port``

There are situations, for example if you are using multiple network cards, where you might want to specify the port on which to listen using syntax like the following:

`P4PORT=ssl::1666`

The use of the double colon directs the server to bind to all available network addresses and to listen on port 1666. This can be useful if the host has multiple network addresses.

To enable IPv6 support, specify the wildcard address with two colons when starting `p4d`. For example:

    $ p4d -p tcp64:[::]:1818

starts a Perforce service that listens for plaintext connections, on both IPv6 and IPv4 transports, on port 1818. Similarly,

    $ p4d -p ssl64:[::]:1818

starts a Perforce service that requires SSL and listens on IPv6 and IPv4, and

    $ p4d -p ssl6:[::]:1818

starts a Perforce service that requires SSL connections, and listens for IPv6 connections exclusively.

See IPv6 support and mixed networks for more information about IPv6 and IPv4 transports.

Unlike `P4ROOT`, the environment variable `P4PORT` is used by both the Perforce service and the P4 Server applications, so it must be set both on the machine that hosts the Perforce service and on individual user workstations.

Your search for returned results