Difference between revisions of "Dedicated Server Setup"

From Empires Wiki
Jump to: navigation, search
(Dedicated Server (Linux))
 
(70 intermediate revisions by 14 users not shown)
Line 1: Line 1:
 
{{Sitenav|Dedicated Server Setup}}
 
{{Sitenav|Dedicated Server Setup}}
 +
 +
== Dedicated Server (Linux) ==
 +
Installing a dedicated server is supported on [https://www.debian.org/CD/netinst/ 32 bit Debian 10]. If you have a 64 bit install you might need to execute the following as root:
 +
 +
dpkg --add-architecture i386
 +
apt update
 +
apt install lib32gcc1
 +
 +
To install the server, execute the following in a root shell:
 +
 +
apt-key add - <<-KEY
 +
-----BEGIN PGP PUBLIC KEY BLOCK-----
 +
 +
mQGNBFw/ZjgBDAC78OjFtCcWQuh0d6YpVu/kfr/qibzAwP13bl3o1FTGha2i/dOo
 +
XdWvnbDDcRmZ7aJjr4aUIbjLbpEGYVrcX8+0kBYbcbmwJWPjfWg0/RyS0Jk+yXD+
 +
DcUrWQC1Ib31zTW8QeoEmuD48H2QBuX3jMCAT+8ThsdkAbzkyEbc7AHDsRsZLDQ9
 +
uKrZGvMpi2Q9T3kKLNAOlYux92sgdP+kvBJ2/lFUm+yZzNwWfdmLiMSseALUtkeh
 +
ERkRwS0a4bEcL1+Yd32RNa5WxoIVXimAxzTAQ+aIIrpOzkQwzxwA7HKyYhd6jj1p
 +
VfVa2Q8PrinJN+a10uFK1m/c5IUOwEsTbM+45hkZTxN1+ZO51OU+JvjYmcCJzKC0
 +
wlKBeG0t9SHZZ/3v5bJHinbvXu4j2oSgr2kuBNvqBT3AxZk/MVojxAhnu+X23/TT
 +
7rEDaCzVz8s16pYRJZjBvVk7INq5b2WCRFlhwEDekf3ThhNhwTbbatrKBpXbVb+R
 +
11Z1KexuW7F6jOkAEQEAAbQnTWF4IE1hdG9uIChwYWNrYWdlcykgPGluZm9AbWF4
 +
bWF0b24ubmw+iQHUBBMBCgA+FiEEpOkWittoxBWISDs56eNqER324vYFAlw/ZjgC
 +
GwMFCQPCZwAFCwkIBwIGFQoJC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W2BhZLVFb7UhhxWlZgQa3wscZkZtqwEi40yGq7a+JUWu5Q
 +
H+AygLFlgrXU0LkAEQEAAYkBvAQYAQoAJhYhBKTpForbaMQViEg7OenjahEd9uL2
 +
BQJcP2Y4AhsMBQkDwmcAAAoJEOnjahEd9uL2vCIL/A5lhwHGevts6rWGDrGO0fOG
 +
noRVED9aU+hS2VaWr6x2mC/PuNiw1rz9UDRml6um8KVU7fh8+Z/lTJwnBo3dHwIz
 +
UWIwnQ1zaFsjzlxK7FK2bATJlM+g1TYhmyB3GAd7seLLxa5IB7k8bfYNYXYeZvJw
 +
i0/sG9uTwilbVzl2n+BFrliXOGw9fJKzP48LfLUuBEn6usRxjIMdXzEH7WhOsZFZ
 +
AMmQOn6sfOieyoYjY1XVSXG01Y8UEm0wTHDG9ulotTn+BuVF8x4Ofb2WKOn/baP3
 +
R5BOd68Mea6pxHmwxd2BkHZvTyTTQndXOFqF7N0w1J+avxfXZnzlCtduCWg3k7mz
 +
TenRhxINtvVt6XIIP4M5SytU/R0TcI0PQCbkFXEMOPC6ov/ASCMFc9YUYz3LujqS
 +
uuxOfdtSD/BkggL5dB+vNN4hWXZ4klPvSUWj1+qsgD5lWse3rODxuU6sTF1e3jzG
 +
GKcQ8Ze2ZfnnVeyoSma/Y0ygxUAkamS7I8pLJvdIrg==
 +
=g0Xa
 +
-----END PGP PUBLIC KEY BLOCK-----
 +
KEY
 +
echo 'deb http://deb.maxmaton.nl/debian buster main non-free' > /etc/apt/sources.list.d/maxmaton.list
 +
apt update
 +
apt install empires-server
 +
 +
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"
  
 
== Dedicated Server (Windows) ==
 
== Dedicated Server (Windows) ==
=== Downloading ===
 
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://empiresmod.com/download.php Empires Download Page].
 
  
If you want to use [http://www.mani-admin-plugin.com/ Mani Admin Plugin], make sure you download it before going any further.
+
*Download and install (follow the instructions on the page): [https://developer.valvesoftware.com/wiki/SteamCMD SteamCMD].
 +
*Open a command line window with elevated / local administrator privileges and browse to the location of the update tool.
 +
*Update syntax example:
 +
 
 +
<pre>
 +
steamcmd.exe +login anonymous +app_update 460040 validate +quit
 +
</pre>
 +
 
 +
*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):
 +
* [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.
 +
** [http://kigenac.com/viewtopic.php?f=4&t=231 Kigen's Anti-Cheat] (Requires Sockets 3.0.1 plugin) - An extensive anti-cheating plugin.
 +
** 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.
 +
 
 +
Both systems themselves run on [http://www.sourcemm.net/ 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:
 +
 
 +
<pre>
 +
rcon exec tankwars.cfg
 +
</pre>
 +
 
 +
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:
  
=== Installing ===
+
<pre>
* 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:
+
emp_allowspectators 0; wait 30000; emp_allowspectators 1
C:\HL2DS
+
</pre>
* When you have finished installing the update tool open the install folder in a command prompt and type:
 
hldsupdatetool.exe -command update -game "hl2mp" -dir C:\HL2DS 
 
{{Tip|Make sure you replace C:\HL2DS with your install path if it's different.}}
 
This will download all files necessary to host a Half-Life 2 Deathmatch 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).
+
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.
* 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|You can adjust your port and maxplayers via the shortcut or the ''server.cfg'' file.}}
 
  
=== Configuration ===
+
== Running a beta server ==
Next, edit your mapcycle.txt and server.cfg files to your liking.
+
Running a beta server is just like a normal server, with the desired steam branch mentioned when downloading the server package.
{{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.
+
<pre>
 +
steamcmd.exe +login anonymous +app_update 460040 -beta beta validate +quit
 +
</pre>
  
=== Starting ===
+
See this link for more info on automating server creation, and on switching to specific steam branches.
You should now be able to double-click your server shortcut, which will start up your dedicated server.
+
https://developer.valvesoftware.com/wiki/SteamCMD#Automating_SteamCMD
  
 
== Related Links ==
 
== Related Links ==
 
* [http://server.counter-strike.net/server.php?cmd=cmdall General HL2 Directives/Commands]
 
* [http://server.counter-strike.net/server.php?cmd=cmdall General HL2 Directives/Commands]
* [http://www.mani-admin-plugin.com/ Mani Admin Plugin]
+
* [http://www.sourcemod.net/ SourceMod]
 +
* https://pastebin.com/SXsp0r2F

Latest revision as of 15:25, 25 February 2019

Home > Dedicated Server Setup

Dedicated Server (Linux)

Installing a dedicated server is supported on 32 bit Debian 10. If you have a 64 bit install you might need to execute the following as root:

dpkg --add-architecture i386
apt update
apt install lib32gcc1

To install the server, execute the following in a root shell:

apt-key add - <<-KEY
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBFw/ZjgBDAC78OjFtCcWQuh0d6YpVu/kfr/qibzAwP13bl3o1FTGha2i/dOo
XdWvnbDDcRmZ7aJjr4aUIbjLbpEGYVrcX8+0kBYbcbmwJWPjfWg0/RyS0Jk+yXD+
DcUrWQC1Ib31zTW8QeoEmuD48H2QBuX3jMCAT+8ThsdkAbzkyEbc7AHDsRsZLDQ9
uKrZGvMpi2Q9T3kKLNAOlYux92sgdP+kvBJ2/lFUm+yZzNwWfdmLiMSseALUtkeh
ERkRwS0a4bEcL1+Yd32RNa5WxoIVXimAxzTAQ+aIIrpOzkQwzxwA7HKyYhd6jj1p
VfVa2Q8PrinJN+a10uFK1m/c5IUOwEsTbM+45hkZTxN1+ZO51OU+JvjYmcCJzKC0
wlKBeG0t9SHZZ/3v5bJHinbvXu4j2oSgr2kuBNvqBT3AxZk/MVojxAhnu+X23/TT
7rEDaCzVz8s16pYRJZjBvVk7INq5b2WCRFlhwEDekf3ThhNhwTbbatrKBpXbVb+R
11Z1KexuW7F6jOkAEQEAAbQnTWF4IE1hdG9uIChwYWNrYWdlcykgPGluZm9AbWF4
bWF0b24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owXeuZWSwahE
mCuYoCWzBiVVN3tQzkW2BhZLVFb7UhhxWlZgQa3wscZkZtqwEi40yGq7a+JUWu5Q
H+AygLFlgrXU0LkAEQEAAYkBvAQYAQoAJhYhBKTpForbaMQViEg7OenjahEd9uL2
BQJcP2Y4AhsMBQkDwmcAAAoJEOnjahEd9uL2vCIL/A5lhwHGevts6rWGDrGO0fOG
noRVED9aU+hS2VaWr6x2mC/PuNiw1rz9UDRml6um8KVU7fh8+Z/lTJwnBo3dHwIz
UWIwnQ1zaFsjzlxK7FK2bATJlM+g1TYhmyB3GAd7seLLxa5IB7k8bfYNYXYeZvJw
i0/sG9uTwilbVzl2n+BFrliXOGw9fJKzP48LfLUuBEn6usRxjIMdXzEH7WhOsZFZ
AMmQOn6sfOieyoYjY1XVSXG01Y8UEm0wTHDG9ulotTn+BuVF8x4Ofb2WKOn/baP3
R5BOd68Mea6pxHmwxd2BkHZvTyTTQndXOFqF7N0w1J+avxfXZnzlCtduCWg3k7mz
TenRhxINtvVt6XIIP4M5SytU/R0TcI0PQCbkFXEMOPC6ov/ASCMFc9YUYz3LujqS
uuxOfdtSD/BkggL5dB+vNN4hWXZ4klPvSUWj1+qsgD5lWse3rODxuU6sTF1e3jzG
GKcQ8Ze2ZfnnVeyoSma/Y0ygxUAkamS7I8pLJvdIrg==
=g0Xa
-----END PGP PUBLIC KEY BLOCK-----
KEY
echo 'deb http://deb.maxmaton.nl/debian buster main non-free' > /etc/apt/sources.list.d/maxmaton.list
apt update
apt install empires-server

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"

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.
  • Update syntax example:
steamcmd.exe +login anonymous +app_update 460040 validate +quit
  • 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.
    • Kigen's Anti-Cheat (Requires Sockets 3.0.1 plugin) - An extensive anti-cheating plugin.
    • For more plugins, look at the Sourcemod Plugins page.
  • SourceOp is less popular, but is required to run an anti-DoS plugin:

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:

emp_allowspectators 0; wait 30000; emp_allowspectators 1

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.

steamcmd.exe +login anonymous +app_update 460040 -beta beta validate +quit

See this link for more info on automating server creation, and on switching to specific steam branches. https://developer.valvesoftware.com/wiki/SteamCMD#Automating_SteamCMD

Related Links