Starbound

Starbound

Nicht genug Bewertungen
Creating & Managing a Server With Game Server Manager
Von jimbobslimbob
Takes you through the process of setting up a Starbound server with Game Server Manager which automates things & provides a host of useful tools & features to make running your server easier.
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
Summary
This guide differs from others you may have read because of one important factor: the Game Server Manager program. This program automates things for you as a server owner and provides a host of useful tools and features to make setting up and running your server so much easier.

Game Server Manager features - an overview
- Automatic update checking and applying via SteamCMD (with configurable delay and server warning message)
- Players online graph
- Built-in Telnet and RCON client, which can be used manually or set to automatically send messages and commands (such as shutdown and shutdown notices) to the server
- Auto-restart if server goes down
- Message/command broadcast system
- Discord message broadcasting for server state and player changes.
- Player list showing everyone online, including ping, score, team and time online.
- INI File Parser, which displays a list of all ini file settings (across multiple files) in a list that you can sort, filter, edit, import and export as you wish.
- CPU and RAM usage display, with graph
- Network bandwidth monitor, with graph
- Ability to output status, players online and server name to a file - formatted however you want
- Single-click access to configuration.
- Detailed server information
- Internal and external IP address display
- Server up-time display
- Optional timed daily server restart.
- Timed incremental backups. Perform a daily backup of game data to a zip file.
- Automatically update game - Ability to run a maintenance / update program between restarts. e.g. SteamCMD to perform daily updates automatically. The server will start back up again when this program finished / ends so you minimise downtime.
- Option to delay timed restarts. i.e. The server will be turned off and the program will wait X seconds before attempting to restart it.
- Telnet to server
- 1 click backup and maintenance
- Remote commands to start, stop, backup, update and send commands to your server.
- Game Profiles - Multiple instances of the program can be run with multiple configurations.
- Designed to be "universal" and work with a multitude of games.
Initial Setup
Download The Game Server Manager

Head to this [www.jimbobslimbob.com]website to download my Game Server Manager[www.jimbobslimbob.com] program.

Extract the zip file to a location of your choosing and run the program.

Download SteamCMD

If you have not got it already, head to this site and download and extract SteamCMD.

Installing Starbound Server Files

Open GSM (Game Server Manager) and head to "Settings/Tools > Time Restart and Maintenance". Click the "..." button under "Program location" and select the location of your SteamCMD executable. This will set up GSM to use SteamCMD for updating.

Add the following command into the command-line parameters box at the bottom of the screen:

+login Username Password +force_install_dir "C:\Starbound" +app_update 211820 +quit
Replace "C:\Starbound" with wherever you want it installed, along with your Steam Username and Password.

Please note: The first time it is performed on the machine, you may need to enter a "Steam Guard Code" before being allowed access. This is Steam's additional security layer where it will send you an e-mail with a code to input. Input it when prompted by SteamCMD. If you are unable to do so here, run SteamCMD on its own and login once to set it all up - further logins should then be automatic.

Run the maintenance program via the "Tools" tab and let SteamCMD update and install the game for you.

Port Forwarding and Firewall

You will need to forward the following ports (usually performed from your router's admin page) to the machine that you are hosting the server on:

21025 TCP

These are the default ports. If you alter them then don't forget to alter the port forwarding rules as well.

You will also have to ensure that the executable "starbound_server.exe" (located in the "win32" subfolder under your main installation folder) is allowed through any firewalls you have active.

Setting Up GSM

We now need to tell GSM some things about the server. Head to "Server Details" in the settings screen and select your Starbound server executable "starbound_server.exe". This file will be in the folder you installed the game originally, under "\win32".


To get the program to correctly query it, enter the IP address of the server and the query port in the relevant field. If you are running your own server this would normally be "127.0.0.1:21025" and select "Common" as the Query Type. If you have altered the default ports, you may need to do so here as well. The query and game port is 21025 by default.

Tick "Detect via query" in the "Monitoring" tab if you want the status of the server to be detected by a server query, rather than seeing if the program is running (highly recommended).

Important note: You must set "runQueryServer" to true in the server configuration file to allow GSM to correctly query the server for information. Please see the section below, titled "Server Configuration" for details on how to perform this.

Monitoring and restarting


It is recommended that you tick "Check server status, every" in the "Monitoring" tab under settings. You may want to increase the interval at which the check is performed if your server takes longer to be "ready". This actively monitors the server and updates the "Main" and "Players Online" tabs and gives you access to the following:

  • Automatically restarting the server if it goes down/crashes
  • Players online graph
  • Performance (RAM and CPU) graph
  • Network bandwidth graph
  • Ability to output the status to a file (to share or embed, for example)

Server Configuration

Important: You must run the dedicated server client at least once for the proper configuration file to be generated. Once the file exists, you can safely exit the server client and then configure to your will.

The file "starbound_server.config" can be found in the "storage" subfolder. This file contains various parameters that can be altered to your liking. Some of the more important server-related settings are shown below:

Setting
Description
gameServerPort
Port the server binds to
gameServerBind
IP address the server binds to
bannedUuids
List of banned player id's
bannedIPs
List of banned IP addresses
serverName
The server name
maxPlayers
Maximum number of players
upnpPortForwarding
Use UPNP port forwarding
allowAdminCommands
Allow use of admin commands (on a user account basis)
allowAdminCommandsFromAnyone
Allow anyone to use admin commands
runQueryServer
Important: Set to true to allow GSM to query the server
queryServerPort
Query server port
queryServerBind
Query server IP
runRconServer
Set to true to allow RCON capability
rconServerPort
Port that RCON binds to
rconServerBind
IP address that RCON binds to
rconServerPassword
RCON password
rconServerTimeout
RCON timeout

Tip: It can be handy to set a server configuration file in the program's settings via Server Details > Server Config File (optional) to allow you quick access to it via Game Server Manager. Select the file mentioned above.

Further information
If you want to read more on dedicated server setup, here are a few useful links:

Setup Guide from 2016[community.playstarbound.com]
Wiki Guide[starbounder.org]

Passwording a Server

Currently, Starbound supports "account-bound" passwords, via the configuration file. As a basic example, you can create two accounts. One for normal players and one for admins. This allows all normal players to login using the generic "Player" account - and all admins to use a different one. No player data is attached to specific accounts for a server - it's purely used to password your server.

Example (a player account and an admin account):
"serverUsers" : { "admin" : { "admin" : true, "password" : "MyAdminPassword" }, "player" : { "admin" : false, "password" : "MyPlayerPassword" } },

You can copy-paste this into your configuration file and adjust as necessary.
General Use
To start the server simply click on "Start Server" on the "Main" tab. To stop the server, use the button next to start.

The main screen is split into tabs, showing different information on your server. Here you can see the number of players online, up-time, server status, performance and bandwidth details, graphs and access various tools and functions.

The Game Server Manager was designed to be highly configurable and there are many things you can do with it. Some of those features are discussed in the sections below.
Setting Up The Built-in RCON Capabilities [Optional]
GSM has built-in RCON functionality, which can be used with Starbound. Along with the many admin functions that can be performed with it, GSM can make use of the RCON features in several ways:

- It can send messages to players on the server before a timed restart (10, 5 and 1 minute before) with "say"
- It can be used to quickly send RCON commands to the server within the program

To set this up you must ensure the relevant configuration options are set in the server configuration file, namely:
"rconServerBind" : "*", "rconServerPassword" : "MyRCONPW", "rconServerPort" : 21026, "rconServerTimeout" : 1000, "runQueryServer" : true, "runRconServer" : true,

Change the password to something unique to avoid anyone logging in and messing with your server.


Head to the "Telnet/RCON Client" tab on the settings screen and set it up to look like the screenshot shown, obviously replacing the password and port to whatever your server uses and entering whatever messages you would like to send when a shutdown occurs. The most important things here is select "RCON" as the "Mode" and enter your password and RCON port. The port is 21026 by default. You can also add some useful messages to be sent to the connected clients before the update by adding something like "say '10 minutes until restart'" - configured in the "Automatic Commands" tab. This will give your users a heads-up before a timed restart is performed.

Once it is all setup, you should be able to connect to the server via the "Telnet/RCON" tab on the main screen. You can alternatively set the program to automatically connect when it sees the server is online.

RCON Commands
Type "help" in RCON to get a full list of all RCON commands. Output is as follows:

Basic commands are: /admin, /deaths, /help, /naked, /played, /pvp, /reload, /serverwhoami, /suicide, /whereami, /whoami Admin commands are: /ban, /clearstagehand, /disablespawning, /enablespawning, /kick, /list, /placedungeon, /resetuniverseflags, /serverreload, /setspawnpoint, /settileprotection, /setuniverseflag, /spawnitem, /spawnliquid, /spawnmonster, /spawnnpc, /spawnstagehand, /spawntreasure, /spawnvehicle, /timewarp, /unbanip, /unbanuuiud, /warp, /whereis Debug commands are: /boxes, /cinema, /clearboxes, /clearcinematics, /clearradiomessages, /clearscannedobjects, /completequest, /debug, /enabletech, /entityeval, /eval, /failquest, /fixedcamera, /fullbright, /giveessentialitem, /gravity, /maketechavailable, /previewnewquest, /previewquestcomplete, /previewquestfailed, /radiomessage, /resetachievements, /resetgravity, /setgravity, /startquest, /statistic, /togglelayer, /upgradeship Use /help commandName to get detailed documentation.

You can also type "help xxxx", where xxxx is the command to get more detailed help on it. For example, typing "help admin" produces the following:

Usage /admin. Enables or disables admin mode, which enables all crafting recipes, prevents damage or energy loss, and allows access to admin-only commands.

Backing up game data [Optional]
The program has a built in incremental backup system for game files. To use this you must set up the locations first.

Go to "Settings/Tools" and click "Program Settings". Navigate to the "Backup" tab. Click the button to the right of the various "Folder to backup" ("...") to browse for the folder you wish to backup.


The default folder for Starbound game data is the "storage" subfolder in the main game folder. Under here there are various folders, containing content such as player data and universe data.

Ensure you select the folders you want to backup in GSM (you can choose up to 5). In Starbound's case, it's recommended to simply select the entire "storage" folder. Next set the location that you want the backups to be saved to in the box below.

Optional: if you want the program to automatically backup game data daily, you can set the relevant option in this screen. Simply tick "Backup data, at" and enter a time (24-hour clock).

You can then manually perform a backup by clicking "Backup Game Data" under the "Settings/Tools" tab.
Updating and timed restarts [Optional]
The program has a built in feature to restart a server at a specific time of day. This can be found in the "Timed Restart" tab under the program settings.

Set up the time you want this to be performed and tick the "Timed restart, at" tickbox if you want to do this.


Even if you do not wish to set a timed restart, you can still make use of this screen. By selecting a program and entering any optional command line parameters in the "Run a program before starting server" section, you can enable updating the server - either manually or automatically.

For example, if you use SteamCMD to update your game, select the SteamCMD executable here and enter any command line details in the relevant box (see Initial Setup section).

Once this is set, you now have the option to perform this action on timed restarts. It will do it all for you!

You can then also use "Run Maintenance Program" under the "Settings/Tools" tab to run this program manually at any time.

Additional tip: if you have also set a backup location you can use "Perform Maintenance Now" under the "Settings/Tools" tab to perform the following sequence:
1. Back up game data
2. Stop Server
3. Run the "maintenance" program
4. Start the server back up again.
Using SteamCMD to update your game [Optional]
Regardless of whether you installed the game via the Steam client or some other method, you can still use SteamCMD to update Starbound. As long as you point SteamCMD to the location of your Starbound installation, it will update it from there.

Download SteamCMD from here.

Head to the "Program Settings" and navigate to "Timed Restart" tab. Select the SteamCMD executable under "Program Location". Next, you need to tell SteamCMD what game we are updating - and where it is. To do this, we can add a number of commands in the command-line parameters field. Here are some of the ones you may need to use (put spaces between separate commands - and omit any < and > shown in the commands):

+login <username> <password>
This will log you into Steam and allow the game to be downloaded.
Please note: The first time it is performed on the machine, you may need to enter a "Steam Guard Code" before being allowed access. This is Steam's additional security layer where it will send you an e-mail with a code to input. Input it when prompted by SteamCMD. If you are unable to do so here, run SteamCMD on its own and login once to set it all up - further logins should then be automatic.

+force_install_dir "<path>"
Tells SteamCMD that the game is located here. Enter the full path of Starbound here (e.g. "C:\Starbound").

+app_update 211820
Will tell SteamCMD to go ahead and update Starbound

validate
Validate that the game files are all present and correct. Tag this at the end of the above statement, without a "+" sign.

+quit
Tells SteamCMD to quit - this should always be the last command on your list.

So, an example command line could be:
+login MySteamUsername MySteamPassword +force_install_dir "C:\MyGameLocation" +app_update 211820 validate +quit

Once this has been set up you can use both the "Run Maintenance Program" (simply runs the program) and "Perform Maintenance" (will Back up game data, stop server, run the "maintenance" program, and finally start the server back up again) buttons under the "Settings/Tools" tab to update the game. Moreover, if you have set a timed restart, it will update the game before starting the server back up!

Automatic Updating
Once you have the above set, you can also tell the program to check for game updates at a regular interval. When an update is found it will automatically stop the server, update it and restart it again.

To do this, head to the "SteamCMD Auto-Updates" tab under "Program Settings" and fill out the details on this screen. You will need to enter your Steam username and password here, along with an "appid" (211820) and "branch" (public).

Once entered, select a time frame for how often the program should check for updates and tick the "Check for game updates, every" box. You are now good to go!

You can even make the program delay an update once found, for a configurable time period, in order to broadcast a message to players on your server, warning them of the impending update.
Remote Commands [Optional]
Pseudo Remote Commands Via Discord, FTP/VPN (or other similar means)
This will allow you to start, stop, backup and run maintenance (update) your server remotely (regardless of any built in features a game has).

To do this you will need to have access to the folder that the program is running in via VPN, FTP or some other means. I will not cover how to do that here, since that is really another topic altogether. I will assume that for this guide, you already have access to the folder.

An alternative method is using the recently added DiscordBot - which is a companion program used with GSM to allow all the commands to be accessed via a Discord server. For more information on that - and to download it - see here[www.jimbobslimbob.com].

How to do it

The program periodically looks to see if any of the files listed below are sitting in the folder with it. If it sees any of them it will perform the corresponding actions (and remove the file). So, to perform any of the actions listed below all you have to do is create/copy a file into the Game Server Manager folder with the corresponding name (contents of file makes no difference). The program will see the file and perform the action. Simple as that!

Start the server
File: start.txt

Stop the server
File: stop.txt

Perform a backup
File: backup.txt

Full maintenance cycle (backup, stop server, run maintenance program, start server)
File: update.txt

Restart the server
File: restart.txt
NOTE: Ensure you have set a sufficient delay in the "Server Shutdown" tab or else the server may attempt to restart before it has properly shut down.

Restart the server with command-line parameter set #1
File: parm1.txt
The command-line parameter for this is set in the "Telnet Commands" tab. You can also access this feature via the "Quick Tasks" dropdown button on the "Main" tab.
NOTE: Ensure you have set a sufficient delay in the "Server Shutdown" tab or else the server may attempt to restart before it has properly shut down.

Restart the server with command-line parameter set #2
File: parm2.txt
The command-line parameter for this is set in the "Telnet Commands" tab. You can also access this feature via the "Quick Tasks" dropdown button on the "Main" tab.
NOTE: Ensure you have set a sufficient delay in the "Server Shutdown" tab or else the server may attempt to restart before it has properly shut down.

Send command(s) to the server
File: telnetsend.txt
The program will read all text in this file and send it to the server console (Telnet, RCON or direct to the executable, depending on how you have set it up and provided you set this up under "Initial Setup > Setting Up GSM")
Basic Port Forwarding Guide [Reference]
Basic (Generic) Guide

NOTE:You only need to perform port forwarding if your server is going to be accessed over the internet. If you are hosting a LAN game then it is not required.

1. Find your hosting machine's LAN (internal) - displayed on the "Main" tab of GSM.

2. Log into your router's admin page in a web browser. This is variable - but most router's by standard, have the details written on the device itself somewhere (a sticker). It will be something like 192.168.0.1 or 192.168.0.255... or whatever. You will undoubtedly require a password, which is no doubt also on the sticker. If there is nothing on the router itself then you may have to get in contact with your ISP (if it's an ISP's router) or Google for the default login details of your specific router model.

3. Once you are into the router's admin pages, search for something called "port forwarding" amongst the menus. Difficult to say exactly where it would be, since all routers are different. Again, Google may be your friend here.

4. Set up a "rule" under the port forwarding screen to direct UDP / TCP traffic from the required ports to the LAN address you found in #1.

5. Save the rules and you should be good go go.

Final Note: If your hosting machine is set up to dynamically retrieve a LAN address on your network then it is possible that subsequent boots will alter your LAN address and cause port forwards to be pointing to the wrong machine. If this happens, you can either alter the port forwards again, or, even better, change your LAN address to static (and set an address manually). Another Google[www.google.co.uk] can help you with this.
Troubleshooting
My friends cannot join the game
If you can connect locally but your friends cannot, it is almost always a firewall, AV or port forwarding issue. Ensure all is configured as it should be.

Things to check:
1. Have you let the server executable through any firewalls you have (Windows, router etc.)? Remember that Windows firewall has 3 different "profiles" (Domain, Private and Public), so ensure you have the correct ones ticked - or tick them all. Also ensure it is allowed through in both directions (incoming and outgoing).

2. Have you port forwarded all the required ports to the correct internal IP address of the server?

3. Is your server's local IP static? If not, it is liable to change on reboots and mess up your port forwarding rules. You should ideally set it to static to prevent any further changes. Either way, check to ensure your local IP has not altered and subsequently nullified your port forward rules.

4. Do you have any other software (Anti-virus or VLAN software like Hamachi) that could be interfering with network communication for the server?

5. Are you hosting on the same machine you are trying to join the game from? If so you may have a router incapable of "hairpinning"[en.wikipedia.org]. In such a case, connect to it via local IP (using the LAN server browser or manually by LAN IP), rather than external IP.

Game Server Manager says my server is "Offline" when it is not
Ensure you have entered the correct IP address and port under Server Details (1) for the IP:Port of server to query. This should be "127.0.0.1:21025" by default, but if you have altered ports or are hosting on another IP address then you will need to change this.

I cannot connect to my server from the same machine I host on
There could be a port conflict. You could try and alter the ports used by the server.
Final Words
I hope this guide and the Game Server Manager was useful to you.

It may interest you to know that the program has been tried and tested not only with Starbound - it works with Neverwinter Nights, Killing Floor 2, Eden Star, Empyrion, Avorion, 7 Days to Die, GRAV, Medieval Engineers and Space Engineers too. Infact, any game that uses the standard querying language should work with it.

I have also used it to a lesser capacity in hosting servers for Project Zomboid, Evochron Mercenary, Planet Explorers, Void Expanse and many more that I am sure I have forgotten.

Hopefully now you have read the guide, you will have a good understanding as to how it works if you want to try it out on other games.

The Game Server Manager program is being updated regularly by myself. It has all been done in my spare time, to aid server hosters.

I hope you enjoy your server!
6 Kommentare
jary 7. Aug. 2022 um 13:21 
Whenever i try to start the server it "Error retrieving server info" and when i try to connect Telnet/RCON it cannot connect anymore stating: "The target machine actively refused it {ip}" How can i solve these problems?
Dr Nuke 9. Sep. 2018 um 0:25 
How's the support for installing mods?
jimbobslimbob  [Autor] 23. Mai 2018 um 13:46 
It's been around for some years, have been improving it etc. Only recently did a guide for Starbound on it though. It works with quite a few games and so I can only do guides for the games I own.
AnormaL 23. Mai 2018 um 10:04 
Is this that new? D= I'm actually trying it!!! It looks so great!
jimbobslimbob  [Autor] 20. Mai 2018 um 8:15 
Thanks! Glad it has been useful to you! I am not aware there is a way to improve lagging, other than either a hardware upgrade or internet speed upgrade
Shin 20. Mai 2018 um 8:10 
Great guide! Really helped me out a lot and made server managing much smoother!
Yet despite having a good server rig it is lagging alot with only two players. If you know anything that could help with that please say so!
Yet awesome guide! 10/10