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 1: | Line 1: | ||
[[Category:Tutorials]] | [[Category:Tutorials]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Getting the server files == | == Getting the server files == | ||
Line 13: | Line 6: | ||
''This is a command line tool'' | ''This is a command line tool'' | ||
− | |||
− | |||
<code>steamcmd +login anonymous +app_update 600760 validate +quit</code> | <code>steamcmd +login anonymous +app_update 600760 validate +quit</code> | ||
− | + | == Dedicated Server Commands == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
String parameters can take space with double quotes. | String parameters can take space with double quotes. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 36: | Line 15: | ||
! parameter !! value !! etc | ! parameter !! value !! etc | ||
|- | |- | ||
− | | - | + | | -batchmode|| || Dedicated server runs without UI and start to listen port. |
− | | | ||
− | | | ||
− | |||
|- | |- | ||
− | | - | + | | -nographics|| || When running in batch mode, do not initialize graphics device at all. |
|- | |- | ||
− | | - | + | | -logfile|| "path" || If no output_log.txt use this parameter. Check examples below for syntax |
− | | | ||
− | | | ||
|- | |- | ||
− | | - | + | | -autostart|| || Dedicated server start to listen port without player input.<br> It's always enabled on Linux dedicated server |
|- | |- | ||
− | | - | + | | -autosaveinterval|| integer || Save world in every interval. |
− | | | + | |- |
− | | | + | | -creator|| int64|| Set creator's steam id as gamedata and key-value.<br> |
+ | This is for future integration of server instancing. | ||
+ | |- | ||
+ | | -worldname || string || Save game data automatically to existing file. | ||
+ | |- | ||
+ | | -worldtype || string || Worldtype(Moon, Mars, Europa2, Mimas, Vulcan2, Space, Loulan)<br><u>Will overwrite actual map on server browser if you use rocket to travel beween maps etc</u> | ||
+ | |- | ||
+ | | -loadworld | ||
+ | | string || Load world from saved file. If loadworld is enabled, worldname command is ignored. | ||
+ | |- | ||
+ | | -gameport || integer || UDP port for game. Avoid to set 27015-27020. It's steam's local server query ports. | ||
|- | |- | ||
− | | - | + | | -updateport |
− | | | + | | integer |
− | + | | UDP port for steam query | |
|- | |- | ||
− | | - | + | | -servername |
+ | | string | ||
+ | | Server title. <br>''(Depreciated: commandline only uses the first word, use servername in default.ini instead)'' | ||
|- | |- | ||
− | | - | + | | -basedirectory |
− | | | + | | string |
| 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> | ||
|- | |- | ||
− | | - | + | | -password |
+ | | string | ||
+ | | set server password | ||
+ | |- | ||
+ | | -maxplayer | ||
+ | | integer | ||
+ | | set maxplayer of dedicated server | ||
+ | |- | ||
+ | | -clearallinterval | ||
+ | | integer | ||
+ | | set the interval to run clearall command.<br> | ||
+ | Default and minimum value is 60 seconds. | ||
+ | |- | ||
+ | | -bindip | ||
+ | | string | ||
+ | | Bind specific IP address on dedicated server when it has multiple IP addresses. | ||
|- | |- | ||
|} | |} | ||
Line 69: | Line 70: | ||
https://docs.unity3d.com/Manual/CommandLineArguments.html | https://docs.unity3d.com/Manual/CommandLineArguments.html | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Examples == | == Examples == | ||
− | <span style="font-size: 120%;"> Dedicated server starts new Mars world. Autosave every 5 mins to Mars1. </span | + | <span style="font-size: 120%;"> Dedicated server starts new Mars world. Autosave every 5 mins to Mars1. </span> |
− | + | rocketstation_DedicatedServer.exe -batchmode -nographics -autostart -autosaveinterval=300 -worldtype=Mars -worldname=Mars1 -basedirectory="C:\Server\User1" | |
− | |||
− | <span style="font-size: 120%;"> Load Mothership file. Autosave every 5 mins. </span | + | <span style="font-size: 120%;"> Load Mothership file. Autosave every 5 mins. </span> |
− | + | rocketstation_DedicatedServer.exe -batchmode -nographics -autostart -gameport=27200 -updateport=27016 -autosaveinterval=300 -loadworld=Mothership | |
− | <span style="font-size: 120%;"> Load | + | <span style="font-size: 120%;"> Load . Autosave every 5 mins. C:\Profile\Player1\saves\Mothership C:\Profile\Player1\saves\map1 </span> |
− | + | rocketstation_DedicatedServer.exe -batchmode -nographics -autostart -autosaveinterval=300 -gameport=27200 -updateport=27016 -loadwo | |
+ | rld=Mothership -worldname=map1 -basedirectory="C:\Profile\Player1" | ||
− | <span style="font-size: 120%;"> Example | + | <span style="font-size: 120%;"> Example -logfile syntax </span> |
− | + | -logFile "C:\Server_Path\rocketstation_DedicatedServer_Data\output_log.txt" | |
− | <span style="font-size: 120%;"> Example | + | <span style="font-size: 120%;"> Example -loadworld="myworld" directory structure. </span> |
'''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> | ||
− | + | -loadworld="myworld" 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> | ||
− | + | -loadworld="myworld" will look for a folder named "myworld" in the ''saves'' directory like this:<br> | |
''BaseDirectory''\saves\myworld\ | ''BaseDirectory''\saves\myworld\ | ||
− | |||
<big>'''Details:'''</big><br> | <big>'''Details:'''</big><br> | ||
− | In the world directory named "myworld", | + | In the world directory named "myworld", there must be a few files: |
* world.bin | * world.bin | ||
* world.xml | * world.xml | ||
Line 124: | Line 110: | ||
* worldsettings.xml | * worldsettings.xml | ||
− | ===== Configuration from | + | ===== Configuration from default.ini ===== |
− | + | default.ini will be created once you start it up for the first time. <u>Command parameters override default.ini</u> | |
− | <hr> | + | <hr><pre> |
− | < | + | [SERVER] |
− | + | SERVERNAME=My First Stationeers Server | |
− | + | GAMEPORT=27500 | |
− | + | UPDATERPORT=27015 | |
− | + | PASSWORD= | |
+ | ADMINPASSWORD= | ||
+ | MAPNAME=Moon | ||
+ | DESCRIPTION=Stationeers | ||
+ | MAXPLAYER=10 | ||
+ | [RCON] | ||
+ | RCONPASSWORD=stationeers | ||
+ | </pre><hr> | ||
+ | ''MAPNAME is always ignored'' | ||
− | + | == Configuration from setting.xml == | |
− | + | '''Undocumented feature''' | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ''The server is mostly a stripped down client as such it inherits certain features'' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 171: | Line 142: | ||
|- | |- | ||
| <StartingConditions> | | <StartingConditions> | ||
− | | Default, Minimal, Vulcan | + | | Default, Minimal, Vulcan, BareBones |
| Or a custom key from a mod.<br>''Server ignores this, define custom worldtype'' | | Or a custom key from a mod.<br>''Server ignores this, define custom worldtype'' | ||
|- | |- | ||
Line 209: | Line 180: | ||
|- | |- | ||
|} | |} | ||
+ | |||
+ | Example Setting.xml | ||
+ | <pre> | ||
+ | <?xml version="1.0" encoding="utf-8"?> | ||
+ | <SettingData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
+ | <RespawnCondition>Stationeer</RespawnCondition> | ||
+ | <StartingConditions>Mimimal</StartingConditions> | ||
+ | <ResearchPoolKey>ResearchOff</ResearchPoolKey> | ||
+ | <SunOrbitPeriod>1</SunOrbitPeriod> | ||
+ | </SettingData> | ||
+ | </pre> | ||
== Savegames == | == Savegames == | ||
Line 251: | Line 233: | ||
|- | |- | ||
|} | |} | ||
− | |||
== Server Administrator == | == Server Administrator == | ||
===In Game Admin=== | ===In Game Admin=== | ||
− | + | ADMINPASSWORD parameter must be added to default.ini and set a password. This is different from the RCON password. | |
+ | |||
+ | All commands are typed in the chat (enter) by default, starting with /login | ||
+ | |||
− | |||
− | === | + | ===Browser Based RCON=== |
− | You can | + | You can send commands on web browser, but this feature is currently broken. Login works, but all other commands are disabled. |
+ | <nowiki>Link : http://[dedicated server address]:[GamePort]</nowiki> | ||
+ | [[File:Dediserv1.png|frameless|735x735px]] | ||
=== Command Lists === | === Command Lists === | ||
{| class="wikitable" | {| class="wikitable" | ||
!Command | !Command | ||
+ | !Parameter | ||
!Details | !Details | ||
− | |||
|- | |- | ||
− | | | + | |login |
− | | | + | |password |
− | | | + | |RCONPASSWORD is defined in default.ini. Default rcon password is stationeers. |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | |save |
− | | | + | |worldname |
− | | | + | |Save world to basedirectory |
− | + | ||
− | + | When basedirectory is "C:\Profile\Player1", | |
− | + | ||
− | + | >> save "Moon 2" | |
− | + | ||
− | + | Save world to "C:\Profile\Player1\Moon 2" | |
− | + | ||
− | + | >> save Moon | |
− | + | ||
+ | Save world to "C:\Profile\Player1\Moon" | ||
|- | |- | ||
− | | | + | |shutdown |
− | | | + | |[-m message] [-t timeout in seconds] |
− | + | |Shutdown dedicated server. If you run this command without any parameters, dedicated server will shutdown immediately. Countdown starts from 10 seconds. >> shutdown -m "Server will shutdown in 30 seconds" -t 30 | |
|- | |- | ||
− | | | + | |notice |
+ | |message | ||
+ | |Notice to all players. >> notice "Welcome to Stationeers!" | ||
|- | |- | ||
− | | | + | |status |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| | | | ||
+ | |Display game state and player lists. | ||
|- | |- | ||
− | | | + | |ban |
− | | | + | |steamId timeout |
− | | | + | |Ban player for specific time. Timeout is double in hour. 0.5 is 30 minutes. 0 is infinite. >> ban 76561198299941358 0.5 |
|- | |- | ||
− | | | + | |unban |
− | | | + | |steamId |
− | + | |Remove player from the ban lists. | |
− | | | ||
|- | |- | ||
− | | | + | |kick |
− | | | + | |steamId |
− | + | |Kick player from the current server. | |
− | |||
− | |||
|- | |- | ||
− | | | + | |clearall |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| | | | ||
+ | |Delete disconnected players | ||
|- | |- | ||
− | | | + | |hungerRate |
− | | | + | |hunger rate |
− | | | + | |Set hunger rate of server. 0 to disable hunger, higher numbers to make hunger drop more quickly. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
+ | Game client displays messages in the system message window at this moment. | ||
+ | [[File:Dediserv2.png|frameless|332x332px]] | ||
== Modding on Servers == | == Modding on Servers == | ||
Line 483: | Line 311: | ||
Mods are supported on Dedicated servers, however it requires additional manual configuration - Necessitating direct file access and editing on the dedicated server. To install mods, you'll need to manually obtain the mod data first - Either from the Steam Workshop, or built yourself. Upload/Store the mods in a specific folder on the server - You will also likely want to edit default.ini on the server to point to a particular server folder rather then the default directory, defined below. Then manually add ModConfig.xml in the root directory of the server executible files, and manually edit the file to add each individual mod.<br> | Mods are supported on Dedicated servers, however it requires additional manual configuration - Necessitating direct file access and editing on the dedicated server. To install mods, you'll need to manually obtain the mod data first - Either from the Steam Workshop, or built yourself. Upload/Store the mods in a specific folder on the server - You will also likely want to edit default.ini on the server to point to a particular server folder rather then the default directory, defined below. Then manually add ModConfig.xml in the root directory of the server executible files, and manually edit the file to add each individual mod.<br> | ||
− | === | + | === ModConfig.xml === |
− | Place a modconfig.xml in the serverfiles root (next to executable) | + | Place a modconfig.xml in the serverfiles root (next to executable). |
<HR><pre> | <HR><pre> | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
− | <ModConfig xmlns: | + | <ModConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
<Mods> | <Mods> | ||
− | < | + | <unsignedLong>1</unsignedLong> |
− | + | <unsignedLong>1001</unsignedLong> | |
− | + | <unsignedLong>1002</unsignedLong> | |
− | |||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</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> | ||
− | + | Assign a number to each entry you want to add.<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'' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== 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/ | ||
− | |||
− | |||
\Modname or workshopid\About\ | \Modname or workshopid\About\ | ||
Line 560: | Line 360: | ||
Look for ExampleMod.zip and AttributesExampleMod.zip . | Look for ExampleMod.zip and AttributesExampleMod.zip . | ||
+ | = Linux Server with LinuxGSM = | ||
+ | You could run a Linux Dedicated Server on these Distros: | ||
+ | * Ubuntu 16.04/18.04 LTS | ||
+ | * Debian 8 | ||
+ | * CentOS 7 | ||
+ | |||
+ | === Installation on a Ubuntu 18.04 LTS Server === | ||
+ | It's possible to download the iso-file for installation from here:<br> | ||
+ | https://ubuntu.com/download/server<br> | ||
+ | <br> | ||
+ | This should not be a tutorial how to set up a VM and install Ubuntu. There are many of them already out there. | ||
+ | <br> | ||
+ | First it#s necessary to install all the dependencies for LinuxGSM: | ||
+ | <br> | ||
+ | sudo dpkg --add-architecture i386; sudo apt update; sudo apt install mailutils postfix curl wget file tar bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc jq tmux lib32gcc1 libstdc++6 lib32stdc++6 steamcmd zlib1g | ||
+ | <br> | ||
+ | To not having the server running whit root privilges it is recomend to setup a new user for the gameserver.<br> | ||
+ | To create a new user in linux use: | ||
+ | adduser stserver | ||
+ | |||
+ | '''For security best practice, ensure you set a strong password!''' | ||
+ | |||
+ | After installing the dependencies and creating a user its time to switch to that user and do the rest of the job. | ||
+ | su - stserver | ||
+ | |||
+ | <br>Download linuxgsm.sh whit wget. | ||
+ | wget -O linuxgsm.sh https://linuxgsm.sh | ||
+ | |||
+ | <br>Make the script executeable. | ||
+ | chmod +x linuxgsm.sh | ||
+ | |||
+ | <br>Setup the Stationeers Server instance. | ||
+ | bash linuxgsm.sh stserver | ||
+ | |||
+ | <br>Run the installer following the on-screen instructions. | ||
+ | ./stserver install | ||
+ | |||
+ | <br>The script now download the server binarys and default configuration. | ||
+ | === Start and Stop the Server === | ||
+ | To start the server use this command. | ||
+ | ./stserver start | ||
+ | <br>In Default the server will start a Moon map. To join the server use the local IP whit the Port 27500. | ||
+ | <br>To join the server from a different lokation, it's necessary to forward the port 27500/tcp and 27015/tcp to the local server. | ||
+ | <br>If its not possible to connect make sure the Ubuntu Firewall is of or configured to let this ports open. To check this run this as root user. | ||
+ | ufw status | ||
+ | <br>or to disable it | ||
+ | ufw disable | ||
+ | |||
+ | <br>To see the details | ||
+ | ./stserver details | ||
+ | |||
+ | <br>To stop the server use | ||
+ | ./stserver stop | ||
+ | |||
+ | <br>This command shows all atributes | ||
+ | ./stserver help | ||
− | + | <br>To show the live console of the server use: | |
+ | ./stserver console | ||
+ | '''To exit the console pres CTRL+b and then "d"''' | ||
− | + | == Edit configuration == | |
− | + | The Configuration is stored under the folder lgsm/config-lgsm/stserver. There are three files: | |
− | + | * _default.cfg (contains the whole configuration with the default values '''Do not edit this file''') | |
+ | * common.cfg (the settings for this server) | ||
+ | * stserver.cfg (the settings for this instance) | ||
+ | If there is only one instance/server running and there will not be any other server it doesn't matter if you change the settings in common.cfg or stserver.cfg. If you planing to run more than on server or instance on the same VM you have to consider if the setting should apply server wide (all instances), or just for a specific Stationeers instance. | ||
− | + | === Example: Change map to Mars === | |
+ | Use your favorite texteditor (ex. vi or nano) and open the _default.cfg (remember not to do any changes here) search for the setting you want to change and copy the text. In our example it is this: | ||
+ | worldtype="Moon" | ||
+ | worldname="moon_save" | ||
+ | <br>Now open the file you want to configure. If you want any instance to run a Mars map use common.cfg or if only one instance should run this map use stserver.cfg (or stserver-2.cfg for the next instance). Paste the text at the end of the file and change "Moon" to "Mars" | ||
+ | worldtype="Mars" | ||
+ | worldname="mars_save" | ||
+ | <br>Now restart your server with ./stserver restart | ||
+ | <br>Make sure you also change the worldname (this is the folder where the savegame is) if the savegame-file is for a different world than the config is set to the server will not start. |