Setting up Perforce Server with Digital Ocean?

Posted September 12, 2019 5.2k views
DigitalOceanUbuntu 18.04


I’m a indie game developer trying to set up a Perforce Server on DigitalOcean for my Unreal Engine project. I’ve been following this tutorial:

Everything seems to be okay up to the point where I try to Open Connection on Perforce. I get the following error message if I try Port 1666:

Connect to server failed; check $P4PORT.
TCP connect to failed.

And I get the following error message if I try Port 22:

RpcTransport: partner is not a Perforce client/server.

I’ve looked at the documentation on DigitalOcean, but the tutorials are over 7 years old. Any help would be appreciated!! Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers

Here’s a handy way to see what applications and ports are listening on your droplet by running this command in terminal or console:

netstat -tnlp

(You must SSH to your Droplet or open the “Console” in the cloud admin.)

This command will show all programs that are running and listening for connections:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0    *               LISTEN      7873/sshd
tcp        0      0*               LISTEN      8999/mysql

That’s just an example. Your droplet will probably be a little different but what we’re looking for is a line that might look like this:

tcp        0    *               LISTEN      7873/perforce

The key parts are the :1666 and something that looks like perforce - I’m just guessing what the application name might be.

If you don’t have any netstat lines that are displaying port 1666 (the port from your error message), then most likely the perforce application is not running. If the app won’t start, take a look at the logs it created as 99% of the time the error is there and 50% of the time, it’s easy to fix whatever the log is complaining about.

hope this helps, and please feel free to ask more questions if you are still stuck

I finally got Perforce up and running. Thank you for the tip on netstat!!

Hi there—can you elaborate on how you fixed the problem? I’m doing the exact same thing, following the same tutorial (Allar’s), and ran into those exact two error messages trying the two different ports. Ran netstat, and it isn’t showing a 1666 server, so must’ve taken a wrong turn somewhere. Very new to this, so not even sure how to pull up logs. Any guidance would be very much appreciated!

RTL - It’s been over a month since I did this, but if I remember correctly, I just had to run Perforce from the command line.


  1. Fire up PuTTY and log in as “root”
  2. Type “p4d” from the command line (If you don’t see it, it should be located in “/usr/local/bin”)

I think that’s all I had to do, and I was up and running!