Linode's Dedicated CPU instances are ideal for CPU-intensive workloads like those discussed in this guide. To learn more about Dedicated CPU, read our. To upgrade an existing Linode to a Dedicated CPU instance, review the guide.This guide will show you how to set up your own server on a Linode running Debian or Ubuntu. Hl2 is a multiplayer, first-person shooter video game. Before You Begin.Complete our guide.This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo.
If you’re not familiar with the sudo command, see the guide.Add two firewall rules to extend the port range available to the server. This command assumes that you have only the iptables rules in place from the SteamCMD guide. If not, find the corresponding lines and replace the numbers in INPUT 5 and INPUT 7 below: sudo iptables -R INPUT 5 -p udp -m udp -sport 0 -dport 1025:65355 -j ACCEPTsudo iptables -I INPUT 7 -p udp -m udp -dport 0 -j ACCEPTInstall Server Using SteamCMD.Execute steamcmd: steamcmd.Login as anonymous: login anonymous.Download the server: appupdate 232370 validate.Exit from SteamCMD: quitOccasionally, SteamCMD encounters an unreported error, but completes successfully. If the steps in the Run the Server section are not successful, repeat the installation process to retrieve all of the game data, then run the server again. Run the Steam Server.cd into the server folder: cd.steam/SteamApps/common/Half-Life 2 Deathmatch Dedicated Server/.Run the server:./srcdsrun -game hl2mp +svpassword MyLinode +mpteamplay 1 +maxplayers 8 +map dmrunoffIn the above command:.
game: The game’s files directory. This is the only parameter you can’t write in server.cfg because it specifies the game folder, where the server.cfg file itself is. svpassword: Password required to enter your server. If this parameter is not set, the server is accessible without a password.
mpteamplay: Specifies whether the game mode is team deathmatch or deathmatch. maxplayers: Maximum number of simultaneous players allowed on the server. Half-Life 2: Deathmatch officially supports a maximum of 16 players.map: The map with which to start the server. Write the name of the map file without the.bsp extension.For more parameter options, visit the.Stop the ServerTo stop the server, hold the CTRL key on your keyboard and press C ( CTRL+C). The output will resemble: Thu Jul 25 04:06:48 CEST 2017: Server QuitForcibly killing the server shouldn’t be harmful, but it can cause data corruption if you have plug-ins which write to a database. Run the Server Within a Screen SocketTo keep the server running in the background, execute it using Screen: screen./srcdsrun -game hl2mp +svpassword MyLinode +mpteamplay 1 +maxplayers 8 +map dmrunoffTo exit the screen: exitFor more information on Screen sockets, visit our guide on.
Server De Half Life 2018
Autostart with a Screen ScriptThis script automatically starts your server in a Screen session.Create the script: /.steam/SteamApps/common/Half-Life 2 Deathmatch Dedicated Server/run.sh. 1234#!/bin/shcd ' $HOME /.steam/SteamApps/common/Half-Life 2 Deathmatch Dedicated Server'screen -S 'HL2DM' -d -mscreen -r 'HL2DM' -X stuff './srcdsrun -game hl2mp +svpassword MyLinode +mpteamplay 1 +maxplayers 8 +map dmrunoffn'.Mark the file as executable: chmod +x run.sh.Run the script:./run.shConfigure the Half-Life 2 ServerThe server.cfg file contains the settings of your server. It is not present by default because you can start the server using the parameters from the command line.Note that if server.cfg is present, its settings override any parameters that are set when you start the server through the command line.Below is a sample server configuration: /.steam/SteamApps/common/Half-Life 2 Deathmatch Dedicated Server/hl2mp/cfg/server.cfg. 5// Default mapcycle file for hl2mp//// DO NOT MODIFY THIS FILE!// Instead, copy it to mapcycle.txt and modify that file. If no custom mapcycle.txt file is found,// this file will be used as the default.//// Also, note that the 'mapcyclefile' convar can be used to specify a particular mapcycle file.dmlockdown dmoverwatch dmpowerhouse dmresistance dmrunoff dmsteamlab dmunderpassTo add a custom map to the rotation:.Copy mapcycledefault.txt to mapcycle.txt: cp hl2mp/cfg/mapcycledefault.txt hl2mp/cfg/mapcycle.txt.Write the custom map’s name inside mapcycle.txt. For example: if you have the map dmcustom.bsp:/.steam/SteamApps/common/Half-Life 2 Deathmatch Dedicated Server/hl2mp/cfg/mapcycle.txt.
516// Default mapcycle file for hl2mp//// DO NOT MODIFY THIS FILE!// Instead, copy it to mapcycle.txt and modify that file. If no custom mapcycle.txt file is found,// this file will be used as the default.//// Also, note that the 'mapcyclefile' convar can be used to specify a particular mapcycle file.dmcustom // Your custom mapdmlockdowndmoverwatchdmpowerhousedmresistancedmrunoffdmsteamlabdmunderpassPlay Half-Life 2 on your Own Server.Open Half-Life 2 Deathmatch, and click FIND SERVERS:.Find your server in the servers list:.Double click on it to connect:More InformationYou may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.Join our Community.
Contents.The Half-Life Dedicated Server or HLDS is an application to run a dedicated server for games, without the client component.ConnectivityNo matter which type of server you are using, your computer must be able to receive unsolicited incoming connections. This is exactly what routers and software firewalls exist to prevent, so if you are using either you will have to reconfigure. Refer to the manufacturer instructions for how to do this.The ports HLDS officially requires are:.
27015 UDP (game transmission, pings). 27015 TCP (RCON). 27020 UDP (HLTV transmission). 26900 UDP (VAC service) - automatically increments if used in case of additional server processesHLDS has also been spotted opening connections on 27005 to 27030 UDP/TCP, but some of these may be outbound only.
Note: A residential internet connections may not have the upload capacity to support large games. InstallationSee for most games. See for games that haven't been updated in a long time.Configuring and running the serverNavigate to the folder you just installed your server in. There should be a bunch of files and folders, including a directory with the name of the game you have just installed, e.g. Cstrike for (1.6). The configuration files are located in the /cfg/ e.g.
Cstrike/cfg/ directory.Edit the main configuration file: /cfg/server.cfg. Change the hostname line (this is the name people will see in the server browser) and other options to your liking.WindowsOpen the dictory where you have installed the server and start the server by double click at hlds.exe or by batch command:hlds.exe -console -game +maxplayers X +map For example:hlds.exe -console -game cstrike +maxplayers 8 +map dedustLinuxOpen a terminal where you have installed the server and start the server./hldsrun -game +maxplayers X +map For example./hldsrun -game cstrike +maxplayers 8 +map dedustSee Also.External Links.