DIY ARMA 3 Server Hosting on Amazon EC2
ARMA 3 Server Hosting
There are many ARMA 3 Server Hosting companies out there. For those that are technically minded we can setup super-cheap hosting using the Amazon EC2 Compute Cloud. Using the cloud we get easy scalability, infrastructure flexibility, modding, and the ability to “save” scenarios for the cheapest pricepoint online.
Why Self-Host ARMA?
Ultimate Flexibility
When you do your own ARMA Server Hosting you have the ability to take the system to whatever level you want now and in the future. If you’re a single player wanting a consistent single-player game to play, you can do that. If you’re a team of people who prefers to play on your own, you can do that. If you want to develop mods and test them out with friends, you can do that. If you want to host a paid platform, you can do that.
Why Amazon EC2?
Free Tinkering Time
Amazon provides 750 hours per month of their smallest compute unit so you can get your server all figured out and working before having to pay. Then you can scale up or down to the size you want any time.
Scalability
Compute, memory, security, storage and everything else in the Amazon Cloud is build to scale up and down easily. As your needs grow you can easily add on services and scale up components and pay only for what you actually use.
Note: As of March, 2020 these instructions are out of date. If you have a solution please reach out to me using the form on the homepage so that we can get these instructions updated. Thanks, Sgt. Bombadil
Heads Up!
You are responsible for understanding billing for Amazon AWS services and for your bills. I take zero responsibility for the cost associated with following these instructions. Amazon AWS billing policies may also change after these instructions area created and there may not even be a free tier. You are responsible for your actions.
Resources
Here are some resources you’ll need handy for this project:
- Amazon EC2 Compute Pricing
- Amazon AWS Console
- Connecting To An EC2 Instance
- ARMA 3 Server Administrator Guide
- ARMA Discord
- ARMA Dev Subreddit
And, Once you have the server running, these will help you get it setup the way you like:
- Server.cfg Official Reference – Many, many options
- Basic.cfg Official Reference – Performance and networking configuration
- Server.armaprofile Official Reference – Primarily for difficulty settings
Linux Instructions
Recommended Configurations (for once you’re setup)
- Linux t2.micro (1 GB RAM, max for free tier)
- S3 30GB (max for free tier)
- Linux t3.small (2GB Ram)
- S3 30 GB Storage
- $29/month (as of Jan-2020)
- Linux t3.Medium (4GB Ram)
- S3 30 GB Storage
- $42/month (as of Jan-2020)
Step 1: Setup Amazon EC2 (Linux)
Prerequisites:
- Credit card to put on file in Amazon AWS
- Mobile phone to receive text verification code from Amazon AWS
- Email address for the Amazon AWS account
- Computer with Remote Desktop Client (or access to an online service that provides this)
Instructions:
- Go to https://aws.amazon.com/ec2/ and create an Amazon AWS Account and select the Free Plan
- Sign in to the AWS console
- Select “Launch A Virtual Machine With EC2”
- Next we choose the Amazon Machine Image (AMI) to install. AMIs change from time to time so this may be out of date when you follow the guide. You want to install an AMI that shows “Free Tier Eligible”. We chose “Ubuntu“.
- Next we select the virtual computer size (called an “Instance Type” or “Compute Size”). We selected the only “Free Tier Eligible” size which was t2.micro and then click “Configure Instance Details”
- At the top of the page select “3. Confiure Instance”. In the Subnet item choose the Availability Zone that is closest to your physical location to keep Internet latency down. Available zones are determined by Amazon based on load in each data center / availability zone and the free tier is typically very limited but paid instances are not.
- At the top of the page select “4. Add Storage” and verify that you’re being provided the free tier of storage. At the time of this writing that was 30 GB of General Purpose SSD (gp2).
- At the top of the page select “6. Configure Security Group”. Here we are opening the server ports required for ARMA 3 Server in the Security Group Firewall. Click “Add Rule”. Select Type = Custom UDP. Port Range = 2302-2305. Source = Anywhere (or “0.0.0.0/0” if you have to specify it).
- Select “Review And Launch” in the bottom right corner of the screen. Double check that the Security Group has been setup properly with at least the Custom UDP rule specified.
- Click “Launch” in the bottom right
- Now we setup login security for the instance. Choose “Create a new key pair” and name it “My ARMA 3 Server” and then “Download Key Pair”. Store this file in a safe and accessible location. Now click “Launch” to create the instance and storage and connect them.
- On the Launch Status page setup a Billing Alert. I selected “Receive PDF Invoice By Email” so that I had an easy history of billing and “Receive Free Tier Usage Alerts” so that I knew when I was leaving the free tier.
- Back on the Launch Status page click on the instance ID which starts with an “i-” to see the Instances page.
The instance is now setup and ready to be logged in to for the first time.
Step 2: Setup The Amazon EC2 Instance (Linux)
Prerequisites:
- Completion of Step 1 Linux instructions
- Key Pair file saved during instance creation
Instructions:
- Open the AWS Console and go to Instances
- Select the new instance and click the “Connect” button to open the “Connect To Your Instance” dialog box. Choose your preferred connection method (as a Windows guy I installed PuTTY)
- Connect to the instance using your preferred method (again, I used the PuTTY documentation)
- Update software using “sudo yum update”
Important Note:
- Amazon EC2 instances have rather locked down permissions so you may need to add “sudo” in front of commands in the ArmA Server instructions.
The instance is setup and ready for Arma.
Step 3: Setup ARMA 3 On The Server (Linux)
Prerequisites:
- Complete Step 2 of Linux Instructions
- A NEW Steam account, not the one you use to play ARMA 3 (the ARMA 3 Server is free and you can only be logged in a limited number of times to Steam so running a server and playing ARMA 3 at the same time can cause issues)
Instructions:
- Turn off Steam Guard on the Steam account you created for getting and running the server
- Follow these Ubuntu instructions for setting up and running ArmA 3 Server
- Update the configuration file to include your preferred settings for: Server name, user password, admin password, mission (I used MP_Warlords_official_01.Altis to start)
Operations:
- After a server restart, to start the server: switch users to the ARMA user with “sudo -i -u arma3″ and then go to the Arma3 folder and execute “./steamcmd/arma3/arma3server -name=server -config=server.cfg” to start the server
Setup 4: Connect To The Server From ARMA Client
It’s time to find out if everything is up and running!
- Open the ARMA Client Launcher on the computer where you normally play ARMA 3.
- Go to the Server Browser and Filter to find your server. Join it.
If you are unable to find the server in the list you can try a direct connect to the server. Use the Public IP address shown on the desktop of the Windows Server.
Setup 5: Upgrading & Downgrading Instance Size
I haven’t written this yet…
Bonus: SteamCMD AutoUpdate
As an administrator of an ArmA server you will from time to time need to update the server to the latest code. When doing so, notifying server clients, in the game, is a very desirable feature. Consider using SteamCMD AutoUpdater to accomplish this task automatically.
Bonus: Commands You’ll Need
- Update system components: sudo apt-get upgrade
- Start ARMA Server:
- sudo -iu arma3
- cd steamcmd/arma3
- ./arma3server -name=server -config=server.cfg
- Edit server.cfg: in the /steamcmd/arma3/ directory nano server.cfg
Windows Instructions
Recommended Configurations (for once you’re setup)
- Windows t2.micro (max for free tier)
- S3 30GB (max for free tier)
- Windows t3.small (2GB Ram)
- S3 30 GB Storage
- $29/month (as of Jan-2020)
- Windows t3.Medium (4GB Ram)
- S3 30 GB Storage
- $42/month (as of Jan-2020)
ALERT! ALERT! ALERT!
This tutorial does not result in a working ARMA 3 Server. The server will start but clients are unable to connect and the server does not get listed in the public directory. If you have a working Amazon AWS Arma server please get in touch so we can get this guide back to working order.
Step 1: Setup Amazon EC2
Prerequisites:
- Credit card to put on file in Amazon AWS
- Mobile phone to receive text verification code from Amazon AWS
- Email address for the Amazon AWS account
- Computer with Remote Desktop Client (or access to an online service that provides this)
Instructions:
- Go to https://aws.amazon.com/ec2/ and create an Amazon AWS Account and select the Free Plan
- Sign in to the AWS console
- Select “Launch A Virtual Machine With EC2”
- Next we choose the Amazon Machine Image (AMI) to install. AMIs change from time to time so this may be out of date when you follow the guide. You want to install a Windows AMI that shows “Free Tier Eligible”. We chose “Microsoft Windows Server 2019 Base”.
- Next we select the virtual computer size (called an “Instance Type” or “Compute Size”). We selected the only “Free Tier Eligible” size which was t2.micro and then click “Configure Instance Details”
- At the top of the page select “3. Confiure Instance”. In the Subnet item choose the Availability Zone that is closest to your physical location to keep Internet latency down.
- At the top of the page select “4. Add Storage” and verify that you’re being provided the free tier of storage. At the time of this writing that was 30 GB of General Purpose SSD (gp2).
- At the top of the page select “6. Configure Security Group”. Here we are opening the server ports required for ARMA 3 Server in the Security Group Firewall. Click “Add Rule”. Select Type = Custom UDP. Port Range = 2302-2305. Source = Anywhere (or “0.0.0.0/0” if you have to specify it).
- Select “Review And Launch” in the bottom right corner of the screen. Double check that the Security Group has been setup properly with at least the Custom UDP rule specified.
- Click “Launch” in the bottom right
- Now we setup login security for the instance. Choose “Create a new key pair” and name it “My ARMA 3 Server” and then “Download Key Pair”. Store this file in a safe and accessible location. Now click “Launch” to create the instance and storage and connect them.
- On the Launch Status page setup a Billing Alert. I selected “Receive PDF Invoice By Email” so that I had an easy history of billing and “Receive Free Tier Usage Alerts” so that I knew when I was leaving the free tier.
- Back on the Launch Status page click on the instance ID which starts with an “i-” to see the Instances page.
The instance is now setup and ready to be logged in to for the first time.
Step 2: Setup The Amazon EC2 Instance (Windows)
Prerequisites:
- Computer with Remote Desktop Connection (you can get this from Microsoft if you need it for windows, the Mac App Store for a Mac, or use rdesktop for Linux)
- Key Pair file saved during instance creation
Instructions:
- Open the AWS Console and go to Instances
- Select the new instance and click the “Connect” button to open the “Connect To Your Instance” dialog box. Choose “Get Password”. Choose the Key Pair file downloaded during instance creation and click “Decrypt Password”. This dialog now has the information you need to connect to the instance. Save this information!
- If using a Windows computer with Remote Desktop Connection then click Download Connection File. If using another method, note the information int he dialog and use it to connect.
- Open the Remote Desktop Connection file and open the connection. Enter the username and password from the dialog box in the AWS Console. Ignore any security warnings to connect. You can resolve these if you desire (documentation)
- (Optional, Recommended) Next change the password of the default Adminsitrator account by going to the Windows menu and searching for Change My Password and select it. Update the password to something you will remember or store for future logins.
- (Optional, Recommended) Next, create an additional Administrator account (for the case where something gets corrupted in the primary account) by opening the Windows Menu and searching for Change My Password and select it. Now click on Other Users and then “Add someone else to this PC” and then switch to the dialog that opened. Go to the Users folder, riht click, select New User. Create the user (do not force password change on first login) and update the “Member Of” tab to include Administrators and remove Users. Store this username and password as well.
- (Optional, Recommended) Install any Windows updates by opening the windows menu, searching for Windows Update, clicking on that option and scanning for updates. Open the “Advanced options” in the bottom of the Windows Update dialog and set the option that provides a Notification when a restart is needed to ON.
The instance is setup and ready for Arma.
Step 3: Setup ARMA 3 On The Server (Windows)
Prerequisites:
- A running Windows Server installation on Amazon AWS EC2 as specified in these instructions
- A NEW Steam account, not the one you use to play ARMA 3 (the ARMA 3 Server is free and you can only be logged in a limited number of times to Steam so running a server and playing ARMA 3 at the same time can cause issues)
Instructions:
- Follow the “official” Windows O/S instructions for installing and setting up the ARMA 3 server: ARMA 3 Dedicated Server
- Important Note: You will use the C:\ drive instead of the D:\ drive indicated in the instructions and that the ARMA3Server_steamcmd_example.cmd file and Desktop Shortcut to ArmA3Server must be updated with the proper drive to run correctly
- Important Note: The ARMA3Server_steamcmd_example.cmd file must be updated with your NEW Steam username. Do not include the password so that you are asked for it on the Command Line when the script is run. If the username and password are not correct you will see an “Invalid Password” message when running this script, which means it failed. Pay attention to the script output in case there is some other problem you need to troubleshoot
- Important Note: Create the CONFIG file for the server and set the Server Name, Password, and Admin Password so that not just anyone can connect to the server.
Troubleshooting:
Server Launch Is Stuck At Loading Configs: When this happens it typically means the drive needs to be updated on the desktop shortcut Target options so that it points at the installation folder.
XAPOFZ1_5.dll and E3DAudio1_7.dll: During my installation I received several dll errors when I tried to run ArmA3Server.exe for the first time including XAPOFZ1_5.dll and E3DAudio1_7.dll. To resolve this follow these steps:
- In the Run command box execute: servermanager.exe
- Select Local Server from the left menu
- In the Properties box that appears click on “On” next to “IE Enhanced Security Configuration” and set it to Off for Administrator. Leave this window open
- Download and Run the DirectX End-User Runtime Web Installer
- Return to Server Manager and in the Properties box, turn ON “IE Enhanced Security Configuration” for Administrators
Setup 4: Connect To The Server From ARMA Client (Windows)
>>> NOTE THESE WINDOWS SERVER INSTRUCTIONS DON’T RESULT IN A WORKING SERVER… SO THIS WILL NOT WORK <<<
—-
It’s time to find out if everything is up and running!
- Open the ARMA Client Launcher on the computer where you normally play ARMA 3.
- Go to the Server Browser and Filter to find your server. Join it.
If you are unable to find the server in the list you can try a direct connect to the server. Use the Public IP address shown on the desktop of the Windows Server.
Bonus: SteamCMD AutoUpdate
As an administrator of an ArmA server you will from time to time need to update the server to the latest code. When doing so, notifying server clients, in the game, is a very desirable feature. Consider using SteamCMD AutoUpdater to accomplish this task automatically.