Difference between revisions of "Running a server"

From Sven Co-op
Jump to navigation Jump to search
(Added "Starting up a server" section.)
(Added "Starting up a game quickly for your friends" section.)
Line 1: Line 1:
 
This section will guide you through the basic installation of Sven Co-op's dedicated server application.
 
This section will guide you through the basic installation of Sven Co-op's dedicated server application.
 +
 +
== Starting up a game quickly for your friends ==
 +
 +
If you're looking to begin a game to play with your friends as quickly as possible you should use the game's built-in "listen server", which is launched by using the '''Create Game''' option in the main menu.
 +
 +
You can find a more detailed explanation of this, and how it works, at this [https://steamcommunity.com/sharedfiles/filedetails/?id=1705149010 Guide on Steam Community: Creating a game for your friends without ANY port forwarding or firewall configuration at all].
 +
 +
The rest of this article will not be for you.
  
 
== Choosing a server package ==
 
== Choosing a server package ==
Line 126: Line 134:
 
This option is only available to the standalone application. You will need to open a command prompt or terminal environment on your system then change the working directory to your Sven Co-op dedicated server installation. (Usually '''C:\SvenDS''' or '''~/svends'''.)
 
This option is only available to the standalone application. You will need to open a command prompt or terminal environment on your system then change the working directory to your Sven Co-op dedicated server installation. (Usually '''C:\SvenDS''' or '''~/svends'''.)
  
Next you need to build a command to launch your server. The following list of arguments and parameters will determine how your server starts. Be sure to split them up with a space. Pay attention to those beginning with a hyphen (arguments) and those beginning with a plus (parameter), as they will not work with the wrong symbol. Sections ''highlighted'' before the colon are the parts you type, and underlined sections are parts you change.
+
Next you need to build a command to launch your server. The following list of arguments and parameters will determine how your server starts. Be sure to split them up with a space. Pay attention to those beginning with a hyphen (arguments) and those beginning with a plus (parameter), as they will not work with the wrong symbol. Sections ''highlighted'' before the colon are the parts you type, and italic sections are parts you change.
  
 
* '''SvenDS''' or '''svends_run''': The binary name of the application, does not need to have ".exe" on the end.
 
* '''SvenDS''' or '''svends_run''': The binary name of the application, does not need to have ".exe" on the end.
 
* '''-console''': Required, or your server will start in graphical mode.
 
* '''-console''': Required, or your server will start in graphical mode.
* '''-game modname''': Only needed if you are running a mod on our engine, otherwise ignore this.
+
* '''-game 'modname'''': Only needed if you are running a mod on our engine, otherwise ignore this.
* '''+ip ipaddress''': Only needed if your computer has more than one IP address assigned to it, and you need to specify which address to listen on. (This includes virtual interfaces such as Virtual Box, VMWare, and Hyper-V.)
+
* '''+ip 'ipaddress'''': Only needed if your computer has more than one IP address assigned to it, and you need to specify which address to listen on. (This includes virtual interfaces such as Virtual Box, VMWare, and Hyper-V.)
* '''-port 27015''': Chooses the network port to listen on, usually 27015 unless you're running more than one server on the same IP address.
+
* '''-port '27015'''': Chooses the network port to listen on, usually 27015 unless you're running more than one server on the same IP address.
* '''+maxplayers 12''': The maximum number of players that can be on your server at one time (2-32). It will be 12 if you do not specify this.
+
* '''+maxplayers '12'''': The maximum number of players that can be on your server at one time (2-32). It will be 12 if you do not specify this.
 
* '''+log on''': Start a log file for the server console.
 
* '''+log on''': Start a log file for the server console.
 
* '''+map "_server_start"''': Specify which map to launch the server on. If you do not specify this your server will remain stuck in an un-connectible state! If the map name begins with a hyphen you'll need to specify the map name in double quotes.
 
* '''+map "_server_start"''': Specify which map to launch the server on. If you do not specify this your server will remain stuck in an un-connectible state! If the map name begins with a hyphen you'll need to specify the map name in double quotes.

Revision as of 19:15, 6 October 2020

This section will guide you through the basic installation of Sven Co-op's dedicated server application.

1 Starting up a game quickly for your friends

If you're looking to begin a game to play with your friends as quickly as possible you should use the game's built-in "listen server", which is launched by using the Create Game option in the main menu.

You can find a more detailed explanation of this, and how it works, at this Guide on Steam Community: Creating a game for your friends without ANY port forwarding or firewall configuration at all.

The rest of this article will not be for you.

2 Choosing a server package

Our dedicated server package comes in two variants both with different benefits. One is distributed to you through your Steam client (the same application you use to launch games in Steam) as a tool, and the other is distributed through Steam's console client (SteamCMD) as a standalone application.

Here are the basic differences and benefits of them both:

Steam tool Standalone application
Distribution
  • Install through Steam.
  • Appears as a tool in your Steam account's library.
  • Ideal for temporary/observed servers.
  • Install through SteamCMD.
  • Downloads as a standalone application.
  • Ideal for permanent/unattended servers.
Benefits
  • Installation is fast and easy.
  • Start a server quickly through Steam.
  • Easy graphical interface to set options, see statistics, players, and manage bans.
  • Server will automatically update like with any other Steam package.
  • No Steam account required, though recommended.
  • No Steam client installation required.
  • Can play on your server at the same time.
  • Can be launched in graphical and console modes.
  • Can be launched as a regular application or system service.
  • Can run multiple servers with a single set of application files.
Drawbacks
  • Requires a Steam account.
  • Requires the Steam client to be running.
  • Can't play the game at the same time.
  • Can't be launched in console mode.
  • Can't be launched as a system service.
  • Can't run multiple servers.
  • Installation requires knowledge of a command line / terminal environment.
  • Starting a server requires a custom shortcut or command.
  • More complicated console/command interface to manage the server.
  • Updates must be downloaded manually or through a defined schedule.

3 Installation

3.1 Steam tool

Our dedicated server package in Steam will allow you to effortlessly install a server attached to your Steam account. It's quick, easy, and should be up and running as fast as you can download it. This is an ideal approach for temporary / part-time servers. You will require Sven Co-op to exist within your account first. (Doesn't have to be installed, but must be "purchased" so to speak.)

Instructions are as follows:

  1. Launch Steam and log in.
  2. In the main Steam screen hover over Library and click Tools.
  3. Scroll down the list of available tools until you see Sven Co-op Dedicated Server.
  4. Double-click the package to install it.
  5. Follow the on-screen installation.

That is it. You should now have the dedicated server tool ready to launch. Double-click the tool in the library and select Play Sven Co-op Dedicated Server to launch a server with a graphical interface.

3.2 Standalone application

Our dedicated server package is also available as a standalone package available via the SteamCMD tool. Though it requires further knowledge to install and use you will benefit from a server that doesn't depend on your Steam client, can be run as a console application, and even be run as an unattended system service. Permanent / full-time servers should opt for this approach. You will also NOT require an existing Sven Co-op installation to continue.

Warning: Do not use this method of installation if you are unfamiliar with some basic server administration concepts such as using a command prompt or terminal environment, and reading/writing configuration files.

Instructions are as follows:

  1. Open a command prompt or terminal environment on your system.
  2. Download and install SteamCMD.
  3. Download our dedicated server package with the following command:
    • On Windows:
      steamcmd +login anonymous +force_install_dir "C:\SvenDS" +app_update 276060 validate +exit
    • On Linux:
      steamcmd +login anonymous +force_install_dir "~/SvenDS" +app_update 276060 validate +exit`
    • Replace the path "C:\SvenDS" or "~/SvenDS" with a location to your preference.
  4. Wait for the package to download and validate.

Once it has finished you can use the SvenDS.exe or svends_run executable to launch a server. Launching without any arguments will start it with a graphical interface (Windows only), or if you specify the `-console` argument it will start with a console interface.

The same command is used to update the server application too, however be sure you have no server instances running or the update will fail.

4 Starting up a server

An instance of a Sven Co-op server can be run either interactively with a graphical interface, or as a text based console/terminal process either interactively or unattended. If you would like to run a server instance as an unattended service you're almost certainly going to need the console mode.

4.1 Graphical interface

To start a server with a graphical interface simply launch the Sven Co-op Dedicated Server tool in your Steam tools library (for Steam tool installations) or launch the SvenDS.exe / svends_run executable (for standalone application installations). You will be presented with a small form asking for some options.

  • Game: This will always be Sven Co-op, unless you're running a mod on our engine.
  • Server Name: This is the name of your server as shown in the game server list and on the score board in game.
  • Map: Choose a map to run immediately with your server. Osprey is a good choice if you want to get players in quickly, or Stadium4 for a gathering place for a group of friends.
  • Network: Internet means your server will be available to anyone with a valid Steam subscription, and players authenticate with their Steam ID number. LAN means your server will be available only to your local network, and players authenticate with their IP address.
  • Max. players: The maximum number of players that can be on your server at a time (2-32). Most maps become overcrowded with more than 12 players.
  • UDP port: The network port number for your server to listen on. If unsure leave as default (27015).
  • RCON password: The password used to remotely access the command console for your server. You should not tell anyone this password as it allows them to control your game server. It must be at least 3 characters consisting of only alpha-numeric characters. If you don't want to use this feature, just do a keyboard mash to input any random string.
  • Secure (Valve Anti-Cheat): Players will be scanned for game cheat applications as they join your server. Players caught and blacklisted by Valve's Anti-Cheat system will not be allowed to play on your server. You should leave this enabled in most situations.

Once you're ready click Start Server, it will take a moment to begin. All of these options will be remembered for the next time you start a server.

You will then (hopefully) be presented with a larger form depicting a tabbed management interface for your game server.

  • The Main tab tells you a bit about your server (which game, how many players are on, how long it's been running) along with changing some basic settings:
    • Server Name, Network, and RCON Password As in the launch options form.
    • Map: Immediately change to a new map from a list.
    • Player Password: Allows you to set (or unset) a password required for players to join your server (making your server private).
    • Map Cycle: A graphical tool to build a map cycle to run on your server.
  • The Configure tab allows you to change a broader set of options. Not all of these will be saved after you start a new server.
  • The Statistics tab shows you a graph about how well your server is performing such as CPU load, frame rate (tick rate), and network data.
  • The Players tab shows you a list of players currently connected, some information about them, and the ability to kick/ban players.
  • The Bans tab shows you a list of currently banned players and IP addresses, editing the bans list, and importing/exporting the list to a file for backup.
  • The Console tab shows you a simple textual representation what is happening on your server, along with the ability to submit commands to your server. You will need to look at this output if you need to find out why something has gone wrong. Avoid entering any commands you aren't sure of what they will do, particularly those given to you by other people you don't fully trust.

There is really little more I can tell you about running a server in graphical mode. You can close it down any time you like, then any players connected will be returned to the main menu with a message that the server is shutting down.

4.2 Console interface

This option is only available to the standalone application. You will need to open a command prompt or terminal environment on your system then change the working directory to your Sven Co-op dedicated server installation. (Usually C:\SvenDS or ~/svends.)

Next you need to build a command to launch your server. The following list of arguments and parameters will determine how your server starts. Be sure to split them up with a space. Pay attention to those beginning with a hyphen (arguments) and those beginning with a plus (parameter), as they will not work with the wrong symbol. Sections highlighted before the colon are the parts you type, and italic sections are parts you change.

  • SvenDS or svends_run: The binary name of the application, does not need to have ".exe" on the end.
  • -console: Required, or your server will start in graphical mode.
  • -game 'modname': Only needed if you are running a mod on our engine, otherwise ignore this.
  • +ip 'ipaddress': Only needed if your computer has more than one IP address assigned to it, and you need to specify which address to listen on. (This includes virtual interfaces such as Virtual Box, VMWare, and Hyper-V.)
  • -port '27015': Chooses the network port to listen on, usually 27015 unless you're running more than one server on the same IP address.
  • +maxplayers '12': The maximum number of players that can be on your server at one time (2-32). It will be 12 if you do not specify this.
  • +log on: Start a log file for the server console.
  • +map "_server_start": Specify which map to launch the server on. If you do not specify this your server will remain stuck in an un-connectible state! If the map name begins with a hyphen you'll need to specify the map name in double quotes.

Here is a simple example to start an 8-player server on map stadium4 listening on port 27015 with logging enabled:

 SvenDS -console -port 27015 +maxplayers 8 +log on +map "stadium4"
 ./svends_run -console -port 27015 +maxplayers 8 +log on +map "stadium4"