Installing a dedicated server is supported on [https://www.debian.org/CD/netinst/ 32 bit Debian 10]. <br>
First of all you need the [http://steampowered.com/download/hldsupdatetool.exe HLDS Update Tool]. This is what we use to update/download the server. You will also need Empires Dedicated Server from the [http://www.empiresmod.com/drupal/node/14 Download Page].
Debian 11 has some packages deprecated, this method will not work as described. However you can start with Debian 10 and then later upgrade to 11. <br>
If you have a 64 bit install you might need to execute the following as root: <br>
If you want to use [http://www.sourcemod.net/ SourceMod], make sure you download it before going any further.
dpkg --add-architecture i386
apt update
apt install lib32gcc1
=== Installing ===
Execute the following in a root shell to add the key and repository:
* 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:
* If that doesnt work or your stuck or having trouble getting orangebox then you can go [http://www.srcds.com/db/engine.php?subaction=showfull&id=1097362093&archive= HERE] for a more indepth tutorial on how to get it.
If you also want the community provided maps, you can install the empires-server-maps-extra package (warning, takes a long time to install):
This will download all files necessary to host an orange box server (and Empires). And remember to "Go get yourself a cup of coffee." as valve said, this will take some time
apt install empires-server-maps-extra
* Install the Empires Dedicated Server files to "C:\HL2DS\orangebox\empires" (use your own install path).
=== Opening the server console ===
* 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:
To open the server console, execute the following command:
{{Tip|You can adjust your port and maxplayers via the shortcut or the ''server.cfg'' file.}}
=== Configuration ===
su - empires -c "tmux attach"
Next, edit your mapcycle.txt and server.cfg files to your liking.
{{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.
To get out of the server console, dont do CTRL + C or you will kill the server <br>
You can do CTRL + B and then CTRL + D to detach and get out of server console <br>
You can do CTRL + B and then page up and page down to scroll higher in console, then ESC to get out of the CTRL + B mode (tmux basics, you can google them) <br>
=== Starting ===
Server folder is located in /var/lib/empires
You should now be able to double-click your server shortcut, which will start up your dedicated server.
== Dedicated Server (Linux) ==
You can also start or stop the empires-server service
=== Downloading ===
service empires-server stop
First of all you need the [http://storefront.steampowered.com/download/hldsupdatetool.bin HLDS Update Tool]. This is what we use to update/download the server. You will also need Empires Dedicated Server from the [http://empiresmod.com/download.php Empires Download Page].
service empires-server start
=== Installing SDS ===
== Dedicated Server (Windows) ==
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 "[http://ncompress.sourceforge.net/ 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:
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 ===
*Download and install (follow the instructions on the page): [https://developer.valvesoftware.com/wiki/SteamCMD SteamCMD].
Next, we have to extract the previously downloaded Empires-Server.
*Open a command line window with elevated / local administrator privileges and browse to the location of the update tool.
* 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:
{{Tip|Use a terminal multiplexer like [http://www.gnu.org/software/screen/ 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:
Please note that if you wish to retain explicit control over when updates happen on your server you can omit the -autoupdate option.
* 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 "d".
*to update Empires Dedicated Server follow the same procedure.
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.
== Server Extensions ==
There are several plugins available for use in Empires. Two extension systems are available (and can run in parallel):
* [http://www.sourcemod.net/ SourceMod] is the most common system, and is used for the majority of plugins. Handy SourceMod plugins that have been confirmed to work on Empires servers are:
** [http://raegquit.com/beerdude26/empires-plugins/rg_ungrief.smx Ungrief Command Vehicle] - Teleports the specified command vehicle to where you are looking. Usage: !ungrief <nf | be | imp>
** [http://www.sourcebans.net/ SourceBans] - A free global administration and banning system for Source engine based servers.
** For more plugins, look at the [[Sourcemod Plugins]] page.
* [http://www.sourceop.com/wiki/Installing SourceOp] is less popular, but is required to run an anti-DoS plugin:
** [http://www.sourceop.com/modules.php?name=Downloads&d_op=viewdownload&cid=9 DoS Attack Fixer] - Protects against A2C_PRINT and other spam.
=== Monitoring server resources ===
Both systems themselves run on [http://www.sourcemm.net/ MetaMod], allowing them to run in parallel.
==== Bandwidth ====
For monitor server bandwidth you can use "iftop" which will display bandwidth consumption on a per port/connections basis. NB: This program needs to run as '''root'''.
Assuming your running empires on the default 27015 port the follow will filter to show only empires traffic:
== Tips and Tricks ==
<pre>
=== Customize server.cfg settings ===
root@hl2srv ~/hl2 # iftop -P -f "port 27015"
As the server.cfg (amongst others) can be overwritten during upgrade and you may wish to have your server run in different "modes" such as password protected clan match/practice, increased resource rates for "tank wars", etc, it is best to treat your server.cfg as "read-only".
</pre>
A lightly loaded server with 4 active players and 7 recently departed:
Any default settings you wish to use can be placed in a separate file such as "myserver.cfg". At the end of server.cfg, you can then add the line "exec myserver.cfg".
Furthermore, you can hit the "t" key to display each connection on a single line rather than show receive and transmit on two lines.
If you want a mode to be automatically loaded after map change / server restart, you can add another line to server.cfg below the "exec myserver.cfg" entry.
==== CPU/Disk ====
For CPU usage you can use top (default installed all linux distros), htop (enhanced 'top') or atop.
[http://htop.sourceforge.net/ htop] gives a very good "at-a-glance" showing overall CPU core load, memory usage and the top dozen or so processes.
As an example of custom configuration you might want to use, the following line will disable the ability to join spectators at the start of the round:
It should be put at the end of the .cfg file so as to not delay any subsequent commands. The wait command delays all further commands by the amount specified in 1/100ths of a second.
[http://www.atcomputing.nl/Tools/atop/download-atop.html atop] will give you the missing Hard disk activity monitor by way of the "DSK" line's "busy" percentage:
== Running a beta server ==
<pre>
Running a beta server is just like a normal server, with the desired steam branch mentioned when downloading the server package.
As the server.cfg (amongst others) can be overwritten during upgrade and you may wish to have your server run in different "modes" such as password protected clan match/practice, increase resource rates for "tank wars", etc it's best to treat your server.cfg as "read-only" and any default settings you wish to have place them in a unique filename e.g. myserver.cfg then add a single line to the end of server.cfg "exec myserver.cfg"
This way server.cfg will then run myserver.cfg and override any server.cfg settings.
For example to set your server's hostname you'd add the following to myserver.cfg
<pre>
hostname "My Empires Server"
</pre>
In addition to myserver.cfg you can then create modified files to accommodate your various server "modes" which can either be called via
Installing a dedicated server is supported on 32 bit Debian 10.
Debian 11 has some packages deprecated, this method will not work as described. However you can start with Debian 10 and then later upgrade to 11.
If you have a 64 bit install you might need to execute the following as root:
And choose your favorite editor and add non-free to each repository
After that you can continue with:
apt update
apt install empires-server
Your server is now up and running.
You might also need to manually port forward
Ports:
UDP 27005
TCP and UDP 27015
If you also want the community provided maps, you can install the empires-server-maps-extra package (warning, takes a long time to install):
apt install empires-server-maps-extra
Opening the server console
To open the server console, execute the following command:
su - empires -c "tmux attach"
To get out of the server console, dont do CTRL + C or you will kill the server
You can do CTRL + B and then CTRL + D to detach and get out of server console
You can do CTRL + B and then page up and page down to scroll higher in console, then ESC to get out of the CTRL + B mode (tmux basics, you can google them)
Server folder is located in /var/lib/empires
You can also start or stop the empires-server service
service empires-server stop
service empires-server start
Dedicated Server (Windows)
Download and install (follow the instructions on the page): SteamCMD.
Open a command line window with elevated / local administrator privileges and browse to the location of the update tool.
to update Empires Dedicated Server follow the same procedure.
Server Extensions
There are several plugins available for use in Empires. Two extension systems are available (and can run in parallel):
SourceMod is the most common system, and is used for the majority of plugins. Handy SourceMod plugins that have been confirmed to work on Empires servers are:
Ungrief Command Vehicle - Teleports the specified command vehicle to where you are looking. Usage: !ungrief <nf | be | imp>
SourceBans - A free global administration and banning system for Source engine based servers.
Both systems themselves run on MetaMod, allowing them to run in parallel.
Tips and Tricks
Customize server.cfg settings
As the server.cfg (amongst others) can be overwritten during upgrade and you may wish to have your server run in different "modes" such as password protected clan match/practice, increased resource rates for "tank wars", etc, it is best to treat your server.cfg as "read-only".
Any default settings you wish to use can be placed in a separate file such as "myserver.cfg". At the end of server.cfg, you can then add the line "exec myserver.cfg".
This way, server.cfg will then run myserver.cfg and override any server.cfg settings.
Loading various server "modes" can then be done by calling them in the server console:
rcon exec tankwars.cfg
If you want a mode to be automatically loaded after map change / server restart, you can add another line to server.cfg below the "exec myserver.cfg" entry.
As an example of custom configuration you might want to use, the following line will disable the ability to join spectators at the start of the round:
It should be put at the end of the .cfg file so as to not delay any subsequent commands. The wait command delays all further commands by the amount specified in 1/100ths of a second.
Running a beta server
Running a beta server is just like a normal server, with the desired steam branch mentioned when downloading the server package.