Skip to content

Deploy Dedicated Server on AWS for a number of First Person Shooters

License

Notifications You must be signed in to change notification settings

finbaromahony/FPS-Dedicated-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FPS-Dedicated-Server

Deploy First Person Shooter Dedicated Server for use with a number of games

  • Counter Strike 1.6
  • Counter Strike Condition Zero
  • Counter Strike Global Offensive
  • Pavlov Shack (Quest 2 version)

Table of Contents

Pre-requisites

Following instructions are for deploying from an Ubuntu Instance.

  • Ansible is installed sudo apt-get install ansible
  • You are authenticated with AWS and have credentials in ~/.aws/credentials
  • You have installed awscli sudo apt-get install awscli
  • You have upgraded awscli pip install --upgrade awscli --user
  • You have generated a key-pair called fps_dedicated_rsa and have imported it to AWS as cstrike
    ssh-keygen -f ~/.ssh/fps_dedicated_rsa -t rsa -b 4096
    chmod 600 ~/.ssh/fps_dedicated_rsa
    # cat fps_dedicated_rsa.pub to get the string required for the public-key-material
    aws ec2 import-key-pair  --key-name fps_dedicated_rsa --public-key-material "ssh-rsa XXXXHXHHXHX youruser@yourdomain.com"

Viewing Help

Run deploy_fps_server.sh specifying the help command

[-h]
-d Deploy Infrastructure
-y Destroy Infrastructure
-c Install Counter Strike 1.6 Server
-z Install Counter Strike Condition Zero Server
-g Install Counter Strike Global Offensive Server
-s Install Pavlov Shack Server
[-a] Specify API_KEY value for CSGO
[-r] Specify RCON_PASSWORD value
[-p] Specify SV_PASSWORD value
[-n] Specify HOSTNAME value

Install Dedicated Server Examples

The following is a number of examples for installing dedicated servers

Deploying Instance

Run deploy_fps_server.sh specifying the deploy command

./deploy_fps_server.sh -d

Alternatively you could run the Makefile directly

make apply

Installing Counter Strike Dedicated Server 1.6

Run deploy_fps_server.sh specifying the install command

./deploy_fps_server.sh  -c -r <rcon_password>

Installing Counter Strike Condition Zero Dedicated Server

Run deploy_fps_server.sh specifying the install command

./deploy_fps_server.sh -z -r <rcon_password>

Installing Counter Strike Global Offensive Dedicated Server

Run deploy_fps_server.sh specifying the install command

./deploy_fps_server.sh -g -a <api_key>

CSGO api key

To Run CSGO you need to generate an api key to tie your server with your steam account. https://steamcommunity.com/dev/managegameservers use code 730 for CSGO

Installing Pavlov Shack VR (Quest) Dedicated Server

run deploy_fps_server.sh specifying the install command

./deploy_fps_server.sh -s

Pavlov Shack VR (Quest) custom maps

Update text file in ansible/roles/pavlov_post_installation/files/maps.txt The file should contain a flat list of urls to maps

cat maps.txt
http://download2265.mediafire.com/1l2pt6sqfftg/3ld3pzs0mwfhdrj/SVR_john_nuketown.zip
http://download662.mediafire.com/yq2dzb9iu6jg/qur1yb4obfusfq2/SVR_john_mcdonalds.zip

Specify server password and hostname [Optional]

run deploy_fps_server.sh specifying install command with password and hostname

./deploy_fps_server.sh -z -r <rcon_password> -p <sv_password> -n <hostname>

Connecting to Counter Strike Dedicated Server

Output of deploy_fps_server.sh will give the console command to run in counter-strike to run to access the server.

connect <SERVER_IP>

Destroying the Counter Strike Dedicated Server

Run deploy_fps_server.sh specifying the destroy command

./deploy_fps_server.sh -y

Managing CSGO Dedicated Server

Recommended screen is used to manage running terminal instance.

## ssh to instance
ssh -i <ssh_key> ubuntu@<ip_address>
## start csgo server
## screen session recommended
/home/ubuntu/start_csgo.sh

Known issues

Ansible is having issues installing CSGO...

It exits when steam is attempting to get "user info" performing the operation manually does work.

Troubleshooting

There are issues with the installation of components from time to time This can happen with steam itself or with the installation/upgrade of a dedicated server

The deploy_fps_server.sh can be run as many times as required until the desired effect is obtained.

Manual steps if CSGO installation fails

# log onto instance
ssh -i <ssh_key> ubuntu@<ip_address>
# run command to install CSGO
steamcmd +login anonymous +force_install_dir "./cs/" +app_update 740 validate +quit
# fill in start_csgo.j2 template and save it in /home/ubuntu as start_csgo.sh

About

Deploy Dedicated Server on AWS for a number of First Person Shooters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published