Operating System CentOS

How to Install a Starbound Dedicated Server on AlmaLinux 9 or Rocky Linux 9

Install the Starbound dedicated server with SteamCMD on AlmaLinux 9 or Rocky Linux 9, set the server name and accounts, and run it under systemd.

This guide installs the Starbound dedicated server on AlmaLinux 9 or Rocky Linux 9 with SteamCMD, sets its name, player limit and accounts, opens the firewall and runs it as a systemd service that restarts with the machine. CentOS 7 reached end of life in June 2024; the RHEL 9 family replaces it. Package names for Debian and Ubuntu are given where they differ.

Requirements

  • A 64-bit server running AlmaLinux 9, Rocky Linux 9 or CentOS Stream 9. Starbound has no 32-bit Linux server.
  • A user with sudo rights.
  • A Steam account that owns Starbound. The dedicated server is Steam app 211820, the same app as the game. Valve's dedicated server list marks it as requiring a game purchase with no anonymous download, so login anonymous does not work.
  • Access to the e-mail inbox or mobile authenticator of that Steam account, for the Steam Guard code.

Step 1: Install dependencies

SteamCMD is a 32-bit program and needs the 32-bit C and C++ runtime libraries. The Starbound server needs the Vorbis audio file library.

sudo dnf update -y
sudo dnf install -y glibc.i686 libstdc++.i686 libvorbis tar curl

On Debian and Ubuntu the equivalents are lib32gcc-s1 and libvorbisfile3.

Step 2: Create a service account

Do not run a game server as root. Create a dedicated system account whose home directory is under /opt, and switch to it:

sudo useradd --system --create-home --home-dir /opt/starbound --shell /bin/bash starbound
sudo -iu starbound

The account has no password, so nobody can log in to it directly. The next two steps run as starbound.

Step 3: Install SteamCMD

Download and unpack Valve's SteamCMD archive into its own directory:

mkdir -p ~/steamcmd
cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -

Step 4: Download the server files

Set the install directory before logging in, then log in with the account that owns the game and download app 211820. Replace YourSteamUser:

cd ~/steamcmd
./steamcmd.sh +force_install_dir /opt/starbound/server +login YourSteamUser +app_update 211820 validate +quit

SteamCMD updates itself, then asks for the password and the Steam Guard code. Give only the user name on the command line, as shown: a password in a command or script ends up in shell history and in files other people can read. The download is finished when you see Success! App '211820' fully installed.

Step 5: Run the server once to create its configuration

The server binary must be started from its own directory:

cd /opt/starbound/server/linux
./starbound_server

Wait until the log shows that it is listening, then stop it with Ctrl+C. The first run creates /opt/starbound/server/storage/, which holds the universe (worlds and player data) and the configuration file starbound_server.config.

Step 6: Configure the server

Edit the configuration while the server is stopped:

nano /opt/starbound/server/storage/starbound_server.config

The file is JSON. The settings most servers change:

SettingDefaultMeaning
serverNameemptyName of the server
maxPlayers8Player slots
gameServerPort21025Port players connect to
allowAnonymousConnectionstrueWhether players can join without an account from serverUsers
serverUsers{}Named accounts with a password and an admin flag
runRconServerfalseRCON on rconServerPort (21026) with rconServerPassword

To make the server private, turn anonymous connections off and define accounts. Players enter the account name and password in the game's multiplayer screen:

"allowAnonymousConnections" : false,
"serverUsers" : {
  "deploy" : {
    "admin" : true,
    "password" : "use-a-long-random-password"
  },
  "friend" : {
    "admin" : false,
    "password" : "another-long-password"
  }
},

Keep the commas and quotes valid. If the file has a syntax error at startup, the server renames it to starbound_server.config.old and writes a fresh default file, which silently discards your settings. Leave the starbound shell when you are done:

exit

Step 7: Open the firewall

Players connect to TCP port 21025:

sudo firewall-cmd --permanent --add-port=21025/tcp
sudo firewall-cmd --reload

With ufw on Debian or Ubuntu use sudo ufw allow 21025/tcp. If your provider has a network firewall in front of the server, allow the port there too. Leave the RCON port closed unless you enabled RCON and have restricted it to your own address.

Step 8: Run the server as a systemd service

Create the unit file:

sudo nano /etc/systemd/system/starbound.service
[Unit]
Description=Starbound dedicated server
After=network-online.target
Wants=network-online.target

[Service]
User=starbound
Group=starbound
WorkingDirectory=/opt/starbound/server/linux
ExecStart=/opt/starbound/server/linux/starbound_server
KillSignal=SIGINT
Restart=on-failure
RestartSec=15

[Install]
WantedBy=multi-user.target

KillSignal=SIGINT stops the server the same way Ctrl+C does, so it shuts down cleanly and saves the universe. Enable and start it:

sudo systemctl daemon-reload
sudo systemctl enable --now starbound

Verify

systemctl status starbound
sudo journalctl -u starbound -n 30 --no-pager
sudo ss -tlnp | grep 21025

In the game choose Join Game, enter the server's IP address (for example 203.0.113.10), leave the port at 21025 and, if you defined accounts, fill in the account name and password.

Updating and backups

Stop the service, run the same SteamCMD command as starbound, and start the service again. Steam may ask for a new Steam Guard code:

sudo systemctl stop starbound
sudo -iu starbound
cd ~/steamcmd
./steamcmd.sh +force_install_dir /opt/starbound/server +login YourSteamUser +app_update 211820 validate +quit
exit
sudo systemctl start starbound

Everything worth backing up is in /opt/starbound/server/storage/. Copy it while the server is stopped:

sudo systemctl stop starbound
sudo tar -czf /root/starbound-storage-$(date +%F).tar.gz -C /opt/starbound/server storage
sudo systemctl start starbound

Troubleshooting

  • SteamCMD reports no subscription for app 211820: the account you logged in with does not own Starbound, or you logged in anonymously.
  • The service fails with status 203/EXEC: SELinux refused to let systemd execute the binary. Check with sudo ausearch -m avc -ts recent, then label the binary as an executable: sudo semanage fcontext -a -t bin_t '/opt/starbound/server/linux/starbound_server' followed by sudo restorecon -v /opt/starbound/server/linux/starbound_server. semanage is in the policycoreutils-python-utils package.
  • The server exits with a missing library error: run ldd /opt/starbound/server/linux/starbound_server | grep "not found" as any user and install the package that provides the listed library.
  • Settings keep reverting: look for starbound_server.config.old next to the configuration file. Its presence means the server rejected your edit because of a JSON error.

Frequently asked questions

Do I have to buy a second copy of Starbound for the server?

No. The server files are downloaded with the same Steam account that owns the game, and SteamCMD only needs that account for the download and for updates. The server process itself does not stay logged in to Steam.

Can I avoid typing the Steam Guard code on every update?

SteamCMD caches the login on the machine after a successful sign-in, so repeated updates from the same account and directory often go through without a new code. When the cached session expires it asks again. Do not work around this by putting the password in a script.

How do players become administrators?

Give their entry in serverUsers the value "admin" : true and restart the service. Admin commands are only accepted from those accounts as long as allowAdminCommandsFromAnyone stays false, which is the default.

Can I change the port?

Yes. Set gameServerPort in starbound_server.config, open the new TCP port in the firewall instead of 21025, and tell players to enter that port when they join.

Share story:

Continue reading other guides on How VPS.