Self-hosting a Barotrauma server (and when renting one is worth it)
Updated: 02 October 2026 · Guide · VPS · Game server
Barotrauma comes with its own dedicated server, anonymously via SteamCMD. Everything that makes up a round (game mode, traitors, career rules, damage) is in a single XML file.
Install and start
steamcmd +force_install_dir ~/barotrauma +login anonymous +app_update 1026340 validate +quit cd ~/barotrauma && ./DedicatedServer -port 27015 -queryport 27016
sudo ufw allow 27015:27016/udp
Fellow players join directly via “Join server” with address and port; that's more reliable than searching the list.
serversettings.xml
The file is in the installation folder and has well over a hundred attributes. A typo in an attribute easily goes unnoticed at start. So: only edit it while the server is stopped, and after starting check in game whether the change has arrived.
Workshop content
Custom submarines, items and maps must be present for all players in the same version. If one differs, the game refuses the connection. After game updates, Workshop content is the first place it breaks.
When nobody can connect
For us a Barotrauma server was listening on 27015 although the firewall rule was for a different port. The process was running, just not where the players were knocking. Barotrauma takes the port from serversettings.xml as long as the start line doesn't name one; -port and -queryport in the start line take precedence over the file. So set the port in exactly one place, ideally in the start line, and check where the server is really listening:
sudo ss -ulpn | grep -E ':(27015|27016)'
Players get as far as the lobby but are then kicked: usually a Workshop mod that the player has in a different version from the server (see above). After a game update, update the mods on both sides first.
Keep it running permanently
Instead of tmux or screen: as a systemd service the server starts by itself after a machine reboot, and a crash leads to a new start instead of an empty server. Create the file /etc/systemd/system/barotrauma.service:
[Unit] Description=Barotrauma Server After=network-online.target Wants=network-online.target [Service] User=<username> WorkingDirectory=/home/<username>/barotrauma ExecStart=/home/<username>/barotrauma/DedicatedServer -port 27015 -queryport 27016 Restart=on-failure [Install] WantedBy=multi-user.target
sudo systemctl daemon-reload sudo systemctl enable --now barotrauma journalctl -u barotrauma -f
Barotrauma saves campaigns between rounds. If you stop the service in the middle of a round, you lose that round's progress; so schedule restarts between two rounds.
Measured: a fresh server without players
Freshly ordered and without players, measured on 28 September 2026 on our game server node (Xeon Gold 6138): installation including the download via SteamCMD took 66 seconds, the first start 22 seconds. After that the server used 220 MB of RAM and 2 % of one core, 549 MB on disk; a full backup was 265 MB compressed and done in three seconds. The game port listened on UDP. RAM excluding file cache, CPU as a share of one core at idle.
Self-host or rent: the honest trade-off
With a Barotrauma server rented from us, almost all attributes of serversettings.xml are fields in the control panel, only ports and network bindings aren't, because you'd lock yourself out with them. At start the server checks for updates itself, and every night it creates a backup, keeping the last seven.
- Rent a Barotrauma serverserversettings.xml as fields in the control panel
- All Barotrauma settings in the panelGenerated from the control panel's source code
- Before this: secure the VPSSet up SSH key and firewall
- Server running, but nobody can join?Five checks and all default ports