Dedicated Server Setup: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
Line 84: Line 84:
</pre>
</pre>
}}
}}
Some server operators prefer not to include the -autoupdate option so the updating of the server files is not automatic and therefore remains under their own control.
* Now make the Bash-File executable and run it:
* Now make the Bash-File executable and run it:
  hl2usr@hl2srv ~/hl2 # chmod +x empires.sh
  hl2usr@hl2srv ~/hl2 # chmod +x empires.sh
Line 90: Line 91:
  hl2usr@hl2srv ~/hl2 # screen -r empires
  hl2usr@hl2srv ~/hl2 # screen -r empires


You can detach from the Screen-Terminal and leave the server running by typing a Control-A followed by a d. This leaves the server running in the background.
You can detach from the Screen-Terminal and leave the server running by typing a Control-A followed by a d.


To stop the server, reattach to the Screen-Terminal and type Control-C.
To stop the server, reattach to the Screen-Terminal and type Control-C.

Revision as of 15:13, 30 December 2008

Home > Dedicated Server Setup

Dedicated Server (Windows)

Downloading

First of all you need the HLDS Update Tool. This is what we use to update/download the server. You will also need Empires Dedicated Server from the Empires Download Page.

If you want to use Mani Admin Plugin, make sure you download it before going any further.

Installing

  • First we need to download the SDS (Source Dedicated Server). To download we open up hldsupdatetool.exe and download the tool to an arbitrary location on your machine, for example:
C:\HL2DS
  • When you have finished installing the update tool open the install folder in a command prompt and type:
hldsupdatetool.exe -command update -game "tf" -dir C:\HL2DS  
  • If that doesnt work or your stuck or having trouble getting tf then you can go HERE for a more indepth tutorial on how to get it.
Tip Tip: Make sure you replace C:\HL2DS with your install path if it's different.

This will download all files necessary to host a Team Fortress 2 server (and Empires). And remember to "Go get yourself a cup of coffee." as valve said, this will take some time

  • Install the Empires Dedicated Server files to "C:\HL2DS\empires" (use your own install path).
  • Create a shortcut of srcds.exe and place it where you want then go to properties of the shortcut. Add the following to the end of the shortcut target:
-game empires +maxplayers 14 -port 27015 -console +map emp_canyon -autoupdate

It sould look like this;

srcds.exe -game empires +maxplayers 14 -port 27015 -console +map emp_canyon -autoupdate
Tip Tip: You can adjust your port and maxplayers via the shortcut or the server.cfg file.

Configuration

Next, edit your mapcycle.txt and server.cfg files to your liking.

Warning  Warning: When editing your server.cfg remember to change your rcon_password and hostname directives!
rcon_password "pass"  //Your rcon password
hostname "Servername" //The name of your server

These are the most important settings to change, there are more in the cfg so test around what is best for you.

Starting

You should now be able to double-click your server shortcut, which will start up your dedicated server.

Dedicated Server (Linux)

Downloading

First of all you need the HLDS Update Tool. This is what we use to update/download the server. You will also need Empires Dedicated Server from the Empires Download Page.

Installing SDS

Now we have to extract the HLDS-Update-Tool.

  • Go to the homedir of the user who is designated to run the HL2-Server and create a subdir.
hl2usr@hl2srv ~ # mkdir hl2
  • Copy the HLDS-Update-Tool into your new subdir and chmod it to make it executable:
hl2usr@hl2srv ~/hl2 # chmod +x hldsupdatetool.bin
  • Run the binary:
hl2usr@hl2srv ~/hl2 # ./hldsupdatetool.bin
  • If you get a warning about not finding "compress", go grab the "ncompress" package on Redhat/Fedora:
hl2usr@hl2srv ~/hl2 # yum install ncompress
  • Now that you have finished extracting the Update-Tool you can use it to download all required files:
hl2usr@hl2srv ~/hl2 # ./steam -command update -game "tf" -dir .

Get yourself a cup of tea, coffee, soda, etc., and have a rest. Depending on your connection speed this can take some time

Installing Empires

Next, we have to extract the previously downloaded Empires-Server.

  • Copy the zip-file (something like empires_v1xxx_server.zip) to the folder where the HLDS-Update-Tool resides (~/hl2 in this example) and extract it:
hl2usr@hl2srv ~/hl2 # unzip empires_v1xxx_server.zip -d orangebox

This command creates the directory ~hl2/orangebox/empires and extracts all needed files into it.

Configuration

Before you can start your new Dedicated Server the servers config files have to be altered to satisfy your needs.

  • cd to the "orangebox/empires" subdir
  • Edit the file mapcycle.txt with your prefered text editor and add/remove the maps you like/don't like in your mapcycle
  • cd to the config dir of your Empires installation (~/hl2/orangebox/empires/cfg in this example)
  • Edit the server.cfg to your liking
Warning  Warning: When editing your server.cfg remember to change your rcon_password and hostname directives!
rcon_password "pass"  //Your rcon password
hostname "Servername" //The name of your server

Starting

Now your server should be ready for startup

  • cd to your Dedicated-Servers basedir (~/hl2 in this example)
  • Start the Server:
hl2usr@hl2srv ~/hl2 # ./srcds_run -game empires +maxplayers 14 -port 27015 -console +map emp_canyon -autoupdate
Tip Tip: Use a terminal multiplexer like Screen to be able to detach the HL2-Server Console and disconnect from your servers shell without terminating the HL2-Daemon
  • You can create a Bash-File in your Dedicated-Servers basedir to easily start your Empires-Server in a virtual Screen-Terminal:
File: empires.sh
#! /bin/bash
screen -A -d -m -S empires -t empires ./srcds_run -game empires +maxplayers 14 -port 27015 -console +map emp_canyon -autoupdate

Some server operators prefer not to include the -autoupdate option so the updating of the server files is not automatic and therefore remains under their own control.

  • Now make the Bash-File executable and run it:
hl2usr@hl2srv ~/hl2 # chmod +x empires.sh
hl2usr@hl2srv ~/hl2 # ./empires.sh

The Dedicated-Server now runs in the background. You can attach to the Screen-Terminal by typing:

hl2usr@hl2srv ~/hl2 # screen -r empires

You can detach from the Screen-Terminal and leave the server running by typing a Control-A followed by a d.

To stop the server, reattach to the Screen-Terminal and type Control-C.

If you intend to run multiple servers then you will need to set a unique value for the port used & the the Screen-Terminal name used via the -port & -S options in the above command.

Related Links