Telling Helix Server applications which port to connect to
p4d service and
applications communicate with each other using TCP/IP. When
p4d starts, it listens (by default) for plaintext
connections on port
p4 assume (also by default) that
p4d is located on a host named
perforce, listening on port
1666, and that
communications are performed in plaintext.
p4d is to listen on a different host or port
and/or use a different protocol, either specify the configuration with
flag when you start
p4d (as in,
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
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
Using SSL to encrypt connections to a Helix Server
The preferred syntax for specifying the port is the following:
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:
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
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.
P4ROOT, the environment variable
is used by both the
service and the
applications, so it must be set both on the machine that hosts the
service and on individual user workstations.