Step-by-step guide for setting up a server on Azure Virtual Machine

Larppa

Terrarian
Hello everybody!
Some time ago I was playing around with Microsoft Azure's trial and managed to run a Terraria server on a virtual machine there.

They have a free one-month trial for azure, which is a good "exploit", if you need a free public server for a short amount of time; a LAN party etc.

I wrote a step-by-step guide on the topic.

The original post can be found here:
http://haukiblog.azurewebsites.net/...l-machine-for-a-terraria-server-step-by-step/

Copy & Paste:


Before starting you need to make an Azure account. Microsoft has a free one-month trial for Azure with 150€ to spend on Azure services. You can register from here: http://azure.microsoft.com/en-us/pricing/free-trial. You won’t be charged anything after the trial unless you want to.

After the registrations etc. follow these steps to set up:

1. Go to your management window -> https://manage.windowsazure.com.

Here you can see all the services running on your Azure subscription if you have any.

To create a new Virtual Machine click the ‘New’ button on bottom left corner.



2. We want to do this quick and easy so we’ll select ‘From Gallery’ option under ‘Compute -> Virtual Machine’. You could also do this in more advanced way if you prefer.



3. Now we choose the image for our virtual machine. This means that we’ll have the operating system installed for us automatically. Lets choose Windows Server 2012 R2 Datacenter and click next.

4. In this window we’ll set the basic configurations for our VM.

Give your VM a name. And select the wanted tier and size. These will set the “hardware” for your machine.

Username and password are the same that we’ll use to sign in to our Windows later, so try to remember them.
icon_wink.gif


Click next.

5. To be able to host our Terraria server so that people can join it, we’ll need to tell Azure to allow outside connections to our server.

Terraria uses port 7777 for multiplayer. So we’ll add an endpoint:

TCP 7777 and UDP 7777. ---- EDIT: TCP port is enough, so no UDP port needs to be added!

You can name them however you want. Check the picture to get those right. (ONLY TCP)

6. The last step is to add extension for the virtual machine. I checked MS Antimalware extension and clicked confirm .



7. After the ‘Create virtual machine’ window closes, Azure will start to deploy your VM. This can take a few minutes.

When the installation is ready, your VM’s status will be ‘Running’ with a green symbol. Click on it to choose your VM and go to ‘Dashboard’. It’s located just above statistics graph.

In ‘Dashboard’ window, click ‘Connect’ from the bottom menu to download an .rdp file. We can use this file as a “shortcut” to our server.

8. To open the file, just click it. After few possible security confirmations, Windows will show a security dialog asking for user credentials. Choose ‘Use another account’. Input the username and password created in step 4 and click ‘OK’. Windows will now establish a remote desktop connection to our VM.

9. Now that we have a connection to our VM, we’ll need to download the Terraria server application to it. There are two ways to do this:

  • Install a Steam client to our VM and download Terraria via it, or
  • Download Terraria server application from official wiki and manually download and install needed frameworks.
In this guide, I chose to do this all manually without using Steam.

To continue we need to download the following files:

Download the files to your local computer!

Terraria server: http://terraria.org/system/dedicated_servers/archives/000/000/002/original/terraria-server-1241.zip

Microsoft XNA Framework Redistributable 4.0: http://www.microsoft.com/en-us/download/confirmation.aspx?id=20914

After your downloads are completed, copy them to clipboard on your local computer and paste them to your desktop on VM.
You’ll have to do this ONE BY ONE. Copying and pasting both at the same time did not work for me.







10. Terraria needs XNA Framework to be installed on our VM to run. So we’ll start by installing it. Double-click ‘xnafx40_redist.msi’ to start the installation. The process is pretty straightforward, you’ll just need to accept the terms etc. and click next a few times.

After XNA is installed, unzip ‘terraria-server-1241.zip’ file by right-clicking on it and choosing ‘Extract All…’.

On the unzip window, click ‘Extract’.



11. Now we have our software installed. The last thing to do is to allow Terraria from our virtual machines Firewall.

To do this, hit ‘Windows Key’ and start typing “Allow an app through Windows Firewall” and select it.



12. Click ‘Allow another app…’.

Click ‘Browse…’.
And go to your freshly unzipped Terraria folder and select ‘TerrariaServer.exe’.





Now make sure ‘Terraria’ is selected and click ‘Add’.






If everything went right, Terraria should have appeared to the list of allowed apps.

Click ‘OK’.



13. And VOILÁ! Our VM is ready to host our very own public Terraria server!
icon_smile.gif


To launch it click ‘TerrariaServer.exe’ and create a new world and start it.

To connect from client, use the public IP found on the upper right-hand corner of your VM’s desktop OR the .cloudapp.net address. (ie. myserver.cloudapp.net)
 
Last edited:
Nice. But at the risk of being rude, might this guide be better placed in the PC Guides sub-forum section (rather than here in cross-platform discussions)? It is just for (Windows) PC, right? I'm sure @Loki and help out if this makes sense (and apologies if I'm talking rubbish).
 
Back
Top Bottom