When working on a project you would like to have backups and ability to revert files. Another thing is you probably want to work in team. Unreal Engine 4 supports Perforce out of the box. I will show you how to quickly deploy perforce server and set it up!

I will use Vultr as my server provider. It cost only 5$ a month and it will be enough for small teams. Even if you grow you can increase your server specification to match your needs.

Why I’m using Vultr? Because it have big storage disc (not SDD) at really low price. It have couple of gift codes as well.

Registering Account

Register on Vultr and then in My Servers click on “Deploy New Instance”:

Enable IPv6: Checked,

Enable Private Network: Checked,

Server Label: perforce,

And click Place Order. You would need to add your credit card.

Opening Server Console

Click on Manage button:

Here you can find a lot of information:

Your server IP – copy it somewhere because it will be used for perforce,

Your server root user – it’s login name to Ubuntu,

Your server default root password – copy it as well it will be used to first login into server,

Now just click View Console.

It will ask you for login:

vultr login: root,

Password: default password provided in manage screen,

After you successfully logged in – change the password! Just type this in console:

sudo passwd 1 sudo passwd

Installing Perforce

Perforce is free to use for 20 users. If you have more team members you need to pay for using Perforce.

To install Perforce I will use Allar’s script which was mentioned in this great tutorial with detailed explanation how to install perforce.

Just type this in your console:

wget https://raw.githubusercontent.com/Allar/linux-perforce-installer/master/install-perforce 1 wget https : //raw.githubusercontent.com/Allar/linux-perforce-installer/master/install-perforce

When finished downloading type:

chmod +x install-perforce 1 chmod + x install - perforce

And then:

sudo ./install-perforce 1 sudo . / install - perforce

After installation it will ask you for new user ‘perforce’ password. I won’t use this user, but you need to pass some password. Just make sure after leaving full name etc blank to type “Y” in the question “Are those information correct”

Your server should restart after installation and you need to login again – use root login.

That’s all in server now lets move to clients!

Preparing Perforce Client

To connect to Perforce Server you would need Perforce Visual Client which can be downloaded here. You need to scroll down to find P4V: Visual Client

If you get alert that default server can be reached – just go forward and don’t run connection wizard.

After installation is complete run P4V.exe

In the server type: YOURSERVERIP:1666

Now hit New User to create user for you.

You don’t need to add password for the user. I’m leaving it blank as I’m working alone. Type something in email thou – it’s required to save the user.

After creating user we need to create workspace. Click on “New”

Workspace name: name of the workspace. Mine is kolos_dupa-PC_5768,

Workspace root: this is the folder which perforce will be downloading files,

If you hit OK you will be prompted to upload some file into the server. Just hit cancel.

Your perforce is ready!

Copying project to Perforce

Go to your workspace root folder and create new folder with name of your project. Now copy your project files into it:

Binaries,

Config,

Content,

Plugins, (if you have one)

Source, (if you are using C++),

And .uproject file. (which need to be writable)

Then open P4V and just Mark For Add.

In pending right-click on your change list and submit it.

Add description and submit. That will be all – your files will be uploaded to perforce.

Using Unreal Engine 4 with Perforce

Now you can enable Perforce integration in Unreal Engine 4. Open your project file that was uploaded to perforce.

Enable Perforce:

If you are using 4.10 you will get alert about checking content browser files – disable this feature.

When saving files UE4 will ask you to checkout files that you want to modify:

When you finish your work just Submit:

If you want to revert file open P4V and right-click on the file:

Useful Commands

You need to check if you are running out of space or memory. Open your server console.

Checking ram usage:

free -m 1 free - m

I have added 5GB project and I’m using 248 MB of 512 ram space.

Checking disk usage:

df -h 1 df - h

Other useful commands can be found here.

Installing Mantis on your server

For those that want to have mantis bug tracker installed on the server as well just follow this step by step tutorial.