Hosting a Dedicated Server

From Official Barotrauma Wiki
Revision as of 19:52, 4 August 2021 by Jlobblet (talk | contribs) (SteamCMD Barotrauma location)
Jump to: navigation, search
Data is potentially outdated
Last updated for version 0.14.6.0
The current game version is 1.3.0.4

A Dedicated Server is a command-line application that has no graphical interface, meaning it has a lesser impact on your computer's performance than hosting a server through the full game.
If you want to host a server without needing to be in the game, this is the best way to do it.

Hosting Options

You are able to host a dedicated server with either the built-in application, or through SteamCMD. This guide will walk you through on how to do both.

DedicatedServer.exe

  • Before starting the server, make sure your server settings are in their desired state, and that port forwarding is setup correctly.
  • After you have finished tweaking server settings and setting up port forwarding, run the server executable "DedicatedServer.exe", located in the main Barotrauma folder.
  • Finally, after the command line reads "Server started", your dedicated server is ready to use!

SteamCMD

  • Before using SteamCMD to host a server, you will need to install it using these instructions.
  • After SteamCMD has been installed, log in using the command "login anonymous".
  • Next, install the Barotrauma Dedicated Server application by using the command "app_update 1026340 validate".
  • Then, before starting the server, make sure your server settings are in their desired state, and that port forwarding is setup correctly.
  • After you have finished tweaking server settings and setting up port forwarding, use the command "app_run 1026340" to start the server.
  • Finally, after the command line reads "Server started", your dedicated server is ready to use!

Port Forwarding

  • If your router supports Universal Plug and Play (UPnP), you can enable it in the server settings file; however this may occasionally not work.
  • To port forward manually, you will have to either open your service provider's website, or an IP Address link.
    • For the latter option, open command prompt and enter the command "ipconfig" in.
    • Then, copy the IPv4 address under "Default Gateway" and paste it into your browser in the format of "http://xxx.xxx.x.x"
    • Finally, log in to the router config page. The default username is typically "admin".
  • After logging in to your account, navigate to the "Port Forwarding" section.
  • Next, add two new port forwards, both over UDP, with the ports listed in the server settings file.
  • Finally, save the new port forwards and return to setting up your dedicated server.

Server Settings

Main article: Serversettings.xml


  • To edit the default server settings, navigate to and open the file "serversettings.xml".
    • If you are hosting using DedicatedServer.exe, this will be located in the main Barotrauma folder.
    • If you are hosting using SteamCMD, this will be located where you installed Barotrauma - either the default location under steamapps/common/Barotrauma Dedicated Server, or in a folder specified when you installed it.
  • Change the settings to their desired state, and save the file.