Actions

Editing Dedicated Server Guide

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 3: Line 3:
 
== Requirements ==
 
== Requirements ==
 
* Linux or Windows system, either physical or virtualised,  
 
* Linux or Windows system, either physical or virtualised,  
** NOT recommended also running a Stationeers client (there will be issues with router NAT-loopback).
+
** must NOT be being used to run a Stationeers client (the game will not permit this).
** Linux Glibcxx 3.4.29 & Glibc 2.34 (Ubuntu 22.04 LTS)
+
** if running on Windows you must have the Microsoft Visual C++ 2015 runtime installed, [https://www.microsoft.com/en-us/download/details.aspx?id=52685 click here to download it].
** if running on Windows you must have the Microsoft Visual C++ 2015, 2017 and 2019 runtime installed, [https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 click here to download it].
 
 
* ~16GB RAM (Tested and confirmed on Linux). 8GB or less and the server won't load.  
 
* ~16GB RAM (Tested and confirmed on Linux). 8GB or less and the server won't load.  
  
Line 22: Line 21:
  
 
<code>steamcmd +login anonymous +app_update 600760 -beta beta validate +quit</code>
 
<code>steamcmd +login anonymous +app_update 600760 -beta beta validate +quit</code>
 
<i>For getting back from beta to public use -beta public ,steamcmd has trouble with caching</i>
 
  
 
== Default ports ==
 
== Default ports ==
8081: Meta Server port (TCP).<br>
+
27516: Game port (UDP).<br>
27016: Game port (UDP).<br>
 
 
27015: Steam update port (UDP).
 
27015: Steam update port (UDP).
  
Line 37: Line 33:
 
|-
 
|-
 
| -NEW
 
| -NEW
| rowspan=2 | Worldtype (string)  
+
| rowspan=2 | Worldname (string)  
| rowspan=2 | Starts a new game at specific world automatically from launch. Must provide world type as argument<br>
+
| rowspan=2 | Starts a new game at specific world automatically from launch. Must provide world name as argument
<code>moon, mars, europa, europa2, mimas, vulcan, vulcan2, space, loulan, venus</code>
 
 
|-
 
|-
 
| -NEWGAME
 
| -NEWGAME
Line 45: Line 40:
 
| -LOAD
 
| -LOAD
 
| rowspan=2 | savefolder (string)
 
| rowspan=2 | savefolder (string)
| rowspan=2 | Loads a saved world file, a second argument can be given with worldtype when loading fails it will make a new world instead.
+
| rowspan=2 | Loads a saved world file
 
|-
 
|-
 
| -LOADGAME
 
| -LOADGAME
|-
 
| -LOADLATEST
 
|
 
| Loads the last save or backup from the save name\folder specified (checking world.xml datestamp), second argument is worldtype to fallback to when loading fails.
 
 
|-
 
|-
 
| -JOIN
 
| -JOIN
Line 63: Line 54:
 
| Absolute base directory for custom profile Ex)<br> -basedirectory C:\Profile\Player1 <br> Config Path : default.ini <code>C:\Profile\Player1\</code> <br> Save Path : <code>C:\Profile\Player1\saves\[worldname]</code>
 
| Absolute base directory for custom profile Ex)<br> -basedirectory C:\Profile\Player1 <br> Config Path : default.ini <code>C:\Profile\Player1\</code> <br> Save Path : <code>C:\Profile\Player1\saves\[worldname]</code>
 
|-
 
|-
| -logfile|| "path" || If no output_log.txt use this parameter. Check examples below for syntax.
+
| -logfile|| "path" || If no output_log.txt use this parameter. Check examples below for syntax
 
|-
 
|-
 
|}
 
|}
Line 69: Line 60:
  
 
https://docs.unity3d.com/Manual/CommandLineArguments.html
 
https://docs.unity3d.com/Manual/CommandLineArguments.html
 
[[https://github.com/rocket2guns/StationeersDedicatedServerGuide/blob/main/README.md Official Server Guide]]
 
 
=== Logging Alternates ===
 
Logging seems to be broken, here are some old skool alternatives.<br>
 
Small downside is they break the input of the console but it doesn't seem to throw warnings like usual.
 
 
* Linux <code>rocketstation_DedicatedServer.x86_64 2>&1 | tee filename.txt</code>
 
** extra options would be --a or --append in front of the filename to keep appending to the logfile
 
* Windows (powershell) <code>rocketstation_DedicatedServer.exe &> | tee -file filename.txt</code>
 
** extra options would be -Append at the end to keep appending to the logfile
 
** Command Prompt <code>powershell rocketstation_DedicatedServer.exe ^| tee -File filename.txt</code>
 
  
 
== Examples ==
 
== Examples ==
  
<span style="font-size: 120%;"> Dedicated server starts new Mars world. Autosave every 5 mins to Mars1. </span><br>
+
<span style="font-size: 120%;"> Dedicated server starts new Mars world. </span><br>
<code>rocketstation_DedicatedServer.exe -LOAD Mars1 Mars -SETTINGSPATH "C:\Server\User1" -settings StartLocalHost true ServerVisible true GamePort 27016 UpdatePort 27015 AutoSave true SaveInterval 300</code>
+
<code>rocketstation_DedicatedServer.exe -NEW=Mars -SETTINGSPATH="C:\Server\User1"</code>
  
  
<span style="font-size: 120%;"> Load Mothership file. Autosave every 5 mins. </span><br>
+
<span style="font-size: 120%;"> Load Mothership file.<br>
<code>rocketstation_DedicatedServer.exe -LOAD Mothership -settings StartLocalHost true ServerVisible true GamePort 27016 UpdatePort 27015 AutoSave true SaveInterval 300</code>
+
<code>rocketstation_DedicatedServer.exe -LOAD=Mothership</code>
  
  
<span style="font-size: 120%;"> Load Mothership file. Autosave  every 5 mins. C:\Profile\Player1\saves\Mothership </span><br>
+
<span style="font-size: 120%;"> Load Mothership file. C:\Profile\Player1\saves\Mothership C:\Profile\Player1\saves\map1 </span><br>
<code>rocketstation_DedicatedServer.exe -LOAD Mothership -SETTINGSPATH "C:\Profile\Player1" -settings StartLocalHost true ServerVisible true GamePort 27016 UpdatePort 27015 AutoSave true SaveInterval 300</code>
+
<code>rocketstation_DedicatedServer.exe -LOAD=Mothership -SETTINGSPATH="C:\Profile\Player1"</code>
  
  
Line 100: Line 79:
  
  
<span style="font-size: 120%;"> Example <code>-LOAD "myworld"</code> directory structure. </span><br>
+
<span style="font-size: 120%;"> Example <code>-LOAD="myworld"</code> directory structure. </span><br>
 
'''Note:''' ''BaseDirectory'' is by default in SteamApps/common/Stationeers Dedicated Server/''<Contents of BaseDirectory>'' if installed with SteamCMD<br>
 
'''Note:''' ''BaseDirectory'' is by default in SteamApps/common/Stationeers Dedicated Server/''<Contents of BaseDirectory>'' if installed with SteamCMD<br>
  
  
 
<big>'''Linux:'''</big><br>
 
<big>'''Linux:'''</big><br>
<code>-LOAD "myworld"</code> will look for a folder named "myworld" in the ''saves'' directory like this:<br>
+
<code>-LOAD="myworld"</code> will look for a folder named "myworld" in the ''saves'' directory like this:<br>
 
''BaseDirectory''/saves/myworld/<br>
 
''BaseDirectory''/saves/myworld/<br>
  
  
 
<big>'''Windows:'''</big><br>
 
<big>'''Windows:'''</big><br>
<code>-LOAD "myworld"</code> will look for a folder named "myworld" in the ''saves'' directory like this:<br>
+
<code>-LOAD="myworld"</code> will look for a folder named "myworld" in the ''saves'' directory like this:<br>
 
''BaseDirectory''\saves\myworld\
 
''BaseDirectory''\saves\myworld\
  
Line 125: Line 104:
  
 
===== Configuration from setting.xml =====
 
===== Configuration from setting.xml =====
setting.xml will be created once you start it up for the first time. <u>Command parameters reset setting.xml to default</u>
+
setting.xml will be created once you start it up for the first time. <u>Command parameters override setting.xml</u>
 
<hr>''The server is mostly a stripped down client as such it inherits certain features''
 
<hr>''The server is mostly a stripped down client as such it inherits certain features''
 
<hr>
 
<hr>
Line 256: Line 235:
  
 
===In Game Admin===
 
===In Game Admin===
<ServerAuthSecret/> parameter must be added to setting.xml on both server and client and be the same token.
+
ADMINPASSWORD parameter must be added to setting.xml and set a password.
  
All commands are typed in the chat (tilde) by default and prefixed by <code>serverrun</code>
+
All commands are typed in the chat (enter) by default, starting with /login
  
 
=== Server Program Console===
 
=== Server Program Console===
Line 301: Line 280:
 
|-
 
|-
 
| LOADGAME  
 
| LOADGAME  
|-
 
| LOADLATEST
 
| Loads the latest saved file, including auto saves
 
| <foldername>
 
 
|-
 
|-
 
| JOIN
 
| JOIN
Line 332: Line 307:
 
|-
 
|-
 
| IMGUI
 
| IMGUI
| Toggles ImguiInWorldTestCube on/off
+
| No help text :(
 
|  
 
|  
 
|-
 
|-
Line 385: Line 360:
 
|  
 
|  
 
|-
 
|-
 +
 
| PAUSE
 
| PAUSE
 
| will pause/unpause the game (including for clients)
 
| will pause/unpause the game (including for clients)
Line 420: Line 396:
 
|-
 
|-
 
| NETCONFIG
 
| NETCONFIG
| Change the master server setting in NetConfig.xml. e.g netconfig ip 127.0.0.1
+
| Change the NetConfig.xml. e.g netconfig ip 127.0.0.1
 
| Arguments:
 
| Arguments:
 
* list
 
* list
Line 429: Line 405:
 
| Sets the default settings path to a new location. Launch command only. If none found default is used.
 
| Sets the default settings path to a new location. Launch command only. If none found default is used.
 
| <full-directory-path>
 
| <full-directory-path>
|-
 
|  DIFFICULTY
 
| Sets game difficulty to one of the predefined settings
 
|  -DIFFICULTY [<difficulty>]
 
|-
 
| REGENERATEROOMS
 
| Regenerates all rooms for the world
 
|
 
|-
 
| STORMBEGIN
 
| Starts weather event
 
|
 
|-
 
| STORMEND
 
| Stops weather event
 
|
 
|-
 
| DEBUGTHREADS
 
| Show the times that the worker threads take to run.
 
| GameTick
 
|-
 
| STATUS
 
| Displays a bunch of info to give insight into state of server.
 
|
 
|-
 
| MASTERSERVER
 
| Commands to help with interacting with the Master Server.
 
| refresh
 
|-
 
| DELETELOOSEITEMS
 
| Removes all items in world that isn't in a slot
 
|
 
|-
 
| SUNTIME
 
| Set the time of day between 0 and 1 (e.g. 0 is sunrise, 0.5 is sunset)
 
| Arguments:
 
* time
 
|-
 
| CLEANUPPLAYERS
 
| Cleans up player bodies
 
| Arguments:
 
* dead
 
* disconnected
 
* all
 
 
|-
 
|-
 
| TEST
 
| TEST
Line 488: Line 420:
 
<HR><pre>
 
<HR><pre>
 
<?xml version="1.0" encoding="utf-8"?>
 
<?xml version="1.0" encoding="utf-8"?>
<ModConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
<ModConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
   <Mods>
 
   <Mods>
     <ModData>
+
     <unsignedLong>1</unsignedLong>
      <Id>1</Id>
+
     <unsignedLong>1001</unsignedLong>
      <IsEnabled>true</IsEnabled>
+
     <unsignedLong>1002</unsignedLong>
      <LocalPath />
 
     </ModData>
 
    <ModData>
 
      <Id>0</Id>
 
      <IsEnabled>true</IsEnabled>
 
      <LocalPath>YourFirstModFolderHere</LocalPath>
 
     </ModData>
 
    <ModData>
 
      <Id>0</Id>
 
      <IsEnabled>true</IsEnabled>
 
      <LocalPath>YourSecondModFolderHere</LocalPath>
 
    </ModData>
 
 
   </Mods>
 
   </Mods>
 +
  <DisabledMods>
 +
  </DisabledMods>
 +
  <LocalMods>
 +
    <LocalMod>
 +
      <folder>YourFirstModFolderHere</folder>
 +
      <modID>1001</modID>
 +
    </LocalMod>
 +
    <LocalMod>
 +
      <folder>YourSecondModFolderHere</folder>
 +
      <modID>1002</modID>
 +
    </LocalMod>
 +
  </LocalMods>
 
</ModConfig>
 
</ModConfig>
 
</pre><HR>
 
</pre><HR>
  
Local mods have Id 0.<br>
+
Assign a number to each entry you want to add.<br>
So try and keep the same structure in the server to prevent complications.<br>
+
Numbers seem to default to 4 digits for mods when generated by the client,<br>
 +
so try and keep the same structure in the server to prevent complications.<br>
 
''1 is core file and always need to be enabled''
 
''1 is core file and always need to be enabled''
 
===Alternate ModConfig.xml===
 
If the above modconfig don't work, try this one:
 
 
<HR><pre>
 
<?xml version="1.0" encoding="utf-8"?>
 
<ModConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 
    <Mods>
 
        <unsignedLong>1</unsignedLong>
 
        <unsignedLong>1001</unsignedLong>
 
        <unsignedLong>1002</unsignedLong>
 
    </Mods>
 
    <DisabledMods>
 
    </DisabledMods>
 
    <LocalMods>
 
        <LocalMod>
 
            <folder>"FirstModFolderPath"</folder>
 
            <modID>1001</modID>
 
        </LocalMod>
 
        <LocalMod>
 
            <folder>"SecondModFolderPath"</folder>
 
            <modID>1002</modID>
 
        </LocalMod>
 
    </LocalMods>
 
</ModConfig>
 
</pre>
 
  
 
=== Storing Mods ===
 
=== Storing Mods ===
 
 
  WIN: C:\Users\'''USERNAME_HERE'''\Documents\My Games\Stationeers\mods\
 
  WIN: C:\Users\'''USERNAME_HERE'''\Documents\My Games\Stationeers\mods\
 
  LIN: /home/'''USERNAME_HERE'''/My Games/Stationeers/mods/
 
  LIN: /home/'''USERNAME_HERE'''/My Games/Stationeers/mods/
 
  OSX: /Users/'''USERNAME_HERE'''/My Games/Stationeers/mods/
 
  OSX: /Users/'''USERNAME_HERE'''/My Games/Stationeers/mods/
  
Mods folder root is displaced by the <SavePath> setting in setting.xml,<br>
 
not sure if it's a bug or feature
 
  
 
  \Modname or workshopid\About\
 
  \Modname or workshopid\About\
Line 559: Line 463:
 
  \Steam\steamapps\common\Stationeers\rocketstation_Data\StreamingAssets\
 
  \Steam\steamapps\common\Stationeers\rocketstation_Data\StreamingAssets\
 
Look for ExampleMod.zip and AttributesExampleMod.zip .
 
Look for ExampleMod.zip and AttributesExampleMod.zip .
 
 
Note: There seems to be some changes as to how where the dedicated server loads mods from. The above solution seems to be deprecated, see below if above solution doesn't work.
 
 
WIN:[Where you've installed the server]/Steam/steamapps/common/Stationeers Dedicated Server/rocketstation_DedicatedServer_Data/StreamingAssets/Data/Mods <br>
 
LIN:/home/'''USERNAME_HERE'''/Steam/steamapps/common/Stationeers Dedicated Server/rocketstation_DedicatedServer_Data/StreamingAssets/Data/Mods <br>
 
OSX:[Where you've installed the server]/Steam/steamapps/common/Stationeers Dedicated Server/rocketstation_DedicatedServer_Data/StreamingAssets/Data/Mods <br>
 
 
The Mods folder in /StreamingAssets/ is not premade, but needs to be added manually. Put the mods you want in here, and the server will load them. It is unknown if a ModConfig is even needed when doing it this way.
 

Please note that all contributions to Unofficial Stationeers Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Unofficial Stationeers Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)