Configure P4 Search for the first time
Part of the installation of P4 Search requires setting up an initial configuration. For Windows installations, this is taken care of in the installation wizard. For Linux installations, you need to run a configuration script.
After you have installed P4 Search, you can configure it further from the web UI or locally. See Configure P4 Search.
Configure P4 Search for Linux
To set up an initial configuration of P4 Search on Linux, you must run a script. This script configures users, groups, and the required permissions for P4 Server.
To learn how to set up users manually, see Create users and tickets for external services.
Run the configuration script
-
Locate the etc/configure.sh script file in the installation directory.
-
Run the script in a command window.
-
Respond when prompted:
-
To accept the default values within [default], press the Enter key.
-
The [Y/n] option defaults to yes. You can press the Enter key to move on to the next configuration item.
-

Running the script updates the following configurations:
com.perforce.p4search.core.service.p4user
com.perforce.p4search.core.index.p4user
com.perforce.p4search.core.service.p4ticket
com.perforce.p4search.core.index.p4ticket
com.perforce.p4search.core.p4port
com.perforce.p4search.core.p4trust
com.perforce.p4search.service.external-url
com.perforce.p4search.elastic.hosts
com.perforce.p4search.elastic.user
com.perforce.p4search.elastic.pass
By choosing the default options during the running of the script:
-
Users are created:
p4search (admin permission, standard user or a service user at Security level 5 or above)
p4index (super permission, standard user)
-
Users are added to the group:
unlimited (with unlimited ticket 'Timeout')
-
Server specification is created for Security level 5 or above:
p4search (configuring the User, AllowedAddresses and Address fields)
For a full list of P4 Search configurations, see P4 Search configuration reference.
Example outputs
The following are example outputs from running the etc/configure.sh script. User responses are in bold:
$ ./configure.sh
Connecting to your Perforce Server...
Perforce Server [localhost:4000]:
Superuser account name [super]:
Enter Password: ********
OK
Configure the external URL for P4Search (used by the Perforce Server)...
External URL [http://localhost:1601]:
OK
Configure CORs pattern.
Access control allow origin.
Security level: 2
Configuring HelixCore index user account...
Username [p4index]:
Enter password for index: ********
User 'p4index' does not exist!
Create user? [Y/n]: Y
Creating 'p4index' user account...
OK
Setting 'p4index' password...
OK
Configuring unlimited ticket group...
Group name [unlimited]:
User p4index is not a member of unlimited!
Add user to group? [Y/n]: Y
Adding p4index to group...
OK
Checking 'p4index' permissions...
User p4index does not have 'super' access!
Append 'super user p4index * //...' permission to protects? [Y/n]: Y
Adding permission...
OK
Generating allhost 'p4index' ticket...
NOTE: in low security mode you can use the same Perforce user for both 'service' and 'index' users.
Configuring HelixCore service user account...
Username [p4search]:
Enter password for service: ********
Configuring unlimited ticket group...
Group name [unlimited]:
Checking 'p4search' permissions...
User 'p4search' does not have 'admin' access!
Append 'admin user p4search * //...' permission to protects? [Y/n]: Y
Adding permission...
OK
Generating local 'p4search' ticket...
Extensions depot does not exist!
Create extension depot .p4extensions:
Creating extensions depot...
OK
Connecting to your Elastic Server(s)...
ElasticSearch host(s) (comma seperated) [http://localhost:9200]:
Elastic username [elastic]:
Elastic password: ********
Connection OK
--------------------------------------------------------------------------------
Configuration finished.
After making configuration changes, you must restart the service:
sudo systemctl restart p4search.service
--------------------------------------------------------------------------------