Difference between revisions of "Running a server/Starting a server"

From Sven Co-op
Jump to navigation Jump to search
m (Category.)
 
Line 50: Line 50:
 
   SvenDS -console -port 27015 +maxplayers 8 +log on +map "stadium4"
 
   SvenDS -console -port 27015 +maxplayers 8 +log on +map "stadium4"
 
   ./svends_run -console -port 27015 +maxplayers 8 +log on +map "stadium4"
 
   ./svends_run -console -port 27015 +maxplayers 8 +log on +map "stadium4"
 +
 +
[[Category:Server]]

Latest revision as of 16:45, 12 December 2020

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.

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.

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"