To install Helix Core (the Perforce server, p4d) on Ubuntu, add the official Perforce APT repository and install the helix-p4d package. Then run the bundled configure-helix-p4d.sh script to create a server instance that systemd and p4dctl manage. This guide covers each step on a current Ubuntu LTS release: the corrected repository commands, configuring the server, checking that it works with the p4 client, basic hardening and fixes for common errors.
How to Install Helix Core in Ubuntu
$ systemctl stop helix-p4dctl
$ systemctl status helix-p4dctl
$ systemctl start helix-p4dctl
| How to Get Started |
| 1. Download Helix Core (P4D) and Helix Visual Client (P4V). |
| 2. Install and configure your server and client. |
| Dive in Deeper |
| Do more with the Perforce Planning & Collaboration Suite. Learn how to: |
| 1. Create a Streams depot and workspace and workspace to start branching code. |
| 2. Use Helix Sync for drop and drag version control. |
| 3. Review code in Helix Swarm. |
| 4. Configure Unity or Unreal Engine with Helix Core. |
What the packages in the example above install
The script above installs five packages. You only need helix-p4d for a single Helix Core server. The other packages are client tools, a service manager or optional components for larger setups.
| Package | What it provides | Needed for a basic server? |
|---|---|---|
helix-p4d | The Helix Core server binary (p4d) and the configure-helix-p4d.sh setup script | Yes |
helix-p4dctl | p4dctl, the service manager, and the helix-p4dctl systemd unit | Yes. It is installed as a dependency of helix-p4d |
helix-cli | The p4 command-line client, used for setup and admin | Yes. It is normally pulled in with helix-p4d |
helix-proxy | p4p, a caching proxy for remote offices | No |
helix-broker | p4broker, which filters or redirects commands | No |
Note: Newer Perforce documentation is rebranding Helix Core under the P4 name. If a package name doesn't resolve, run apt-cache search perforce after adding the repository to see the current names.
Prerequisites
- A 64-bit Ubuntu LTS server with a release codename that the Perforce repository supports. Check the codename with
lsb_release -cs. - A user with
sudorights. Everyapt-getandsystemctlcommand in the example above needs root privileges. - Outbound HTTPS access to
package.perforce.com. - A disk or volume with enough space for depot files, metadata, journals and checkpoints. On production servers, keep these on separate volumes.
- TCP port 1666, the default port, open to the clients that will connect.
Corrected repository setup and installation
The gist above mixes instructions and commands. It puts a $ prompt in front of a line that belongs in a file, and it lists only old Ubuntu codenames. The commands below run in order on a fresh server and fill in the codename automatically.
# 1. Tools needed to fetch and verify the key
sudo apt-get update
sudo apt-get install -y wget gnupg ca-certificates lsb-release
# 2. Store the Perforce signing key in a dedicated keyring
wget -qO - https://package.perforce.com/perforce.pubkey \
| gpg --dearmor \
| sudo tee /usr/share/keyrings/perforce.gpg > /dev/null
# Optional: inspect the key and compare its fingerprint with Perforce's documentation
gpg --show-keys /usr/share/keyrings/perforce.gpg
# 3. Add the repository for this Ubuntu release
echo "deb [signed-by=/usr/share/keyrings/perforce.gpg] https://package.perforce.com/apt/ubuntu $(lsb_release -cs) release" \
| sudo tee /etc/apt/sources.list.d/perforce.list
# 4. Refresh the package index and install the server
sudo apt-get update
sudo apt-get install -y helix-p4dCode language: PHP (php)
Here is what the important parts do. gpg --dearmor converts the ASCII key into the binary format APT expects. > /dev/null stops tee from printing binary data to your terminal. signed-by= limits trust in this key to the Perforce repository. The older apt-key add method trusts a key for every repository, and recent Ubuntu releases deprecate it, so don't use it.
Note: If apt-get update reports that the Perforce repository does not have a Release file, the repository doesn't serve your Ubuntu codename yet. Use a supported LTS release instead of pointing the repository at a different release's codename.
Configure the server instance
After installation, the original post doesn't mention a step you still need: helix-p4d installs the binary but does not create a server. Running the configuration script creates one. It sets up the server root, the perforce service user, the super user and a p4dctl configuration file, and then starts the instance.
# Interactive: prompts for name, root, port, super user and case sensitivity
sudo /opt/perforce/sbin/configure-helix-p4d.sh
# Non-interactive example: instance named "master" using SSL on port 1666
sudo /opt/perforce/sbin/configure-helix-p4d.sh master -n \
-p ssl:1666 \
-r /opt/perforce/servers/master \
-u super \
-P 'Use-A-Strong-Passw0rd' \
--case 0Code language: PHP (php)
masteris the service name thatp4dctluses.-nruns the script without prompts.-p ssl:1666makes the server listen with SSL on port 1666. If you leave out thessl:prefix, traffic is unencrypted.-rsetsP4ROOT, the directory that holds metadata and, by default, depot files.-uand-Pcreate the super user and set its password.--case 0makes the server case-sensitive, and--case 1makes it case-insensitive. Pick one carefully, because changing it later means a full migration. Add--unicodeonly if you need Unicode mode, because you can't easily turn it off afterwards.
Note: A password passed with -P stays in your shell history. Use the interactive mode, or clear the history entry after running the command.
Manage the service with systemctl and p4dctl
The systemctl commands in the example above work, but they need sudo. The helix-p4dctl unit starts and stops every instance defined in /etc/perforce/p4dctl.conf.d/. To control a single instance, use p4dctl directly.
# All instances, through systemd
sudo systemctl status helix-p4dctl
sudo systemctl restart helix-p4dctl
sudo systemctl enable helix-p4dctl # start on boot
# A single instance, through p4dctl
sudo p4dctl list
sudo p4dctl status master
sudo p4dctl stop master
sudo p4dctl start masterCode language: PHP (php)
Each instance's settings are stored in /etc/perforce/p4dctl.conf.d/master.conf, including P4ROOT, P4PORT, P4LOG and the owner account. If the server won't start, check the log file named in P4LOG first.
Verify the installation and connect
Open the firewall port, then connect with the p4 client as the super user. With an SSL port, the client has to trust the server's certificate fingerprint before it can connect.
sudo ufw allow 1666/tcp
export P4PORT=ssl:localhost:1666
export P4USER=super
p4 trust -y # accept the server's SSL fingerprint
p4 login # enter the super user password
p4 infoCode language: PHP (php)
User name: super
Client name: myhost
Server address: ssl:localhost:1666
Server root: /opt/perforce/servers/master
Server version: P4D/LINUX26X86_64/...
Server license: none
...Code language: JavaScript (javascript)
Server license: none means the server is running under the free tier, which limits the number of users and workspaces. From a desktop, connect P4V to ssl:<server-hostname>:1666 and accept the fingerprint prompt.
Harden the new server
- Require strong passwords and ticket-based authentication:
p4 configure set security=3. - Stop users from being created automatically the first time they connect:
p4 configure set dm.user.noautocreate=2. - Hide the user list from anyone who isn't logged in:
p4 configure set run.users.authorize=1. - Limit access with
p4 protect. Remove the default line that grants write access to all users, and grant only what each group needs. - Schedule checkpoints and journal rotation, for example
p4 admin checkpointrun from cron as theperforceuser, and copy the checkpoints off the server. - Set up a typemap with
p4 typemapbefore importing binary assets, so large files are stored with the right file types.
Note: Run p4 configure show to review the configurables that are currently set. Because the configure script may already set some security values, check before you change them.
Common errors and fixes
| Error | Likely cause | Fix |
|---|---|---|
NO_PUBKEY or The following signatures couldn't be verified | The keyring file is missing or empty, or its path doesn't match signed-by | Fetch the key again with the gpg --dearmor command and check that /usr/share/keyrings/perforce.gpg is not empty |
does not have a Release file | The codename in perforce.list isn't supported | Use a supported Ubuntu LTS release and fix the codename |
Unable to locate package helix-p4d | apt-get update wasn't run after adding the repository | Run sudo apt-get update again and look for errors |
Connect to server failed; check $P4PORT | The service isn't running, the firewall is blocking the port, or the ssl: prefix is missing | Run sudo p4dctl status master, check ufw, and make sure P4PORT matches the server |
The authenticity of '...' can't be established | The client doesn't trust the server's SSL fingerprint yet | Run p4 trust and check the fingerprint |
Perforce password (P4PASSWD) invalid or unset | No valid login ticket | Run p4 login |
Frequently asked questions
Which Ubuntu versions does Helix Core support?
Perforce publishes packages only for specific Ubuntu LTS releases, and the supported list changes with each Helix Core release. If apt-get update fetches the Perforce repository without a Release-file error for your lsb_release -cs codename, that release is supported.
Is Helix Core free to use?
Without a license file, Helix Core runs on a free tier with limits on users and workspaces, and p4 info shows Server license: none. For more users, install a license from Perforce.
Where does Helix Core store its data on Ubuntu?
By default, the configure script puts each instance under /opt/perforce/servers/<name>, which becomes P4ROOT. The instance's paths and settings are recorded in /etc/perforce/p4dctl.conf.d/<name>.conf.
Do I need helix-proxy and helix-broker?
Not for a single server. You only need the proxy to cache files for remote sites and the broker to filter or redirect commands, so you can leave both out of a basic install.
How do I upgrade Helix Core installed from the APT repository?
Take a checkpoint, then run sudo apt-get update && sudo apt-get install --only-upgrade helix-p4d. After a major version upgrade, run p4d -xu against the server root as described in Perforce's upgrade notes, then restart the service.
Related tutorials
- What is Perforce and use cases of Perforce?
- Master Perforce: Your Complete Guide to Professional Version Control
- Helix Core Trigger script type Reference Guide
- Perforce Central Authorization Server: P4AUTH
- More Perforce tutorials
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services โ all in one place.
Explore Hospitals