Skip to content

Instantly share code, notes, and snippets.

@bryanwieger
Last active August 3, 2022 04:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bryanwieger/eeba368453ffd6a67eb8aca43a696f2c to your computer and use it in GitHub Desktop.
Save bryanwieger/eeba368453ffd6a67eb8aca43a696f2c to your computer and use it in GitHub Desktop.
Setting up openra on aws ec2
To set up openra on AWS EC2
Disclaimer: This is not the best architected solution, so no guarantees on up-time
PreReqs:
- Have an AWS account
- Know basics of ssh and bash
Setting up the EC2 Server:
1. Launch an EC2 with a Ubuntu OS. I used ami-059e7901352ebaef8 on a t2.micro
2. Configure Security Groups for the EC2.
- SSH port:22 will need be open to your IP
- TCP port:1234 will need be open to all the IPs you want to be able to join you (I set mine to everyone)
3. SSH into the ec2 instance. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
4. Run this script :
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install libopenal1 mono-runtime libasound2 mono-complete screen
curl -L https://github.com/OpenRA/OpenRA/releases/download/release-20180923/OpenRA-Red-Alert-x86_64.AppImage --output OpenRA-Red-Alert-x86_64.AppImage
chmod a+x OpenRA-Red-Alert-x86_64.AppImage
fuse
sudo apt install fuse
tmux
./OpenRA-Red-Alert-x86_64.AppImage --server Server.Name="MyServerName" Server.ListenPort=1234 Server.AdvertiseOnline=True Server.Password=MyPassword Server.EnableSingleplayer=true
Connecting to the AWS openra server
1. Download & install the openra that is of the same version that you placed on the server. In this case release-20180307
2. Find the IPv4 address of the ec2 running openra
3. Open the multiplayer mode openra, under direct ip enter the ip address with the port number (1234)
4. Enter credentials on next screen
5. You should be connected to the server
5. Happy gaming!
Notes
- Port forwarding does not seem to work with this particular set up, so the game listing does not show up.
However if you enter the ip address in the direct connet, you can connect.
- If you end up having a long hang that ends up failing, double check the security group on the ec2.
There needs to be an allow-rule for either your particalar ip, block of ip, or everyone.
Todo
- Add notes on setting up Autoscaling group to ensure an ec2 is always up and running.
@rmoriz
Copy link

rmoriz commented Feb 12, 2019

Or just use the docker image ;)

@ssbljk2
Copy link

ssbljk2 commented Mar 21, 2019

Would this work on Google Cloud Platform?

@phrohdoh
Copy link

phrohdoh commented Sep 8, 2019

@ssbljk2 maybe not these exact steps but the general idea will work on (almost) any public cloud provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment