You can host a Barotrauma server either through the normal game application by clicking the "Host server" button in the main menu or by using the dedicated server application included with the game. If the computer you wish to run the server on has a private IP, you may need to forward ports in your router to allow players to connect to your server.
Hosting from the game client
--> Open the "Host server" menu from the main menu.
--> Enter a name for your server, select the maximum number of players, enter a password if you wish the server to be password-protected, and select whether you want the server to be publicly visible to others players.
--> Click "Start".
--> If you receive a prompt from Windows Firewall, your antivirus or a similar software asking whether to allow the application to connect to the internet, make sure you allow it to do so.
--> If the computer you wish to run the server on has a private IP, you may need to forward ports on your router (either manually or using UPnP port forwarding) to allow players to connect to your server. See the "forwarding ports" section for more instructions.
Hosting using the dedicated server
The dedicated server is a command line application, meaning that it has no graphical interface. It's more lightweight than the client application, and can be a better choice if you want to leave the server running in the background without playing on it yourself.
--> Launch a file called "DedicatedServer" inside the game folder.
--> If you wish to modify the settings for your server, you can edit a file called "serversettings.xml" inside the game folder. If the file is not present, it can be created by launching the DedicatedServer executable.
--> If you receive a prompt from Windows Firewall, your antivirus or a similar software asking whether to allow the application to connect to the internet, make sure you allow it to do so.
--> If the computer you wish to run the server on has a private IP, you may need to forward ports on your router (either manually or using UPnP port forwarding) to allow players to connect to your server. See the "forwarding ports" section for more instructions.
Forwarding ports
If the computer you wish to run the server on has a private IP, you may need to forward ports in your router to allow players to connect to your server.
Some routers support a feature called UPnP (universal plug and play) that can be used to automatically take care of port forwarding. You can enable it by selecting the "Attempt UPnP port forwarding" checkbox in the "Host server" menu, or when using the dedicated server, setting "enableupnp" to "true" in the "serversettings.xml" file.
Once you've enabled UPnP, you can check if others can connect to your server either by asking some else to join it, or by using some remote tool (see the "Resources" section below).
If others are unable to join your server after UPnP has been enabled, you may need to forward ports manually. We’re working on an alternative solution to remove the need for port forwarding, but for now this is how you can do it:
On many router models you can access the settings by navigating to http://192.168.1.1/ using your web browser, finding the port forwarding settings (sometimes called “application sharing”) and forwarding one of the ports using the following settings:
Game port (used to communicate with clients)
Service/Application: barotrauma
External Port: The port you have selected for your server (27015 by default)
Internal Port: The port you have selected for your server (27015 by default)
Protocol: UDP
Query port (used to communicate with Steam)
Service/Application: barotrauma
External Port: The port you have selected for your server (27016 by default)
Internal Port: The port you have selected for your server (27016 by default)
Protocol: UDP
If you are playing the old, non-Steam legacy version, you only need to forward the game port (14242 by default).
Resources
Remote Port Testing URLs
http://www.yougetsignal.com/tools/open-ports/
http://www.canyouseeme.org/
http://www.t1shopper.com/tools/port-scan/
Help with Forwarding Ports
http://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/
http://portforward.com/english/routers/port_forwarding/
http://en.wikipedia.org/wiki/Port_forwarding