01
Before you start
Barotrauma's dedicated server is a command-line program with no graphical interface. It exists for Windows (DedicatedServer.exe) and Linux (DedicatedServer), and downloads with SteamCMD without a Steam account.
- System: the official wiki warns that the Linux server does not work on every distribution, because it looks for an older version of OpenSSL. According to the wiki, Ubuntu 24.04 works out of the box, whereas Ubuntu 22.04 requires installing an older library by hand. This guide therefore uses an Ubuntu 24.04 VPS with a
sudo user.
- Version: players need the same game version as the server. Update it with every game update.
- Resources: the publisher gives no figure for the server. Large submarines, mods and many players need more processor and memory: keep an eye on usage with the guide monitoring a VPS's resources.
- Windows: if you prefer Remote Desktop, the same server runs on a Windows VPS with
DedicatedServer.exe; see a game server on a Windows VPS.
Do the basic security settings first (SSH key, firewall, updates) with the guide securing a Linux VPS.
02
Install SteamCMD and the server
Create a dedicated user, install the 32-bit library SteamCMD needs, then SteamCMD itself:
sudo apt update
sudo apt install -y lib32gcc-s1 screen curl
sudo useradd -m -s /bin/bash baro
sudo -iu baro
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
Download the server (ID 1026340, anonymous login):
~/steamcmd/steamcmd.sh +force_install_dir /home/baro/serveur +login anonymous +app_update 1026340 validate +quit
The official wiki adds two steps for Linux. The server does not start without the following data folder, which you create beforehand:
mkdir -p ~/".local/share/Daedalic Entertainment GmbH/Barotrauma"
And if the server stops with InitGameServer returned false, or if players cannot authenticate, copy the steamclient.so library into ~/.steam/sdk64:
mkdir -p ~/.steam/sdk64
cp /home/baro/serveur/linux64/steamclient.so ~/.steam/sdk64/
If that file does not exist in the server folder, take SteamCMD's (~/steamcmd/linux64/steamclient.so). Server updates use the same SteamCMD command, with the server stopped.
03
Configure serversettings.xml
The settings are in /home/baro/serveur/serversettings.xml; if it does not exist yet, start the server once (see below) so that it creates it. Edit it with the server stopped: it is a single XML element in which each setting is an attribute. The attributes to look at first, according to the official wiki:
name="Mon serveur Barotrauma FR"
port="27015"
queryport="27016"
password=""
IsPublic="True"
MaxPlayers="10"
ServerMessage="Campagne en coopération, débutants bienvenus"
PlayStyle="Casual"
GameModeIdentifier="campaign"
name: the server's name. Do not edit ServerName, which is only a copy of it.
port and queryport: the game port (27015) and the Steam query port (27016). Both must be open for the server to be reachable and visible in the list.
password: the password players must enter. When empty, the server is open. With BanAfterWrongPassword, a player is banned after too many attempts (3 by default, set by MaxPasswordRetriesBeforeBan).
IsPublic: False in the original file. Set it to True to appear in the server list.
ServerMessage: the server's description, also shown in the chat on arrival.
PlayStyle: Serious, Casual, Roleplay, Rampage or SomethingDifferent, shown in the list.
GameModeIdentifier: sandbox, mission, campaign or pvp.
Campaign-specific settings (difficulty, starting money, world hostility) are in the campaignsettings child element of the same file. Several settings can also be changed from the game lobby by an administrator.
04
Run the server, ports and administrators
The server has an interactive console: run it in a screen session, as the wiki suggests, so that it keeps running after the SSH session ends:
sudo -iu baro
cd ~/serveur
screen -S baro ./DedicatedServer
The server is ready when the console shows Server started. Detach with Ctrl+A then D, come back with screen -r baro. The quit (or exit) command stops the server. To start automatically when the VPS boots, add @reboot cd /home/baro/serveur && screen -dmS baro ./DedicatedServer to the baro user's crontab (see scheduled tasks on a VPS).
Ports. The wiki says to open the file's two ports, as UDP:
sudo ufw allow OpenSSH
sudo ufw allow 27015:27016/udp
sudo ufw enable
For a second server on the same VPS, give it another folder and two other ports: the logic is explained in game server ports.
Administrators. The simplest way: once the player is connected, type giverank in the server console, followed by their name and the rank you want. The ranks provided are None, Moderator and Admin:
giverank NomDuJoueur Admin
The server saves this right in Data/clientpermissions.xml. You can also write that file by hand, with the server stopped, using the player's Steam ID in the STEAM_1:… format:
<?xml version="1.0" encoding="utf-8" ?>
<ClientPermissions>
<Client
name="NomDuJoueur"
accountid="STEAM_1:1:12345678"
permissions="All">
</Client>
</ClientPermissions>
Be careful: according to the wiki, a badly formatted file is deleted and recreated by the server. The kick, ban and unban commands are then used in the console.
05
Workshop mods and campaign backups
Mods. The official wiki's method goes through your computer:
- subscribe to the mods on the Steam Workshop and launch Barotrauma, which downloads them;
- copy the mod folders from
WorkshopMods/Installed (on Windows, in %LocalAppData%/Daedalic Entertainment GmbH/Barotrauma) to the same folder on the VPS, ~/.local/share/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed, with scp or over SFTP (see connecting to a VPS over SSH);
- enable them in the
config_player.xml file in the server folder: copy the list of content packages from your game's config_player.xml, then restart the server.
With AllowModDownloads="True" (the original value), players missing a mod can download it from the server when they connect.
Backups. The server keeps its multiplayer campaigns in ~/.local/share/Daedalic Entertainment GmbH/Barotrauma/Multiplayer, with the installed mods right next to them. Back up that folder with the settings, with the server stopped:
cd /home/baro
tar czf baro-$(date +%F).tar.gz ".local/share/Daedalic Entertainment GmbH/Barotrauma" serveur/serversettings.xml serveur/config_player.xml serveur/Data/clientpermissions.xml
Remove from the command any files you have not created, then copy the archive off the VPS. Make one before every game update.
06
On CloudFive
CloudFive has no ready-made Barotrauma plan: the server is installed on a VPS, as in this guide. The Ryzen VPS, from €5.99 per month, is well suited:
- an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage;
- root access and a dedicated IPv4 address;
- basic anti-DDoS protection included. The game-specific filter is part of Premium Protection, a paid option (see protecting a game server from DDoS).
The servers are in France, on our own AS218808 network, monthly with no commitment, with support in French 7 days a week (tickets, Discord, phone). The VPS's gaming uses are summed up on the gaming VPS page; for another co-op game on the same machine, see for example creating a Don't Starve Together server.
07
Frequently asked questions
How do I create a Barotrauma dedicated server on Linux?
Install SteamCMD, download the server with ID 1026340 using an anonymous login, create the ~/.local/share/Daedalic Entertainment GmbH/Barotrauma folder, then run ./DedicatedServer in a screen session. Set up serversettings.xml and open UDP ports 27015 and 27016.
Which ports should I open for a Barotrauma server?
Two UDP ports: 27015 for the game and 27016 for Steam queries, by default. They are changed with the port and queryport attributes in serversettings.xml; both must be open for the server to be reachable and visible.
Why does my Barotrauma server not show up in the list?
In the original file, IsPublic is False: set it to True in serversettings.xml, with the server stopped. Also check that the query port, 27016 UDP by default, is open in the firewall.
How do I make someone an administrator on a Barotrauma server?
Once the player is connected, type giverank followed by their name and Admin in the server console; the right is saved in Data/clientpermissions.xml. You can also write that file by hand with their Steam ID in the STEAM_1 format and permissions="All".
Where are a Barotrauma server's campaign saves?
On Linux, in ~/.local/share/Daedalic Entertainment GmbH/Barotrauma/Multiplayer, in the home folder of the user running the server. Archive that folder with the server stopped, along with serversettings.xml and clientpermissions.xml, before every update.