Installing game servers on your VPS

Discussion in 'VPS Tutorials' started by tdoyle, Jan 10, 2011.

Thread Status:
Not open for further replies.
  1. tdoyle

    tdoyle New Member

    WARNING: Game servers take lots of resources. Ensure you have the proper resources to run a server. Usage of one of x10's Dedicated VPSes is EXTREMELY recomended

    Welcome to my tutorial! Here I'll teach you how to install different game servers on your VPS running CentOS. If you need any help or have any questions, just post them to this thread!

    Installing and setting up a Minecraft server

    The first thing you will need to do is install Java on to your server. Log in to your SSH as the "root" user. And enter this command into your SSH:
    yum install \*java-1.6\*
    Once you do that, you will want to create a folder for the minecraft server files. Let's just drop them into the /srv folder. First make a a folder into the /srv directory:
    mkdir /srv/minecraft
    Switch to the directory:
    cd /srv/minecraft
    Now you will need to download the minecraft server java file:
    The rest is pretty straight forward. Create a linux user and give it access to the folder.
    /usr/sbin/useradd -d /srv/minecraft -s /bin/bash -c "Minecraft Server" minecraft; chown minecraft /srv/minecraft; passwd minecraft
    Now you can sign in to your server's ssh as the user "minecraft" with the password you selected earlier. Once you sign in, you will automatically go to the /srv/minecraft directory we set up before. Run this command and you should be good to go:
    java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

    Installing and setting up SRCDS for source games
    So you want to install a server for one of the popular source games? Let's start up the installation then! Let's make the default srcds folder:
    mkdir /srv/srcds
    Install "ncompress" a dependencies for hldsupdatetool:
    yum install ncompress
    Make the "srcds" user and assign it to the srcds folder:
    /usr/sbin/useradd -d /srv/srcds -s /bin/bash -c "SRCDS" srcds; chown srcds /srv/srcds; passwd srcds
    Now log in to the "srcds" account on your ssh, once you get in run this command:
    wget; chmod u+x hldsupdatetool.bin; ./hldsupdatetool.bin
    Follow the instructions and once it tells you that it finished extracting steam.tar.Z enter this command:
    Once that command is finished installing the steam linux files (which you may need to install the previous command a few times) you'll want to install one of the games. Here is a list of the games you can install, and the command to install them:
    Click here for the list of game names
    ./steam -command update -game "<game id>" -dir /srv/srcds
    Once you're done with this, you can run the game using these command:
    cd orangebox
    ./srcds_run -console -game <game id> -port 27015 +maxplayers <amount of player> +map <map name>
    Thanks for reading! Let me know if you have any trouble!
  2. Brandon

    Brandon Former Senior Account Rep Community Support

    Thanks for the tutorial, Tom Doyle. I have moved this to the VPS Tutorials section.
  3. tdoyle

    tdoyle New Member

    Thanks brandon! I appreciate the move!
  4. tdoyle

    tdoyle New Member

    You may need to chmod the folder to use SCP/FTP to upload files, for minecraft type this as the root user:
    chmod 777 /srv/minecraft
  5. tomtiger11

    tomtiger11 New Member


    You have to have an x10VPS D* package to host a web server :p
  6. GtoXic

    GtoXic x10 Support

    Please read the beginning of his post, you'll notice he mentioned Dedicated which is our D* package.
  7. tomtiger11

    tomtiger11 New Member

    I meant, he says 'is extremely recommended', I was saying that you have to have a D* package.
  8. SierraAR

    SierraAR Sierra Brown Community Support

    Any reason you replied to a year old thread to make that 'correction'?

    Let's not necro threads unless it's relevant, helpful information.
Thread Status:
Not open for further replies.

Share This Page