Hi Everyone,

It's been awhile since I posted, but a rainy day found me and I figured it was a good time to share some ServUO knowledge.

AWS is a great place to host your ServUO Shard. Not only are the network and hardware performance fantastic, but you can actually run ServUO on their free tier (free for 1 year!, no strings attached) if you run it on Linux. For this tutorial, I will explain how to run the latest ServUO on Debian 10 using mono. The guide does not go into detail about shard customization, fail2ban, or other extra performance and security measures. It is designed for the first time AWS user with little knowledge of Linux.

Note: This guide assumes that you are running Windows on a 64-bit PC for your home computer. If you are using an older 32-bit PC, then download 32-bit versions each. If you are using OSX or Linux as a workstation, then this guide is not for you.

You will need to install some software on your workstation, if you haven't already:
PuTTY and puttygen.exe - https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
WinSCP - WinSCP :: Official Site :: Download
ClassicUO - ClassicUO

1.png
Install PuTTY by running the installer you just downloaded
2.png
Save puttygen.exe to some place convenient. It’s also ok just to leave it in your downloads directory.

Now, download and install WinSCP

WinSCP :: Official Site :: Download
3.png

You will also want to make note of your PC’s public IP address. Save this for later.

https://www.whatsmyip.org/

Now, it’s time to get the server up and running. Visit Amazon Web Services (AWS) and setup a new account if you don’t already have one.

https://console.aws.amazon.com/console/home

In the “Build a solution” table, click “Launch a virtual machine,” select Debian 10 (free tier eligible), click “Launch and Review” and then “Launch.”





4.png
5.png
6.png
When you get to this step, edit storage. You are allowed up to 30GB in the free tier, so you may as well take all you can for free.
7.png

*** Set storage size to 30, otherwise you will not have enough drive space ***

8.png
This next step is very important. Administrative access to your server requires a secure key file that only you will possess. MAKE SURE YOU DOWNLOAD THE KEY! This will be your only opportunity to do-so. I keep my keys stored in a safe place, but also email them to myself as a way to keep another copy.


9.png
Double-check that you’ve downloaded it.
10.png

Continued on Part 2
Part 2

We will get back to the key in a minute, but first you will need to find out what your new server’s IP is.
11.png
Click your instance ID

12.png
and then check the public IP address

13.png
In order for you to connect to your server for administration, you will need to prepare your key for PuTTY. To do this, run puttygen.exe and click “Load”
14.png

The key you downloaded (in our example, it is ServUO.pem). In order for puttygen to see the file, you need to choose “All Files (*.*)”

15.png
You should receive a notice like this (click OK)

16.png

Now, save your private key (Password protecting your keys is an extra measure you can take in case your keys get into the wrong hands. We will not cover password protecting keys in this guide.)

17.png

Name and save the key somewhere safe where you can find it easily in the next step.
18.png

Continued on part 3
Part 3

Now, run PuTTY. Enter your server’s IP address from the AWS console and give it a name.
19.png
Now, find and click the category Connection/SSH/Auth
20.png
Browse to your key

21.png

and select your key
22.png

Now, go back to the Category Session

23.png

…and save your configuration
24.png
You should now see your AWS server in the list of saved sessions. Click Open
25.png

Continued on part 4
Part 4

If you did everything right so far, you will see a security alert from PuTTY.
26.png
Click “Yes” and then enter “admin” at the “login as:” prompt. No need for password, because you are using a key! (safe and easy!)

27.png
Your server is still fresh and needs some packages installed that will be needed to compile and run ServUO. You will need to use elevated access in order to install. Before we do that, we need to change the source list for packages, because the default source list doesn’t have everything we need.

Edit your source list:

Code:
sudo nano /etc/apt/sources.list


28.png

Now, press CTRL+K until all of the lines are gone and then paste in these lines (to paste into PuTTY, just right click)
Code:
deb http://deb.debian.org/debian/ buster main contrib non-free

deb-src http://deb.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free

deb-src http://security.debian.org/debian-security buster/updates main contrib non-free

deb https://packages.microsoft.com/debian/10/prod/ buster main contrib non-free
29.png

Press CTRL+X to exit and press Y (and enter) to save (don’t change the file name!)

Now, let’s do some updates

Enter command:

Code:
sudo apt-get update

And then enter command:

Code:
sudo apt-get upgrade
30.png
Press “Y” and enter to install available updates. This may take a few minutes. You will see lots of text scrolling as the updates are installed.

Install mono, some prerequisites, and helpful tools (htop and mlocate). First, enter command:

Code:
sudo apt-get install unzip htop mlocate ntp zlib1g-dev mono-complete

Answer “Y” enter as in the previous step.

This may also take a few minutes to install.

Now, you need to install dotnet-sdk-5.0. To get this, download from Microsoft and install:

Download:

Code:
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

install:

Code:
sudo dpkg -i packages-microsoft-prod.deb

delete install file:

Code:
rm packages-microsoft-prod.deb

install apt-transport-https:

Code:
sudo apt-get install -y apt-transport-https

Update source (don’t forget to run this before trying to install dotnet, or will not work):

Code:
sudo apt-get update

install DotNet 5.0:

Code:
sudo apt-get install dotnet-sdk-5.0

The free AWS EC2 server only has 1GB of RAM, so you will receive a "memory exhausted" error if you try to compile and also risk running out of memory when your server is running. The fix for this is simple, create a swap file using available drive space.

A 4GB swap should do the trick (this will take a minute to complete):

Code:
sudo dd if=/dev/zero of=/swapfile bs=128M count=32

2. Update permissions for the new swap file:

Code:
sudo chmod 600 /swapfile

3. Set up swap area:

Code:
sudo mkswap /swapfile[CODE]

4. Enable it:

[CODE]sudo swapon /swapfile

5. Confirm that it is working:

Code:
sudo swapon -s

6. Ensure that it is enabled each time the server restarts by updating the /etc/fstab file.

Open the file in the editor:

Code:
sudo nano /etc/fstab

Add the following at the end of the file (last line), then save and exit:

Code:
/swapfile swap swap defaults 0 0



Now, download the master branch of ServUO source code:

Code:
wget https://github.com/ServUO/ServUO/archive/refs/heads/master.zip



Unzip it:

Code:
unzip master.zip

Change to the new ServUO-master directyory:

Code:
cd ServUO-pub57

Now compile the server:

Code:
dotnet build
31.png

After a minute or so, it will be ready! Now, all you need are some UO files and to update a few configuration files.

Continued in Part 5
Part 5

Open WinSCP and import your configuration from PuTTY
32.png
Click OK
33.png
Now, connect
34.png

…and login as admin (no password needed, remember you are using a key)

35.png
You will now see a graphical representation of your server.
36.png
Enter the ServUO-master directory by double-clicking on it, and then create a new directory by pressing F7 and name it “uo_files”
37.png
38.png
Now, copy the .MUL files from your UO client installation to uo_files directory on your server.
39.png
Once the MUL files have been copied over, you will need to update some of the configuration files. You can do this from WinSCP as well. Change directories to /home/admin/ServUO-master/Config

First, edit DataPath.cfg and add this line to the bottom:

Code:
CustomPath=/home/admin/ServUO-master/uo_files

40.png
41.png

…then save and close the file

Check documentation and forums on the ServUO website for more information on how to further customize your shard.

Now, from PuTTY, launch ServUO.exe for the first time:

Code:
mono ServUO.exe

Continued on Part 6
Part 6

42.png

The first time you run, it will prompt you to setup your owner account. Use a name and password easy for you to remember, but others to figure out (and write it down or email to yourself). This tutorial does not get into further customization. Please refer to the forums, discord, and other great sources of ServUO information for more content on customization.

Your server will start, but you now will need to update your AWS firewall in order to allow outside clients to connect. Go back to the AWS website and click on “Security Groups”

43.png
Then Create Security Group (upper right of screen)
44.png
You will need to allow access to TCP port 2593 from Anywhere, but SSH TCP port 22 only from your own IP (My IP) If you do not have a fixed IP, or want to add other IPs, you can do so now or later if you IP changes. You should not allow access to port 22 from anywhere.
46.png
Now, go back to your dashboard and choose Change security groups for your server (aka instance).
47.png
48.png
Add the new group and delete the old one. The old security group allows access to the SSH port 22 from anywhere and is a security risk. Don’t skip this step!
49.png
Now, it’s time to connect using your game client. For this step, we will use the amazing ClassicUO client!

Get it here: ClassicUO
50.png

Continued on Part 7
Part 7

51.png
52.png

53.png

Enter the command [createworld to populate and decorate your new shard
Code:
[createworld
54.png

This concludes this tutorial. I hope you enjoyed setting up your shard on AWS. I've been an AWS users for many years have hosted (and still do) many web, PBX,and application servers. I've found the performance and stability to be outstanding and would recommend them to anyone.

There is still more to do on your new shard in addition to customizing it. I have some other tutorials on how to setup auto-restarts, using the screen application, and some other helpful Linux tips.

I did not have great success when trying to run ServUO on a free tier Windows server, but plan to try again sometime. If I have success with that, I'll be sure to drop a tutorial here for that as well.

Enjoy,
Ixtabay
 
Last edited:
Thank you a LOT for the effort you put into this guide and the other one.
I would like only to ask you, is this still all right if instead of serverUO we are running runUo?
Thank you!
 
Back