Barotrauma Dedicated Server Setup Guide
This guide walks you through configuring and running your Barotrauma dedicated server hosted on Legion Hosting, including server settings, submarine selection, campaign save management, and how to connect.
Table of Contents
- Configuring serversettings.xml
- Submarine Selection and Upload
- How to Connect
- Campaign Save Management
Configuring serversettings.xml
The primary configuration file for your Barotrauma server is serversettings.xml, located in the root of your server installation directory. You can edit this file via GPanel using the built-in file manager, or upload a modified version via SFTP.
serversettings.xml. The server overwrites this file on shutdown, so changes made while the server is running will be lost.
Key Settings
Below are the most important settings you will want to configure. The file uses standard XML attribute syntax.
| Setting | Description |
|---|---|
ServerName |
The name displayed in the in-game server browser. |
Port |
The main UDP port players connect to. Must match your GPanel port assignment — check the Network tab in GPanel. |
QueryPort |
The UDP port used for Steam server list queries. Check the Network tab in GPanel for the correct value. |
Password |
Set a password to restrict access. Leave blank for a public server. |
MaxPlayers |
Maximum number of players allowed on the server simultaneously. |
AllowSpectating |
Whether players can join and spectate without taking a crew role. |
GameMode |
The game mode. Valid values: Campaign, Mission, Sandbox. See below for details. |
Game Modes
- Campaign — Persistent co-op mode with progression, crew management, and a persistent save file. Recommended for regular friend groups.
- Mission — Individual round-based missions. No persistent progression between sessions. Good for public servers.
- Sandbox — Free-form mode with no objectives. Useful for building, testing submarines, or experimenting with mods.
Example serversettings.xml Snippet
<?xml version="1.0" encoding="utf-8"?>
<serversettings
ServerName="Legion Hosting Barotrauma"
Password=""
MaxPlayers="8"
AllowSpectating="true"
GameMode="Campaign"
Submarine="Humpback"
AutoRestart="true"
EnableUPnP="false"
/>
EnableUPnP="false" on hosted servers. UPnP is only relevant for home routers and will cause unnecessary connection attempts on dedicated infrastructure.
Port and QueryPort to the values shown in the Network tab of your GPanel.
Submarine Selection and Upload
The active submarine is set via the Submarine attribute in serversettings.xml. The value must match the submarine's filename (without the .sub extension) exactly, including capitalisation.
Default Submarines
Barotrauma ships with several built-in submarines. Common defaults include:
Humpback— Beginner-friendly, small crew.Dugong— Balanced mid-size submarine.Typhon— Large, requires a full crew.Typhon2— Upgraded large submarine.Kastrull— Community favourite, versatile layout.
Uploading a Custom Submarine
If you have built or downloaded a custom submarine (.sub file), upload it to the Submarines/ directory in your server installation. You can do this via SFTP or the GPanel file manager.
- Connect to your server via SFTP or open the GPanel file manager at gpanel.legionhosting.net.
- Navigate to the
Submarines/directory inside your Barotrauma server folder. - Upload your
.subfile into this directory. - Open
serversettings.xmland update theSubmarineattribute to the exact filename without the extension. For example, if your file isMySub.sub, setSubmarine="MySub". - Save the file and start your server.
Submarines/. See the Mod Installation Guide for details.
How to Connect
Players can join your Barotrauma server in two ways: through the in-game server browser or via direct connect.
Server Browser
- Launch Barotrauma and click Play Online from the main menu.
- Wait for the server list to populate. Use the search box to find your server by name.
- Click your server and select Join. Enter the password if one is set.
Direct Connect
- From the Play Online screen, click Direct Join.
- Enter your server IP address and main port in the format
xxx.xxx.xxx.xxx:port. Check the Network tab in GPanel for these values. - Click Join.
If you are unsure of your server's IP address and port, refer to How to Find Your Server IP and Port.
Campaign Save Management
In Campaign mode, the server maintains a persistent save file that tracks progression, crew, money, and the state of the submarine. Understanding where this file lives and how to manage it is important for backups and resets.
Save File Location
Campaign saves are stored in the Saves/Multiplayer/ directory within your server installation folder. Each campaign is saved as a folder containing multiple files.
Backing Up a Campaign
- Stop your server from GPanel to ensure no data is being written.
- Connect via SFTP and navigate to
Saves/Multiplayer/. - Download the entire campaign folder to your local machine as a backup.
- Restart the server when done.
Resetting a Campaign
- Stop your server.
- Navigate to
Saves/Multiplayer/via SFTP or the GPanel file manager. - Delete the campaign folder you wish to reset.
- Start the server. A new campaign will be created when a player starts one from the main menu in-game.
Restoring from Backup
- Stop your server.
- Upload the backed-up campaign folder back into
Saves/Multiplayer/via SFTP, overwriting any existing files with the same name if prompted. - Start the server.
Related Articles
- Barotrauma Mod Installation Guide — Workshop mods, mod management, and compatibility
- Barotrauma Troubleshooting Guide — Common issues and solutions
- How to Find Your Server IP and Port
- How to Upload Files via SFTP