keepcalculator

06 Numbers and Powers

Starbound Server in Docker: Step-by-Step Guide

Card No. 06·71853 · Updated · Standard formula, shown below

This guide walks you through running a dedicated Starbound server inside a Docker container. You’ll get a persistent, isolated server that starts on boot, survives reboots, and is easy to update or tear down. You’ll need Docker installed on your host machine (Linux, macOS, or Windows with WSL2) and basic comfort with the command line.

What You’ll Need

  • Docker Engine 20.10 or newer (check with docker --version)
  • Docker Compose (usually included with Docker Desktop; on Linux install docker-compose-plugin)
  • A Steam account that owns Starbound (for the first-time setup to accept the EULA)
  • Ports 21025 (game) and 21026 (query) open in your firewall if you want external players

Step-by-Step

  1. Create a directory for the server files. On your host, run:
    mkdir ~/starbound-server && cd ~/starbound-server
  2. Write a docker-compose.yml file. Create the file with your text editor and paste this:
    version: '3.8'
    services:
      starbound:
        image: ich777/steamcmd:starbound
        container_name: starbound-server
        environment:
          - STEAM_APPID=211820
          - STEAM_ACCOUNT=your_steam_username
          - STEAM_PASSWORD=your_steam_password
          - STEAM_AUTH=your_steam_guard_code_if_needed
          - EULA=TRUE
        ports:
          - "21025:21025/tcp"
          - "21025:21025/udp"
          - "21026:21026/tcp"
        volumes:
          - ./starbound-data:/server/steamcmd/starbound
        restart: unless-stopped

    Replace your_steam_username and your_steam_password with your actual Steam credentials. If you have Steam Guard enabled, generate a code and put it in STEAM_AUTH (you’ll need to do this only once).

  3. Start the container. Run:
    docker compose up -d

    The first run downloads the game server files via SteamCMD, which can take a few minutes.

  4. Accept the EULA. After the download finishes, the container will stop. Edit the file starbound-data/conf/eula.txt and change eula=false to eula=true. Save it.
  5. Start the server again. Run:
    docker compose up -d

    The server should now start. Check logs with:

    docker compose logs -f

    You’ll see “Server started” when it’s ready.

  6. Connect to the server. In Starbound, select Multiplayer, then Direct Connect, and enter your-server-ip:21025. If you’re testing locally, use localhost.
  7. Configure server settings. The main config is at starbound-data/conf/starbound_server.config. Edit it to change server name, max players, etc., then restart the container with docker compose restart.

Common Mistakes

  • Forgetting to accept the EULA. The server will exit immediately if eula.txt isn’t set to true.
  • Using the wrong Steam credentials. The server needs a valid Steam account; using a shared or borrowed account may fail.
  • Not opening ports in the firewall. Even if Docker maps ports, your host firewall must allow 21025/tcp and 21026/tcp.
  • Binding to localhost only. If you set 127.0.0.1 in the server config, external players can’t connect.
  • Running as root. The container runs as root by default; this is fine for testing but not ideal for production.

Tips

  • Use a dedicated Steam account for the server to avoid locking your main account.
  • Back up the starbound-data folder regularly – it contains world saves and player data.
  • Set restart: unless-stopped so the server comes back after a host reboot.
  • For automatic updates, add a cron job that runs docker compose pull && docker compose up -d weekly.
  • Use a named volume instead of a bind mount if you prefer Docker-managed storage.

Troubleshooting

  • Server won’t start. Check logs with docker compose logs. Common causes: EULA not accepted, missing Steam credentials, or corrupted game files. Delete the starbound-data folder and re-run the setup.
  • Can’t connect from another machine. Verify the host firewall allows ports 21025/21026, and that the server config has host: 0.0.0.0 (or the host’s IP).
  • Steam Guard prompts. If you see “Two-factor code required”, generate a code from the Steam mobile app and put it in STEAM_AUTH, then restart the container.
  • Container exits immediately. Run docker compose up (without -d) to see the error output. Often it’s a missing EULA or invalid config file.
  • World doesn’t save. Make sure the volume mount is correct. If you used a bind mount, check permissions – the container’s user needs write access to that folder.
  • Server is laggy. Reduce the world size in the config, or allocate more CPU/memory to Docker in your host settings.

Frequently Asked Questions

Do I need to own Starbound to run a server?

Yes, you need a valid Steam account with Starbound in your library to download the server files.

Can I run multiple servers on one machine?

Yes, create separate directories and compose files, and map different ports (e.g., 21025, 21026, 21027).

How do I update the server?

Run docker compose pull to get the latest image, then docker compose up -d to recreate the container. The game files will update automatically.

Can I use mods?

Yes, place mod files in the starbound-data/mods folder. They’ll be loaded on the next restart.

How do I make a backup?

Stop the container, then copy the starbound-data folder to a safe location. Restart when done.

Is it safe to expose the server to the internet?

It’s as safe as any game server. Keep the OS and Docker updated, use a strong Steam password, and consider a firewall rule that only allows your friends’ IPs.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →