Starbound

Starbound

Not enough ratings
Windows Stand Alone Server( v. Enraged Koala )
By Sven ☠ 2157
PLEASE NOTE: Since changes may occur from version to version, I will also make necessary changes to the BATCH file and instructions. I will update the server version in the title, when I have checked that the instructions and batch file are working properly.

Please watch the title of this guide, for any changes. Please make sure to get the latest batch file from the below provided link.


This is a guide on setting up a Windows based stand alone, Starbound server. The biggest advantage is running a server from a second computer. This guide will try to illustrate how to transfer only the needed files and setup the multi-player server, without the need to install Steam.

See the Tools, Tips & Tricks[//] section for additional advantages.
   
Award
Favorite
Favorited
Unfavorite
Preface
It all starts with a question:

I asked a little while ago about dedicated server binaries, over in the Steam Starbound Forums. No one could really answer the question with certainty.

I just bought the game, and was looking through these forums, and the Starbound Forums[playstarbound.com], and found A TON of information for Linux hosting, but not much for Windows hosting; or anything about running on a separate computer/server machine.

So I wrote back a reply, and then figured I would share it here, as well.

There is a dedicated server package, within the Steam install - sort of.
What I mean by that is, dedicated server binaries usually don't need a product key, graphics, sound, etc, etc. They are solely there to transfer data between the players( clients ) and the game world( server ).

It was also asked:
Originally posted by Ghargoil:
Is there a way to run the server on computer 1, and run the game on computer 2?

I now have an answer: Yes there is!

So here is how I set up my Windows Dedicated Server, on a second PC.
Terms and Definitions
First I need to define a couple things, so I don't have to type so much.
  • - Starbound Folder = the main folder located in your Steam hierarchy. Default:
    • 32 bit - "C:\Program Files\Steam\SteamApps\common\Starbound"
    • 64 bit - "C:\Program Files (x86)\Steam\SteamApps\common\Starbound"
  • - Server Folder = the new folder you will create on the second PC for the dedicated server.
Also, because Starbound is a Work in Progress( WIP ), that makes this guide one too.

I have to say it ...
Because this is a GUIDE, you DON'T have to perform any of these actions, and as such, disclaimer:
  • ANYTHING YOU DO TO YOUR COMPUTER IS YOUR FAULT! YOU CAN NOT, AND WILL NOT HOLD ME, STEAM, CHUCKLEFISH GAMES, ANY DEVELOPERS, OR ANYONE OTHER THAN YOU, ACCOUNTABLE, FOR YOUR ACTIONS!
So let's get started
Originally posted by SIDE NOTE:
Below is the manual process to copy the files and folders you need.

However, those that want this to move a bit quicker can jump down to the Tools, Tips & Tricks section to create a batch( .BAT ) file to automate these steps. Which will then make this section more of a list of needed files, as opposed to steps.

Once finished with the batch file, you can skip to the section: I used the batch file!

  • Create a new folder on your Desktop. This will be the new Server Folder.
    • Right click, then immediately hit W, then F
    • Name it something logical.
  • Navigate to your Starbound Folder. We need a few things from here:
    • Copy the entire ASSETS( ~710MB ) folder to the new Server Folder.
    • Copy the MODS( ~>1B ) folder to the new Server Folder.
    • In the new Server Folder, create a new folder called 'win32'.
    • Back in the Starbound folder, Open the win32 folder, and copy the following files ONLY to the new win32, in the new Server Folder:
      • bootstrap.config
      • cygogg-0.dll
      • cygvorbis-0.dll
      • cygvorbisfile-3.dll
      • lua52.dll
      • pcre3.dll
      • freetype6.dll
      • libpng12-0.dll
      • starbound_server.exe
      • zlib1.dll
    • In the Starbound Folder, copy the starbound.config and starbound.ico( if you want a nice Desktop launch icon for your server. ), to the new Server Folder.
I used the batch file!
  • Now you should have 3 folders, and 2 files in the new Server Folder. Copy the new Server Folder( ~1.11GB ) to your Server Machine.
  • Move this folder to where you want it to stay.
  • Navigate to the new location, go into the win32 folder.
  • Right click the starbound_server.exe.
  • Hover over 'Send to' in the right click context menu, and then choose 'Desktop (create shortcut)'.
    • It is important that you do not move the Server Folder after this step, as the shortcut you just creaetd will link to the wrong place.
    • Should you need to move the folder, repeat the above step, to create a new shortcut.
  • Close Windows Explorer
  • Locate the new shortcut on your desktop, and right click it.
  • Windows Vista/7/8/8.1 users:
    • Choose properties, and then on the 'Shortcut' tab, click the Advanced... button.
    • Tick the box for 'Run as administrator'. Click OK.
  • If you chose to include the .ICO file, do the following:
    • Click the 'Change Icon...' button, close the warning if you receive one.
    • Click Browse, and navigate to your new Server Folder location.
    • Select the starbound.ico file( Penguin looking icon ), click Open, then OK, then Apply, then OK again. WheW!
  • On the general tab, rename this shortcut to something logical. ex: Starbound Server
  • Now navigate back to your new Server Folder.
  • Using a text editor, I highly recommend Notepad++, but I guess Windows Notepad will do, open the starbound.config file.
  • Somewhere around line 22, is a variable called: maxPlayers. By default this is set to 8, but you can change it to whatever you like.
    Originally posted by SIDE NOTE:
    • Keep in mind that maxPlayers is directly proportional to your bandwidth. One should keep in mind specifically their OUTBOUND bandwidth, as this i usually the slower of both inbound and outbound. Allowing too many players, could result in serious network lag.
  • Somewhere around line 33( about 2/3 the way down ), you will see a variable called "serverName". You guessed it! Change it to the desired name of your server.
  • The next line is for server passwords. This is an array, and looks like this:
  • "serverPasswords" : [ "", "duckies", "swordfish" ],
  • The first item is just 2 double-quotes( " ). You need to set this to a password, the public can use. If you don't want a password leave it as it is.
  • The second in the array is "duckies", and I believe this is a Moderator/Admin password? This NEEDS to be changed, to something different.
  • The third in the array is "swordfish", and I believe this is the SuperAdmin password? Again, change this, and ONLY give it to people you trust!
  • Save the file.
  • Close everything, and start your server.
Originally posted by SIDE NOTE:
In the file starbound.config, on line 31 is the following entry:
"rootKey" : "<INSERT_A_MONSTER_STRING_OF_ALPHANUMERICS_HERE>"
Since there is still limited information about these files and the entries in them, this is quite possibly your product key. These keys may all be the same, or they could be your product key. But let's be safe and smart about this.

YOU SHOULD NOT PACKAGE/DISTRIBUTE THESE FILES WITH THAT KEY IN IT.
This key is found in several files within the server folder.

You should not package/distribute these files at all, as I am sure it breaks several EULA and COPYRIGHT laws!
Getting out to the World!
Now we need to get out to the rest of the world; or should I say they need to get to us. This involves Port Forwarding.

One common mistake that people make, is they try to forward a range. This cannot be done. If you require a range to be forwarded, then you need to create a rule for each port( 21025, 21026, 21027 ); or if your router supports it, use the Port Range Forwarding. Not all routers support this feature.

I have found on my Windows server, that the only port that needs forwarding is 21025.

Another common mistake, is when people using more than one computer on their home network - server machine and X number of client machines - try to forward the port to 2 or more machines. This will not work either, as there can only be one forward per port; not per machine.

If this is the case, then simply remove the port forwarding rule to any client machine, and remain the one to the actual server machine. Since you are on the same side of the router as the server, you only need to enter the Local, or Router, IP address. This usually starts 192.168.nnn.nnn. The remaining octets for the IP will need to be looked up from within the router's internal Status page.

Some common IP starting points for specific routers:
Manufacturer
IP Address
Username
Password
Linksys
192.168.1.1
[none]
admin
D-Link
192.168.0.1
admin
admin
Cisco
192.168.1.1
admin
password
Netgear #1
192.168.1.1
admin
password
Netgear #2
192.168.0.1
admin
password
Belkin
192.168.2.1
admin or [none]
[none]
Please consult your Router manufacturer's website for more information.
Starting your Server
Now for the fun part!

To start your server, just double-click the new Starbound Server Icon on your desktop. The server will always 'Run as administrator' because of the properties we assigned it a couple steps ago.

Once the server executable begins, it will create a new folder in your new directory. This will be for the universe( world ).
... and Finally!
The server executable also takes 3 parameters: -bootconfig, -log and -worldcoordinates. Advanced server admin can add these to the Shortcut if they want to run alternate files or starting points on their worlds. If anyone has anything to add, please post it: like why there is an array of passwords, and what they are for.

Hope that helps! ;-)

=170= Sven2157
Tools, Tips & Tricks
  • As long as this server is run separately from Steam, you never have to worry about update overwrites.
  • Updating the files is as easy as waiting until Steam/Chucklefish Games issues the update, then running the batch file, and overwriting the files in your first created new Starbound Server Folder.
  • Since I have written this, I have created a simple batch( .BAT ) file to copy the needed files to a folder on your Desktop. This will assist with the initial transfer to the other computer, but more so will aide with any future updates: assuming they don't completely change the file structure.

    To create the batch file, do one of the following:
    • - Method one( preferred )
    • - Method 2: Copy & Paste
      • Copy the below code, and paste it into a new text file.
      • Then save the file as: createStarboundServerFolder.bat.
      • I highly recommend Notepad++[notepad-plus-plus.org] for this, but Windows Notepad will do.
    Then double-click or right click the file and run it. The code it self is standard DOS style, batch command code, and I tried to comment it the best I could.
@ECHO OFF CLS ECHO. ECHO. REM Set some folder and registry variables. SET newFolder=StarboundServer SET newFolderLoc=%USERPROFILE%\Desktop\%newFolder% SET steamStarboundLoc=SteamApps\common\Starbound REM We need to get the install path for Steam. Since :: Starbound doesn't seem to install directly, we will :: use the Steam Path, as that should be more accurate :: :: Also, with the different keys for 32 bit and 64 bit, we :: need to check for both, and when found, set it as the :: variable. Then grab the sub-key and value. :: :: Steam :: 32bit - HKEY_LOCAL_MACHINE\SOFTWARE\Valve\Steam :: 64bit - HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Valve\Steam :: SET Reg.Val=InstallPath :: :: Starbound Uninstall :: 32bit - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820 :: 64bit - HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820 :: SET Reg.Val=InstallLocation IF EXIST REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820" ( SET Reg.Key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820 ) ELSE ( SET Reg.Key=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 211820 ) SET Reg.Val=InstallLocation REM Check to see if the new Server folder exists already( possible :: server file update ), if it does not, then we have to create it. IF NOT EXIST "%newFolderLoc%" ( MKDIR "%newFolderLoc%" ECHO %newFolderLoc% created! ) ELSE ( ECHO %newFolderLoc% already present! ) ECHO. ECHO. ECHO. ECHO. REM Now we need to query the registry to find where the user :: has installed Steam, and then set that value to a variable. FOR /F "Tokens=2*" %%A IN ('Reg Query "%Reg.Key%" /v "%Reg.Val%" ^| Find /I "%Reg.Val%"' ) DO CALL SET steamDIR=%%B ECHO ^|====================================================^| ECHO Copying the correct files for your Starbound Server! ECHO ^|====================================================^| ECHO. ECHO. REM Directory search path if the Starbound search :: turns up nil - "%steamDIR%\%steamStarboundLoc%\<file/folder_name>" REM Copy the asset folder and all sub-folders :: to the new Server folder ECHO Copying folder ..\assets\ XCOPY "%steamDIR%\assets" "%newFolderLoc%\assets" /S /E /I REM Copy the mods folder and all sub-folders :: to the new Server folder ECHO Copying folder ..\mods\ XCOPY "%steamDIR%\mods" "%newFolderLoc%\mods" /S /E /I REM Check to see if the win32 folder exists in the new Server folder :: if it does not, then create it. IF NOT EXIST "%newFolderLoc%\win32" ( ECHO. ECHO "%newFolderLoc%\win32" was not found! ECHO Creating "%newFolderLoc%\win32" ... MKDIR "%newFolderLoc%\win32" ECHO Finished creating "%newFolderLoc%\win32"! ECHO. ) REM Copy only the necessary files from the WIN32 folder ECHO Copying file ..\win32\bootstrap.config COPY "%steamDIR%\win32\bootstrap.config" "%newFolderLoc%\win32\bootstrap.config" ECHO Copying file ..\win32\cygogg-0.dll COPY "%steamDIR%\win32\cygogg-0.dll" "%newFolderLoc%\win32\cygogg-0.dll" ECHO Copying file ..\win32\cygvorbis-0.dll COPY "%steamDIR%\win32\cygvorbis-0.dll" "%newFolderLoc%\win32\cygvorbis-0.dll" ECHO Copying file ..\win32\cygvorbisfile-3.dll COPY "%steamDIR%\win32\cygvorbisfile-3.dll" "%newFolderLoc%\win32\cygvorbisfile-3.dll" ECHO Copying file ..\win32\freetype6.dll COPY "%steamDIR%\win32\freetype6.dll" "%newFolderLoc%\win32\freetype6.dll" ECHO Copying file ..\win32\libpng12-0.dll COPY "%steamDIR%\win32\libpng12-0.dll" "%newFolderLoc%\win32\libpng12-0.dll" ECHO Copying file ..\win32\lua52.dll COPY "%steamDIR%\win32\lua52.dll" "%newFolderLoc%\win32\lua52.dll" ECHO Copying file ..\win32\pcre3.dll COPY "%steamDIR%\win32\pcre3.dll" "%newFolderLoc%\win32\pcre3.dll" ECHO Copying file ..\win32\starbound_server.exe COPY "%steamDIR%\win32\starbound_server.exe" "%newFolderLoc%\win32\starbound_server.exe" ECHO Copying file ..\win32\zlib1.dll COPY "%steamDIR%\win32\zlib1.dll" "%newFolderLoc%\win32\zlib1.dll" ECHO Copying file ..\win32\starbound.ico COPY "%steamDIR%\win32\starbound.ico" "%newFolderLoc%\starbound.ico" REM Copy the main CONFIG file ECHO Copying file starbound.config COPY "%steamDIR%\starbound.config" "%newFolderLoc%\starbound.config" REM Finish up the process ECHO. ECHO. ECHO Finished Copying files. ECHO. REM Pause here to give the user a chance to review. PAUSE ::END OF FILE
8 Comments
Sven ☠ 2157  [author] 7 Dec, 2014 @ 9:48pm 
Yeah, I don't do Reddit ( or any other "social" media ).
[AU]Narcarsiss 7 Dec, 2014 @ 9:37pm 
Reminds me of my Post from almost a year ago. Well done on the Update.

http://www.reddit.com/r/StarboundAdmins/comments/1sd53z/split_client_and_server_installations/
Pitocas 16 Apr, 2014 @ 2:46pm 
can someone tell me some moded servers.
Sven ☠ 2157  [author] 2 Feb, 2014 @ 4:47pm 
@thekey147

First, thanks for checking out the guide! :reuschicken:

Not sure there is anything to compare? :KOh: This makes the Server completely un-attached and independent from Steam: Stand Alone.

If you are referring to SteamCMD, then again, you have to login there, thus logging you out of your client, and then you have to download the entire ~2.2GB game; which could have been done by just copying your Starbound folder in the Steam directory.

This method takes what you already have, your game through normal Steam, and then copies ONLY the files needed to run the server. No logging in/out, no extra file size bloat.

This way, you can move the server to another computer, or have it run on the same computer, but separately from your game.

Hope that helps! :reuschicken:
AntleredKey 2 Feb, 2014 @ 3:23pm 
Woah
I just downloaded Steam on my other computer, so if needed, I just login there and the server updates.
I understand the benefits of this, I was just comparing..
Sven ☠ 2157  [author] 10 Jan, 2014 @ 5:09pm 
Glad I could help! :reuschicken:
JarheadEdge 10 Jan, 2014 @ 7:33am 
Well done, and thanks. I've been running a server on the same machine I play on, and I noticed it can get laggy sometimes in high-volume areas (my home). Moving the server to another computer relieved the stress and brought the frame rates back up.
Section08 31 Dec, 2013 @ 8:45pm 
Great work Sven. Keep it up!