Workload · Hosting a Barotrauma crew

Keep a Barotrauma dedicated server running for your crew, around the clock

To host Barotrauma so your crew can dive whether or not you are online, run the game's dedicated server, a separate Steam app (1026340) that installs with SteamCMD without a Steam account and runs on Linux as DedicatedServer. Your friends reach it on UDP port 27015, Steam's server browser asks about it on 27016, and two XML files decide its name, password and who gets to be in charge. Here is how to set one up on a server of your own and keep the campaign safe.

The short version
  1. Free Steam app 1026340, no Steam login needed
  2. Open UDP 27015 and 27016, nothing else
  3. Up to 16 players per server
  4. Campaigns saved in your Linux user's home folder
  5. Needs an x86 machine, not ARM

Why a server of its own beats hosting from your PC

The game can host a match from its own menu, but the world closes when you do. FakeFish added the SteamCMD version of the server in June 2019 for people who want a server running 24/7 on a remote machine, and that is the job here: a crew that can log in at 2 a.m. without waking you.

On a home connection you also have to forward ports on your router, which fills a good part of the official wiki's hosting page. A rented server has its own public IPv4 address with no home router or port forwarding in front of it, so you open two ports in its firewall and you are done. With us the machine is yours alone: every core, all the memory and root access, on a port that is not shared with any other customer at the access switch. Traffic is unmetered, so a long session never runs up a bill.

Will one machine handle a full crew?

For one world, almost certainly, but measure rather than guess: FakeFish does not publish hardware requirements, CPU or memory, for its server. The limits you can rely on come from the game itself.

QuestionAnswer from the official sources
How many players?MaxPlayers from 1 to 16; the game's code sets 16 as the ceiling
Which operating system?Linux works; the wiki says Ubuntu 24.04 appears fine out of the box, while 22.04 needs an older OpenSSL added by hand
Which processor family?x86-64: FakeFish's Linux server build targets linux-x64
Which ports?UDP 27015 for the game and UDP 27016 for Steam queries, both open to join and to show in the browser

A word of caution: the wiki's hosting page is flagged as potentially outdated, last updated for version 0.18. Treat its OpenSSL and steamclient.so notes as fixes to try if you run into that exact problem, not as steps everyone needs. The April 2021 Embrace the Abyss patch notes say Steamworks now installs the steamclient library automatically.

Our advice: run a full round with every slot filled and mods loaded, keep an eye on top, and size up only if it struggles. Mods add load the game's sources cannot predict for you.

The server that fits

  • Any of our x86 lines will do. Start with a modest machine; billing is month to month with no contract, so moving up later is not a trap. Browse the builds on our game server page.
  • Skip the ARM cartridge. The X-Gene cartridge runs nothing but Ubuntu 16.04 or 18.04, and there is no ARM build of the Barotrauma server to run on it.
  • Pick Ubuntu 24.04 when you order; it installs in one click on our Linux servers.
  • Want it tonight? Once your order is approved, a machine already in the rack is yours in about 30 minutes; instant servers shows what is racked. Payment checks can add time.

Our rack servers and blades include a browser-based remote console, handy if a firewall rule ever locks you out of SSH. Most cartridges offer power control only.

Up and running in an evening

Log in over SSH with your own sudo account. First the firewall, with IPv6 turned on before the rules so they cover both address families, then a separate user for the game called subsea, then SteamCMD from Ubuntu's multiverse repository. The final command asks you to accept Valve's Steam licence.

sudo sed -i 's/^IPV6=.*/IPV6=yes/' /etc/default/ufw
sudo ufw allow OpenSSH
sudo ufw allow 27015/udp
sudo ufw allow 27016/udp
sudo ufw --force enable
sudo useradd -m -s /bin/bash subsea
sudo add-apt-repository -y multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y steamcmd

Next, download the server as subsea and let systemd look after it. The wiki says the server will not start until a Daedalic Entertainment GmbH folder holding a Barotrauma folder exists under ~/.local/share, so the first line makes it too. Every start checks Steam for a patch first; the minus sign means a failed update check does not stop your server from coming up, and the 30-minute start timeout leaves room for a big download.

sudo -u subsea bash -c 'cd /home/subsea && mkdir -p "/home/subsea/.local/share/Daedalic Entertainment GmbH/Barotrauma" && /usr/games/steamcmd +force_install_dir /home/subsea/barotrauma +login anonymous +app_update 1026340 validate +quit'

sudo tee /etc/systemd/system/baro-server.service > /dev/null <<'EOF'
[Unit]
Description=Barotrauma server for the crew
Wants=network-online.target
After=network-online.target

[Service]
User=subsea
WorkingDirectory=/home/subsea/barotrauma
ExecStartPre=-/usr/games/steamcmd +force_install_dir /home/subsea/barotrauma +login anonymous +app_update 1026340 +quit
ExecStart=/home/subsea/barotrauma/DedicatedServer
TimeoutStartSec=1800
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now baro-server
  1. Watch it boot with sudo journalctl -u baro-server -f until the line Server started appears.
  2. Stop it with sudo systemctl stop baro-server before you change any settings: going by the game's source code, the server rewrites its own settings file when it starts and when it stops.
  3. Open /home/subsea/barotrauma/serversettings.xml and set ServerName, a password, MaxPlayers, and IsPublic to true if strangers should find you in the server browser.
  4. Lock the file down, since the game's code keeps the password there unencrypted: sudo -u subsea chmod 600 /home/subsea/barotrauma/serversettings.xml. Then start the service again.
  5. If the journal says InitGameServer returned false, or friends hit Steam authentication errors, the wiki's fix is to make ~/.steam/sdk64 for subsea and copy Steam's steamclient.so into it.

The everyday update skips validate on purpose. Valve's SteamCMD guide warns that validating overwrites installed files you have changed, and suggests it only for a fresh install or for repairing a broken one.

Making yourself the captain

You become an admin by naming your Steam account in Data/clientpermissions.xml, inside the install folder, while the server is stopped. You cannot type commands into the running service: when its input is redirected, as it is under systemd, the server's source simply ignores it. So the first admin comes from this file, and everything after that happens from the console inside the game.

<?xml version="1.0" encoding="utf-8" ?>
<ClientPermissions>
  <Client
    name="YourSteamName"
    accountid="STEAM_1:0:87654321"
    permissions="All">
    <command name="giverank" />
    <command name="showperm" />
    <command name="clientlist" />
    <command name="kick" />
    <command name="ban" />
    <command name="unban" />
  </Client>
</ClientPermissions>
  • permissions="All" gives every admin right, but console commands still have to be listed one by one, as above.
  • Keep a spare copy of the file: the wiki warns that a file the server cannot read is deleted and replaced with a blank one.
  • In game, giverank hands a friend one of the ready-made ranks (None, Moderator or Admin) and showperm tells you what someone already has.
  • The account ID can be written as STEAM_1:Y:Z, as the wiki shows; the parser in the source code also takes the long 17-digit Steam ID.

Keeping your campaign safe

A multiplayer campaign lives in the home folder of the user running the server, not next to the game files. Going by a comment in the game's save code and the .NET data path it uses, that is the Multiplayer folder in Daedalic Entertainment GmbH/Barotrauma, under /home/subsea/.local/share on this setup. A custom SavePath in the server's own config_player.xml, in the install folder, would move it, according to the same code.

  1. Stop the service so nothing is mid-write.
  2. Pack up the Multiplayer folder together with serversettings.xml and Data/clientpermissions.xml.
  3. Start the service again, then download the archive to your own computer or storage somewhere else.
  4. Treat that archive like the settings file: it contains your join password.

You manage the server; we keep the hardware and the network running. That makes copies of your crew's campaign your job, so keep at least one somewhere other than this machine.

Patches, mods and a second world

When FakeFish releases a patch on Steam, sudo systemctl restart baro-server is all it takes: the service stops the game cleanly (the Linux server handles SIGTERM gracefully since the October 2022 update), pulls the update and starts again. Everyone online gets dropped, so pick a quiet hour.

Mods follow the wiki's guide: subscribe on your own PC, copy the downloaded folders from your client's WorkshopMods/Installed into the same place under subsea's .local/share folder, and enable them in the server's config_player.xml. A second world would need its own install folder and its own two ports, say 27017 and 27018, each opened in ufw. That last part is our own reading of how the files are laid out, not an official recipe.

When you don't need this

  • You only play when the host is around anyway: the in-game host menu is simpler.
  • You want a panel that installs mods and runs backups for you. This is a whole Linux machine with root, and the game server on it is yours to look after.
  • You were eyeing our ARM cartridge or another ARM line: the server has no ARM build, so choose x86.

If something on the machine itself goes wrong, our team is on live chat, email and phone 24/7, every day of the year.

Questions people ask

Do I need a Steam account to install the server?
No. FakeFish set the server up as its own Steam app, 1026340, which SteamCMD downloads with login anonymous, as the June 2019 announcement explains.
Can I run it on Linux instead of Windows?
Yes, on 64-bit x86 Linux. Ubuntu 24.04 looks like the easy choice: the wiki says it appears to work as shipped, while on 22.04 the server looks for an OpenSSL version that release no longer carries. That note is from an older wiki page, so test it.
Which ports do my friends need?
Open UDP 27015 for the game and UDP 27016 for Steam queries. Both are set in serversettings.xml as port and queryport, so if you change them, change the firewall rules to match.
Why can't I type commands into the server?
Under systemd the server's input is redirected, and its code ignores redirected input. Give yourself admin rights in clientpermissions.xml instead and use the console inside the game.
Where do I find the campaign save on Linux?
In the running user's home: the Multiplayer folder of Daedalic Entertainment GmbH/Barotrauma, inside .local/share. Stop the server before you copy it.
Will my settings survive a restart?
Yes, as long as you edit them while the server is stopped. The game's source code shows it saving serversettings.xml on start and on shutdown, so changes made while it runs get written over.

Give your crew a submarine that is always docked

An x86 machine that is entirely yours, root included, a public IPv4 for both game ports, unmetered traffic and no contract, ready in about 30 minutes once approved.

Get a server for your Barotrauma crew

Read next