Jump to content


How To Install Gamservers Server On Your Vps


  • Please log in to reply
7 replies to this topic

#1 reefer_



  • Members
  • Pip
  • 5 posts

Posted 08 April 2015 - 08:41 PM

Hey guys am a tell you how to create servers on ur VPS You may want counter strike etc etc soo if you want be to tell you how to make a server eg:ts3 server (witch is in this post alredy) tell me and ill reply asap :D thx lets get started



Step 1: Install Java

Minecraft is a Java-based game. For our Bukkit Minecraft deployment we will need to install Java. cPanel offers Tomcat, which runs Java, but I would recommend installing it via the command line. You will need root-level access to the server to install Java. Here is how to set up a cPanel account that can escalate to root.

Once in the server as root you should install either java-1.6.0-openjdk or java-1.7.0-openjdk:

yum install java-1.7.0-openjdk

Substitute java-1.6.0-openjdk in the yum install command if that is your preference.

Step 2: Configure your server

Now lets prepare for the game itself. The next few commands will create a Minecraft directory in the account where we want to host Minecraft and take us to the new directory:

mkdir -p /home/account/bukkit

(Where /account/ is the name of the account in which you wish to install Minecraft.)

cd /home/account/bukkit

Step 3: Download and start Bukkit Minecraft
  1. Download the game with the following command:

wget http://dl.bukkit.org/latest-rb/craftbukkit.jar

  1. Start Minecraft in Java:

java -Xmx1024M -Xms1024M -jar craftbukkit.jar -o true

Bukkit usually runs a version behind vanilla Minecraft. The link above should automatically download the latest stable build.

Step 4: Relaunch Minecraft

Now you should see from the rolling text on the command line that Minecraft is starting and generating the world. This confirms that you have successfully installed Bukkit, but there are a few things we should do before we log in and start crafting and mining. The first thing is… stop the Bukkit server and restart it in a screen so we can log out of the VPS without stopping the game.

java -Xmx1024M -Xms1024M -jar craftbukkit.jar -o true

Now Bukkit is running in a screen, which means you can exit the server without the game closing on you. You can do this by detaching the screen:

[ctrl] + a
[ctrl] + d

If done successfully you should get a message that says [detached]

If you don’t want to alter the default settings, you are now done. If you do, read on…

Step 5: Configure Bukkit

If you want to get a little deeper into the Bukkit and Minecraft setup you can add the IP for your server, your world name, or the message of the day.

  1. To make any configuration changes you will need to stop the game though, so re-attach the screen:

screen -r

  1. Then you will want to edit at least the server.properties file and probably the opts.txt file.

Note: If you want to edit the files via FTP or cPanel you may need to change their permissions. If you do, run: chown -R account:account /home/account/Minecraft
The ops.txt file controls who has administrator powers while in the game, so place the Minecraft accounts you want to have administrator power in that file. The server.properties file is the big one, it is going to have game options and settings in there.




To install Teamspeak 3 on your linux VPS first you need to open PuTTy or any other SSH client. Connect to your server, if you do not know how to, look at one of the stuck threads at the top of Tutorials.
Once you are logged in, you are going to create a new user for the teamspeak server unless you want to use root skip to step 4 (It is not recommended to use root). First Login as Root tho.

Step 1. Create a new user.
useradd -d /home/teamspeak teamspeak

Step 2. Login as the user
su teamspeak

Step 3.
go to the main directory
cd ..
cd /home/teamspeak/

Step 4. Get Teamspeak Server
32 bit Linux -


wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.1/teamspeak3-server_linux-x86-3.0.1.tar.gz

64 bit -

wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.1/teamspeak3-server_linux-amd64-3.0.1.tar.gz

Step 5. Extract the Server

tar -xvf teamspeak3-server_linux-amd64-3.0.1.tar.gz


tar -xvf teamspeak3-server_linux-x86-3.0.1.tar.gz

Step 6. Go into Teamspeak 3 Server Directory

cd teamspeak3-server_linux-amd64


cd teamspeak3-server_linux-x86

Step 7. Start the Server
For the first start use =


connect to the server with the client using the server IP and use the token to get SA, to add your self to query look at the bottom of this tutorial.
To start the server after the first start use

./ts3server_startscript.sh start

you can also use restart, stop, status with the ./ts3server_startscript.sh script.

Step 8. Add yourself to Admin Server Query.
open Server Query in Teamspeak 3 Client
click the little check mark in the top right

now type serveradmin and the password in the login box
so to the big area you can type and type the following

use port=9987
servergroupaddclient sgid=2 cldbid=2

Now you have admin!




  • Valve appear to have used Ubuntu 12.04 32-bit as their main development environment. This means that if you do exactly the same and use Ubuntu Server 12.04 32-bit, you will have fewer nasty surprises. You can of course use a newer version of Ubuntu and that should also work since it is backwards-compatible.
  • This guide is written with any Debian-based distribution in mind - but can be simplified if you just use the same system that Valve used (you won't have to install extra compatibility libraries).

Make sure you meet the following requirements before you begin:

  • A user to run the server as ('steam' is recommended, with home directory /home/steam)
  • Enough disk space for the content you wish to install
  • An open command-line terminal running as the user 'steam' (su - steam) or an SSH session with steam as logged in user.
  • Experience with basic Linux command-line usage.


Installing SteamCMD

The following script will download SteamCMD, extract it and update it. SteamCMD is needed to download and update garrysmod.

cd ~ mkdir bin cd bin wget http://media.steampo...md_linux.tar.gztar -xvzf steamcmd_linux.tar.gz ./steamcmd.sh +login anonymous +quit

Installing Garry's Mod

The following script will download the latest version of Garry's Mod for you with a single command.

We are using the text editor nano for this, but you can use your own if you prefer a different editor.

First, lets go to our home directory.

cd ~

To create the script, use your preferred text-editor tool. In this example, we are using "nano", but any other such as "vi", "vim", "pico" or "emacs" will also work.

$ nano update_gmod.sh

Paste the following script in nano:

# !/bin/bash

# A convenience function, to save us some work
update_server() {
    # Read the app id and the directory into a variable


    # Create the directory (if it doesn't exist already)
    if [ ! -d "$HOME/$DIR" ]; then
        mkdir -p "$HOME/$DIR"

    # Uh-oh, it looks like we still have no directory. Report an error.
    if [ ! -d "$HOME/$DIR" ]; then
        # Describe what went wrong
        echo "ERROR! Cannot create directory $HOME/$DIR!"

        # Exit with status code 1 (which indicates an error)
        exit 1

    # Call SteamCMD with the app ID we provided and tell it to install
    ./bin/steamcmd.sh +login anonymous +force_install_dir "$HOME/$DIR" +app_update $APP_ID validate +quit

# Now the script actually runs update_server (which we just declared above) with the id of the application (4020 is Garry'
s Mod) and the name of the directory we want the server to be hosted from:

update_server 4020 "server_1"

# Add any additional servers here by repeating the above, but using a different directory name.

# Exit with status code 0 (which means OK)
exit 0

Now we save the file. In nano, saving a file is done by pressing Ctrl+O, followed by ↵ Enter. Now we close the file by pressing Ctrl+X.

Before we can run this file, we need to give it 'execute' rights. This is done with the following command:

chmod +x ./update_gmod.sh

Now, lets update the server


The server will now download the necessary content. Steam will show you the percentage of progress it is making with the download.

Adding content

Of course, we want to be able to use stuff from Team Fortress 2, Counter-Strike: Source and other supported games. Using the script above, this is simple process.

However, since we want to save on download time, we are going to put all this content in a seperate folder, so if we have 5 servers, we only need to update the content once if a content update gets released.

Now we are going to modify the script mentioned above. Add the following line where it says "Add any additional servers here". Here, we add Team Fortress 2.

update_server 232250 "content/tf2"

Now, when we run update_gmod.sh the script will verify (and, if required, update) Garry's Mod (since we downloaded it in the step above) and then install Team Fortress 2 in ~/content/tf2.

For a list of IDs for the servers, you can have a look at the Valve Developer Community page. Remember that you can theoretically download any game here using its ID, but with these dedicated servers you don't need to login using your steam account.

Starting the server

To start the server, we run the file called srcds_run, which is located in the root directory of each server. The command below starts the server with 12 slots on gm_flatgrass.

~/server_1/srcds_run -game garrysmod +maxplayers 12 +map gm_flatgrass

The script (srcds_run) will keep the server alive, should it crash, but it won't restart when you restart linux and if you close the terminal the server will close. We will fix this later on in this article.

Updating the server

To update the server, or to update the content, we simply call our download script. You need to make sure your servers are off, or else the update will fail.

Update our scripts by just calling this (from the home directory)


Keeping the server alive after a reboot

To keep the server alive we use crontab. We add an entry to crontab which will call srcds_run when the server has loaded.

Open crontab

crontab -e

Now, add the following line at the end

@reboot /home/steam/server_1/srcds_run -game garrysmod +maxplayers 12 +map gm_flatgrass

Now save the file. Usually crontab opens in nano so the commands would, again, be Ctrl+O, ↵ Enter, Ctrl+X.

Now, after you reboot the linux server, the Garry's Mod Server will auto start.



Need to now how to make another gamemode server? tell me and I will reply or send you a message


~reefer_ OUT!

#2 Arctic


    Haphost Staff

  • Moderators
  • 341 posts
  • LocationGermany

Posted 08 April 2015 - 09:38 PM

Wrong Section, moved in the right section

  • mihai lucian likes this

any support PM's be Ignored please use the Support section for it



#3 SamW



  • Members
  • PipPip
  • 15 posts

Posted 09 April 2015 - 02:35 PM

Great guide, bookmarking this c:

  • reefer_ likes this

#4 reefer_



  • Members
  • Pip
  • 5 posts

Posted 09 April 2015 - 03:30 PM

Wrong Section, moved in the right section

Thank you.I am new here soo I didn't now were to put it

#5 reefer_



  • Members
  • Pip
  • 5 posts

Posted 09 April 2015 - 03:30 PM

Great guide, bookmarking this c:

Thanks dude!. Welcome to haphost also and got a game servers or any servers u want me to tell you how to install?

#6 SamW



  • Members
  • PipPip
  • 15 posts

Posted 09 April 2015 - 05:53 PM

Nah, I'm ok for now c:

#7 Sidhkeer



  • Members
  • Pip
  • 8 posts
  • LocationDelhi

Posted 14 April 2015 - 06:05 PM

Nice one, keep it up :D

  • mihai lucian likes this

#8 mihai lucian

mihai lucian


  • Members
  • Pip
  • 1 posts

Posted 04 May 2015 - 12:41 PM

its nice , i think is good ideea but its work

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users