A Dedicated Server is a method of hosting an Unturned server that does not require the host to be an active player in the game. The host can choose to play on the server, or just leave it running in the background while others play on it. Unlike a Local Server, port forwarding is required.
A Dedicated Server also allows for vastly increased versatility in configuration of the server. Many server options become available through the Commands.dat, Config.json, server console, and other configuration files.
In order for others to join the server, several ports must be forwarded on your router.
Port Range Forwarding:
In order for anyone to access the server you've set up, you need to go into your router's settings and open the server's set ports.
Follow the steps below:
- Open any internet browser, and type your default gateway into the address bar, then hit enter.
- Find a section for Port Forwarding.
- Click the option that allows you to add a new port, or rule.
- The default port range is 27015 to 27017, with 27015 being the connecting port.
- You must enter an IP Address, or Destination Address, using either a Dynamic IP or Static IP.
- The preferred protocol is UDP.
Single Port Forwarding:
- Right-click the "Unturned.exe", hover the mouse over "Send To", and click on "Desktop (create shortcut)".
- Right-click on the shortcut and select "Properties". The "Target:" field should contain the path to Unturned.exe and should look something like this:
"C:\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned.exe"
- Now, at the end of the string of text, insert this string of text:
-nographics -batchmode +secureserver/...
- ... is whatever you want to name your server.
An example of a finished "Target" field:
"C:\Program Files (x86)\Steam\steamapps\common\Unturned\Unturned.exe" -nographics -batchmode +secureserver/My server
- 4. Finally, run the server. A black console screen should appear, with no text.
- 5. Optional: You can easily update an existing Unturned server by using the following method:
The following text string will create a shortcut that will automatically update your server. This example assumes that you installed your server through SteamCMD, which does not update Unturned automatically.
"C:\SteamCMD\steamcmd.exe +login Username Password +app_update 304930 +exit"
Mac OS X:
- From the Steam window, right-click the Unturned game in your Library and select "Properties".
- Click in the "Local Files" tab.
- Click "Browse Local Files...".
- Optional: Go back to Common, duplicate the Unturned folder, paste it in Common and name it Unturned Server)
- In the Finder window right click on Unturned
- Select Show Package Contents
- Select Contents
- Select MacOS
- Open up terminal
- Then drag the Unturned executable into the terminal window (this will translate it into a line of text)
- Press space
- Then add in your parameters (this is the same as step 3 of Windows 3.0.0 setup, except that the program will be referred to as Unturned.app instead of Unturned.exe)
- Then press enter
With Unturned 3.0, the procedure is exactly the same, but after the parameters, you need to add: +secureserver/servername
Replace "secureserver" with "lanserver" if you want a LAN server instead. Replace "servername" with what you want to name your server.
The Commands.dat file is used to set the general server settings that will run whenever the server starts. It can be opened with any text editor. A separate line should be used for each unique command inputted.
|Valid Commands.dat Inputs|
|bind||Binds your internal IP to the socket.|
|chatrate||Assigns the minimum amount of time between chat messages in order to prevent spam.|
|cycle||Assigns the day and night cycle in seconds.||seconds|
|decay||Assigns the amount of time a player, or their group members, can be offline before their structures can be removed by anyone. Default is 604800.|
|filter||Enables the old name filter.||Example: filter|
|loadout||Assigns what all players spawn with.||Skillset ID • Item ID|
Example: loadout 255/4/17/151
|log||Toggles logging of chat, join and leave, death, and anti-cheat messages respectively.||Y • N|
Example: log Y/Y/Y/N
|map||Sets the map that will be used for the server.||map name|
|maxplayers||Sets the max amount of players the server will allow. Default is 24.||number|
Example: maxplayers 8
|mode||Sets the difficulty mode to use from the Config.json. Default is normal.||easy • normal • hard|
Example: mode hard
|name||Sets the server's name.|
|password||Sets a password to the server to keep out unwanted guests, making the server more private.||text|
Example: password word12
|perspective||Assigns the perspective views allowed. It can be first-person only, third-person only, first-person only except when in a vehicle, or first-person and third-person.||first • third • vehicle • both|
Example: perspective both
|port||Sets a custom port for the server. Default is 27015.|
|pve||Disables combat between players.||Example: pve|
|sync||Syncs player data between servers using the same key.|
|timeout||Sets the max ping allowed on the server.||number|
|welcome||Sets the welcome message.||text|
Example: welcome Welcome to my server!
You should now be able to connect to your own server by running the game through Steam. To do this, click "Play", and then "Connect", and in the IP field, type "localhost", then click "Connect" to join your own server.
If you fail to connect to your own server, try installing SteamVR (found under tools in Steam).
Note: Other players will not use "localhost", only you will. Other players will use your EXTERNAL IP to connect to your server. Find your external IP by visiting http://www.whatismyip.com/