Setting up Perforce Server with Digital Ocean?


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. connect: WSAECONNREFUSED

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.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

DigitalOcean Employee
DigitalOcean Employee badge
September 13, 2019
Accepted Answer

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

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!

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!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel