NOTICE: You are not reading the most up-to-date documentation. This file is old, and may not reflect the current modding or server capabilities. The latest documentation can be found at Unturned Documentation.
This file may be removed in the future. Refer to its more up-to-date equivalent instead.
All multiplayer servers are hosted using the Unturned Dedicated Server tool (sometimes abbreviated to U3DS). This tool can either be installed and updated using Valve’s SteamCMD tool, or (not recommended) managed through your Steam Library. Using SteamCMD is ideal and has several benefits, but is not strictly necessary. If you are not using SteamCMD, some of the documentation may not apply to you.
Multiplatform:
Windows:
Linux:
steamcmd.exe
Continue to: How to Install Server using SteamCMD
Installation on Linux varies by distribution and your admin preferences, so refer to Valve’s Linux Documentation. Once downloaded, run the steamcmd.sh
script.
Continue to: How to Install Server using SteamCMD
Login to Steam anonymously:
login anonymous
Download the server:
app_update 1110390
Note: this command can also be used to update the server.
Close SteamCMD:
quit
The server files are now in the ...SteamCMD\steamapps\common\U3DS
directory.
Continue to: How to Launch Server on Windows or How to Launch Server on Linux
The Unturned Dedicated Server tool can be installed and updated from your Steam Library. The tool is considered its own application, and is managed separately from the Unturned game itself. There are a few issues unique to those installing the Unturned Dedicated Server tool without SteamCMD, which should be considered before setting up your server.
It is not possible to run multiple servers at once.
The tool uses the same executable name as the game, which means that if the game is closed while the server is running then Steam will think the game is still running. This can cause issues such as Steam refusing to launch the game until the server as closed.
With these considerations in mind, it is recommended to install the Unturned Dedicated Server using SteamCMD instead. For those interested in installing the Unturned Dedicated Server tool without SteamCMD, navigate to your Steam Library. When using the default application filters for the Steam Library, tools (such as for launching dedicated servers) are not be visible in your Library.
To install the tool from your Steam Library either search for “Unturned Dedicated Server” via the search filter, or enable the “Tools” application type filter so that tools are visible. Select the “Unturned Dedicated Server” application in your Steam Library, and click the “Install” button.
To navigate to the server files install directory:
The rest of the documentation assumes that the Unturned Dedicated Server tool was downloaded with SteamCMD, rather than through your Steam Library, so some of the documentation may differ slightly.
Continue to: How to Launch Server on Windows or How to Launch Server on Linux
...\SteamCMD\steamapps\common\U3DS
directory..txt
file extension, then you need to enable the viewing of “File name extensions”.Tutorial.bat
) and select Edit. This will open the batch file in your default text editor, although any text editor (e.g., Notepad, WordPad, Notepad++) can be used.start "" "%~dp0ServerHelper.bat" +InternetServer/MyServer
start "" "%~dp0ServerHelper.bat" +LanServer/MyServer
Note: running an internet server will require opening ports on your router (this is called “port forwarding”).
In this example “MyServer” is used as the ServerID for savedata and configuration purposes; you may choose to replace “MyServer” with a different name. For an example batch script, open the built-in ExampleServer.bat
file in a text editor._
Double-click the batch script to launch the server. A command-line interface should appear. Because this is the first time we have ran the batch file, it is going to generate a bunch of necessary server files.
When the command-line interface stops outputting new lines of text, it has finished loading (and finished generating all necessary files). You can safely close the server by executing (typing, and then pressing the “↵ Enter” key on your keyboard) the following command on the command-line interface: shutdown
The batch script has created a new file directory located in ...\U3DS\Servers
, called “MyServer”. This directory is where all the savedata and configuration files are kept. Changing the MyServer
ServerID (from step 5) in the batch script to a different name will allow for keeping savedata separate across multiple servers, and for running multiple servers at once.
.../SteamCMD/steamapps/common\U3DS
directory../ServerHelper.sh +InternetServer/MyServer
./ServerHelper.sh +LanServer/MyServer
Note: running an internet server will require opening ports on your router (this is called “port forwarding”).
In this example “MyServer” is used as the ServerID for savedata and configuration purposes; you may choose to replace “MyServer” with a different name. For an example script, open the built-in ExampleServer.sh
file in a text editor._
You can safely close the server by executing (typing, and then pressing the “↵ Enter” key on your keyboard) the following command on the command-line interface: shutdown
The executed command has created a new file directory located in …/U3DS/Servers, called “MyServer”. This directory is where all the savedata and configuration files are kept. Changing the MyServer
ServerID (from step 2) in the batch script to a different name will allow for keeping savedata separate across multiple servers, and for running multiple servers at once.
Each individual ServerID has its own savedata and configuration.
Launch commands are setup in the Server > Commands.dat
file. Each line should have one command.
Common useful commands are:
Map: Specify the map to load by name, otherwise PEI is used.
Examples:
Map PEI
Map Washington
Map Russia
Port: Running multiple servers simultaneously requires specifying different ports. Unturned uses two consecutive ports. The first is for server list queries, and the second for in-game traffic. Recommended port values are 27015 for the first server, 27017 for the second server, 27019 for the third server, so on and so forth.
Examples:
Port 27015
Port 27017
Game rules, listing display, and many other options are available in the Config.json
file. Game options mirror the in-game Play > Singleplayer > Config menu. This file deserves further documentation, but is not officially documented yet.
Steam Workshop add-ons (e.g., maps, items, vehicles) are setup in the WorkshopDownloadConfig.json
file.
To include a Workshop file on your server:
Copy the file ID from the end of the URL.
URL: https://steamcommunity.com/sharedfiles/filedetails/?id=1753134636
ID: 1753134636
Insert the file ID into the File_IDs list:
"File_IDs":
[
1753134636
],
Multiple file IDs should be separated by commas:
"File_IDs":
[
1753134636,
1702240229
],
Curated maps are available as workshop items, so are configured in the WorkshopDownloadConfig.json
file. During startup the Map command searches installed workshop items for a matching name.
Alphabetically sorted list of curated map file IDs:
Hosting a publicly-accessible internet server requires an extra step compared to a LAN server. When on a home network Port Forwarding is required in order to direct traffic to the host computer.
One way to think of it is that when there are multiple devices (e.g. computers and phones) connected to the LAN, the outside internet does not know which device is the Unturned server. In this case port forwarding specifies which LAN device is the host.
For port ranges and other details: Port Forwarding
Listing your server on the in-game internet server list requires a Login Token to be set.