I recently set up Unity Asset Server (a version control repository server with a client built into Unity Pro) on Amazon’s EC2 â€”Â “a web service that provides resizable compute capacity in the cloud.” There were a few gotcha’s along the way so here’s a quick start guide for anyone else who wants to do the same. Most of what I cover here is also included in Amazon and Unity’s documentation but there are two “gotchas” that stumped me for a while which are solved in steps 7 and 9 below.
I decided to go with EC2 for a few reasons. First: you pay for your hourly usage (most other VPS will charge you a flat rate per month starting at around $20). Second: Amazon has pretty robust and flexible features that allow you to easily scale. Third: the first year is free for new customers, so there was no reason not to try it out.
The other services that I evaluated were:
1. Getting started
First of all you’ll need to have an Asset Server client license, it is a $500 add-on license to Unity Pro.
Next you’ll need to sign up for an Amazon Web Services account. This will require a valid credit card. If you are already an Amazon.com customer you can use the same login credentials.
2. Creating your EC2 Server
Once your AWS account is set up, you need to create your EC2 instance. Start by selecting the EC2 tab. Choose a region for your instance to be hosted in (Singapore, US East Coast, US West Coast) and then select Launch Instance.
3. Choose an AMI
You’ll then be presented with a list of different machine images. Choose Basic 32-bit Amazon AMI. This is bothÂ compatibleÂ with the version of Unity Asset Server that you are going to install and it supports the free Micro Instance.
3. Instance Details
3.1. Instance Type
Select the Micro Instance Type. It is also a good idea to make sure Termination Protection is selected.
3.2. Advanced Instance Options
Leave the Kernel and RAM IDs set to Default. Make sure Monitoring is not selected since that service isn’t free.
Create a Key called “Name” and set it to a value of your choosing. I’ve chosen to name my instance “UnityAssetServer“.
4. Create Key Pair
Choose to Create a new Key Pair. I named mine “UnityAssetServerKeyPair”. Download this file to your harddrive. If you’re on OS X, and you want to make things easier for you later on, you can save this file to your user directory (the one with a little house icon in finder).
5. Configure Firewall
Just select default for now.
6. Instance Setup Review
The instance is almost ready to launch, just double check everything one last time.
7. Configure Security Groups
This one is important â€” if you don’t do this step you will not be able to SSH into your shell to install Unity Asset Server, nor will you be able to connect to the asset server.
7.1. Unity Asset Server TCP Ports
- In the yellow box, select “other” in the Connection Method dropdown.
- For Protocol select tcp.
- If you want to use the default port for Unity Asset Server (doesn’t require you to specify the port within Unity) enter 10733 for both the From Port and To Port.
- Source (IP or group) should be set to 0.0.0.0/0
7.2. SSH TCP Ports
- In the yellow box, select “SSH” in theÂ Connection Method dropdown.
- ForÂ Protocol selectÂ tcp.
- EnterÂ 22 for both theÂ From Port andÂ To Port.
- Source (IP or group) should be set toÂ 0.0.0.0/0
8. Elastic IPs
Now you want to Allocate and Associate an Elastic IP to your instance, this will allow you to enter just the IP address in Unity and not the long cumbersome AWS URL. It is important to note that this is a free service as long as the IP isÂ associatedÂ with an instance. They don’t want you grabbing a lot of IP addresses and not using them.
9. SSH into Your EC2 Instance
If you go to Instance, and select your instance and then select Instance Actions, Connect you will see some instructions about how to ssh into you server.
Note, the command line text that they issue you is wrong.
ssh -i UnityAssetServerKeyPair.pem email@example.com
ssh -i UnityAssetServerKeyPair.pem firstname.lastname@example.org
Of course your string will be different, the important thing to note is that root should actually read ec2-user. This one stumped me for some time!
So, if you’re running OS X, simply open up Terminal and type your corrected line in and hit enter. If you are running windows, you’ll need to download an SSH client such as Putty. If you set up an Elastic IP you should be able to use that instead of the full AWS url as well (everything after the @ mark). Also, if you didn’t save your key pair to your user directory, or if you are on windows, you’ll need to specify the filepath for your .pem key pair file.
10. Installing Unity Asset Server on Your Server
Now that you are logged into your EC2 instance via SSH you are ready to follow along with the Unity Asset Server installation instructions. Specifically we’ll be installing the Linux i386Â rpm package. Here are the instructions as of today but note that if a new version of Asset Server is released you would want to reference the installation instructions for the file path of the latest release.
Run the following command on the server:
sudo rpm -Uvh http://download.unity3d.com/asset_server/unity_asset_server-2.0.1.i386.rpm
If this is a new installation, you will also have to supply an initial password for the admin user:
When prompted, please supply a new password for the admin user.
You should now be able to fire up Unity and use it to create projects and users on the newly installed Asset Server.
11. Configuring Unity Asset Server in Unity
From here on out you can read the Unity Asset Server Guide to figure out how to set up new projects, users, etc. It is pretty self explanatory and most people should be able to figure out it without even looking at the manual.
11.1 Quick Launch Cheat Sheet
- Launch Unity
- Open Unity Asset Server (Window/Asset Server)
- Select Connection
- For Server,
- If you used the default port when setting up the security you can just type in your Elastic IP address. Ex: 188.8.131.52
- If you specified a port other than the default 10733, lets say 10700, you’d need to enter the server like this:Â 184.108.40.206:10700
- Initially log in with admin and the same password you set in the installation process with the “sudo” command.
- Create a new User Name and Password for you and also create User Names and Passwords for your collaborators.