Support Center

Dedicated Server Command Line Options Guide

Last Updated: Jun 01, 2018 10:52AM PDT
-persistent_storage_root

Change the directory that your configuration directory resides in. This must be an absolute path. The full path to your files will be <persistent_storage_root>/<conf_dir>/ where <conf_dir> is the value set by -conf_dir. The default for this option depends on the platform:
Windows: <Your documents folder>/Klei
Mac OSX: <Your home folder>/Documents/Klei
Linux: ~/.klei

-conf_dir

Change the name of your configuration directory. This name should not contain any slashes. The full path to your files will be <persistent_storage_root>/<conf_dir> where <persistent_storage_root> is the value set by the -persistent_storage_root option. The default is: "DoNotStarveTogether".

-cluster

Set the name of the cluster directory that this server will use. The server will expect to find the cluster.ini file in the following location: <persistent_storage_root>/<conf_dir>/<cluster>/cluster.ini, where <persistent_storage_root> and <conf_dir> are the values set by the -persistent_storage_root and -conf_dir options. The default is "Cluster_1".

-shard

Set the name of the shard directory that this server will use. The server will expect to find the server.ini file in the following location:<persistent_storage_root>/<conf_dir>/<cluster>/<shard>/server.ini, where <persistent_storage_root>, <conf_dir>, and <cluster> are the values set by the -persistent_storage_root, -conf_dir, and -cluster options. The default is "Master".

-offline

Start the server in offline mode. In offline mode, the server will not be listed publicly, only players on the local network will be able to join, and any steam-related functionality will not work.

-disabledatacollection

Disable data collection for the server.
We require the collection of user data to provide online services. Servers with disabled data collection will only have access to play in offline mode. For more details on our privacy policy and how we use the data we collect, please see our official privacy policy. https://klei.com/privacy-policy

-bind_ip  <bind_ip>

Change the address that the server binds to when listening for player connections. This is an advanced feature that most people will not need to use.

-port <port_number>

Valid values: 1..65535
The UDP port that this server will listen for connections on. This option overrides the [NETWORK] / server_port setting in server.ini. If you are running a multi-level cluster, this port must be different for each server. This port must be between 10998 and 11018 inclusive in order for players on the same LAN to see it in their server listing. Ports below 1024 are restricted to privileged users on some operating systems.

-players <max_players>

Valid values: 1..64
Set the maximum number of players that will be allowed to join the game. This option overrides the [GAMEPLAY] / max_players setting in cluster.ini.

-steam_master_server_port <port_number>

Valid values: 1..65535
Internal port used by steam. This option overrides the [STEAM] / master_server_port setting in server.ini. Make sure that this is different for each server you run on the same machine.

-steam_authentication_port <port_number>

Valid values: 1..65535
Internal port used by steam. This option overrides the [STEAM] / authentication_port setting in server.ini. Make sure that this is different for each server you run on the same machine.

-backup_logs

Create a backup of the previous log files each time the server is run. The backups will be stored in a directory called "backup" in the same directory as server.ini.

-tick <tick_rate>

Valid values: 15 .. 60
This is the number of times per-second that the server sends updates to clients. Increasing this may improve precision, but will result in more network traffic. This option overrides the [NETWORK] / tick_rate setting in cluster.ini. It is recommended to leave this at the default value of 15. If you do change this option, it is recommended that you do so only for LAN games, and use a number evenly divisible into 60 (15, 20, 30).

Examples:

The recommended way to run a two level server is with the following commands:

dontstarve_dedicated_server_nullrenderer -console -cluster MyClusterName -shard Master
dontstarve_dedicated_server_nullrenderer -console -cluster MyClusterName -shard Caves

These two commands will run two  dedicated servers using the following configuration files: 
 

<Your Klei Folder>/MyClusterName/cluster.ini
<Your Klei Folder>/MyClusterName/Master/server.ini
<Your Klei Folder>/MyClusterName/Caves/server.ini

For the location of <Your Klei Folder>, see the explanation of the -persistent_storage_root and -conf_dir options above. For information on setting up a dedicated server, see one of the following guides:

Dedicated Server Quick Setup Guide: Windows

Dedicated Server Quick Setup Guide: Linux

Dedicated Server Quick Setup Guide: Mac OS X

Contact Us

Klei Service Status
status.kleientertainment.com

livesupport@kleientertainment.com
http://assets2.desk.com/
false
Klei
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete