p4 serverid


Get or set the unique ID associated with a Perforce server.


p4 [g-opts] serverid [serverID]


p4 serverid retrieves or sets the unique ID of a Perforce server by reading or writing the server.id file in the server's root directory.

Unless a P4NAME value has been specified for the server, the server uses the serverid to determine the appropriate configuration settings. See p4 configure.

The recommended technique for configuring servers in a multi-server installation is to give each server its own serverid, and specify the server configuration for that serverid; specifying a separates P4NAME for the server is generally not necessary,

Use this command to create or update the server.id file after first generating a unique ID for the server with the p4 server command.



If supplied, update server.id with the unique ID of the server.


See “Global Options”.

Usage Notes

Can File Arguments Use Revision Specifier?

Can File Arguments Use Revision Range?

Minimal Access Level Required



list, or
super to set the server ID

The server.id file exists in the server's root directory, and must be backed up. If you are using the p4 server command to configure your servers, and one of your servers suffers a catastrophic data loss, the restored server will require that this file be present (or be re-created) in order to correctly configure itself upon restart.

Related Commands

To edit or view a server specification

p4 server

To list all known servers

p4 servers