Unturned: Server
A stand-alone server for the Unturned PC video game.
- Unturned the game -> Unturned: Server
Contents
LAN Server via SteamCMD
installation
install SteamCMD (if you dont already have it) - Ubuntu/Mint
sudo apt install steamcmd sudo add-apt-repository multiverse sudo dpkg --add-architecture i386 sudo apt update sudo apt-get install lib32gcc1
Microsoft Windows Users try:
Once installed, start your server from the command prompt like this:
./ServerHelper.sh +LanServer/MyServer
The full path to the ServerHelper.sh script for Unturned is...
~/.local/share/Steam/steamapps/common/Unturned/ServerHelper.sh ~/.local/share/Steam/steamapps/common/U3DS/ServerHelper.sh
note: Not sure what the difference is in the script at each location above.
The configuration file for your server with the default parameters including difficulty level, map, etc, is stored in a file called Commands.dat
vi ~/.local/share/Steam/steamapps/common/U3DS/Servers/MyServer/Server/Commands.dat
Replace the text "MyServer" with the name of your server. The default name is actually MyServer, yours will be named that unless you specified otherwise.
Configuration file for additional parameters
vi ~/.local/share/Steam/steamapps/common/U3DS/Servers/MyServer/Config.json
Workshop Mods
ls ~/.local/share/Steam/steamapps/workshop/content/304930
Creating a Server using a New Map (New Server New Map)
With SteamCMD and Unturned both installed, the next step is to setup and configure the server with a map of your choice.
Consider a name for your new server. It is a good idea to incorporate the name of the map into your server name to aide in your organization if you eventually have multiple servers. For this example we will use the Hawaii map.
You must start the server once, then terminate it, to allow the binary to create all of the necessary configuration files.
cd ~/.local/share/Steam/steamapps/common/U3DS ./ServerHelper.sh +LanServer/HawaiiLuau
When finished loading you should see the last line in console look something like this:
Total: 132.052000 ms (FindLiveObjects: 3.179000 ms CreateObjectMapping: 1.160000 ms MarkObjects: 126.958000 ms DeleteObjects: 0.754000 ms)
Now shut it down by issuing the 'shutdown' command in the server console. you wont see the first letter of shutdown so it will actually look like you typed 'hutdown'
shutdown
Create the mail configuration file 'Commands.dat' which specifies among other things, the map you will be using. It wont exist until you create it. Observe correct case and path.
vi Servers/HawaiiLuau/Server/Commands.dat
Populate the file with the correct parameters including the name of the map.
name A discreption of your map and game rules for the server poll list map Hawaii maxplayers 6 welcome Give your map a clever MOTD for players to read when they connect mode Hard owner 12345678901234567 cheats Enabled perspective Both loadout 255/2/253/1175/1445/1446/1508 password blah123 port 27015
In this example we choose some useful parameters. The map name must match the name of a curated map identifier or one that you have manually installed.
If you try to run the server at this point you will see the following error because Hawaii is a custom map:
Attempting to load curated map 'Hawaii'? Include its workshop file ID (1753134636) in the WorkshopDownloadConfig.json File_IDs array. Failed to find map Hawaii, defaulting to PEI!
Install the custom map on the server (if necessary depending on your setup). There are a couple options for you to accomplish this. The first is to manually place the files on the server. The second and best option is to configure the server to automatically download the map, which also triggers connecting clients to automatically download and install the map when they attempt to connect to your game server. Here the second best option is described.
Determine the ID of the custom map. In the Unturned game client goto WORKSHOP -> MANAGE and look for the map workshop item, then click 'View Details.' Take note of the map ID number. In our example Hawaii is '1753134636'. Back to the server you will edit:
vi ~/.local/share/Steam/steamapps/common/U3DS/Servers/HawaiiLuau/WorkshopDownloadConfig.json
looks like:
{ "File_IDs": [ 1753134636 ], "Query_Cache_Max_Age_Seconds": 600, "Max_Query_Retries": 2, "Use_Cached_Downloads": true, "Should_Monitor_Updates": true, "Shutdown_Update_Detected_Timer": 600, "Shutdown_Update_Detected_Message": "Workshop file update detected, shutdown in: {0}", "Shutdown_Kick_Message": "Shutdown for Workshop file update." }
save and launch the server
./ServerHelper.sh +LanServer/HawaiiLuau
You should see among a bunch of other messages:
1753131903 'Hawaii Assets' queued for download Downloading workshop item: 1753134636
That's good. Server is ready for play.
Unturned Server
Managing admins and bans
To grant admin to player that is actively connected:
type "/admin playername" or "/admin 64id" for the desired person who you want to give admin.
To ban a player that is actively connected:
type "/ban playername" or "/ban 64id"
When players are offline:
To ban or admin:
xxxx
To unban or remove admin:
If you want to purge the entire ADMIN or BAN list while said users are offline, use the following process, follow steps in order.
- Stop the Unturned Server (make sure server process terminates completely from memory)
- navigate to the directory /Servers/Unturned/Server
- delete Blacklist.dat if you wish to unban everyone. delete Adminlist.dat to remove all server admins.
- Start the Unturned Server.
The server process reads from the dat files initially on load, then caches in memory. All modifications using the ban or admin command take place in memory space. Once the server owner terminates the server the server dumps from the memory back to the dat files. So, deleting the dat files while process is active has no impact as server simply dumps what it knows about who is banned or admin back to the files on shutdown.
Online Server for Unturned
You can use your existing LAN server (assuming that you set one up using the guide you found here) to operate an online game server for others on the Internet to connect to and use. For those of you with a great Internet connection and a static IP address or your own subnet, you will have it made. However, the average Internet user as an asymmetrically proportioned residential broadband connection with dynamic IP addressing. This does not make the hosting of an online game server impossible, it just is far from ideal and depending on your Internet provider anywhere from somewhat more difficult to impossible. You will likely have to understand how to set up a port forward in your CPE (firewall/router) and dedicate a port for your server.
When sharing your at home Unturend game server to the Internet community is not working out you can consider the option of purchasing a rental game server from one of the commercial providers available online. Typical monthly fees range from $12/mo on up to $40/mo for the vast selection of purpose built providers.
In order to assist you in your search for a good Unturned Game Server Host there is our Unturned: Dedicated Hosting Providers page. Information listed is based on individual experiences and opinion. I would consider it the most unbiased and useful guide available for reviews of Unturned Game Hosting Providers as of late 2021. In your search try to find a host that uses Linux rather than Microsoft as a Linux server will more efficiently manage available memory and should offer you a better price since the provider is not wasting money on expensive Windows licensing fees. An Unturned server runs quite nicely on Linux and well perform much better on equivalent hardware.
Dedicated Game Server Token
What the heck is a dedicated game server token? You might ask.... If you wish to have your Unturned game server appear in the listing of Internet game servers from within the game itself, you need one of these tokens.
Beginning in version 3.21.31.0, Unturned dedicated servers must be authenticated using a Game Server Login Token or GSLT in order to be displayed on the server list.
It works like this:
- Go to https://steamcommunity.com/dev/managegameservers and create a token for App-ID 304930
- Add the generated token as Login_Token to Config.json under the Browser section OR alternatively use the GSLT <token> command in easy config.
Mods for Unturned Server
Rocket / RocketMod / RocketMod 4 for Unturned Server
see: Unturned: RocketMod
- Quick Tip: If you modified kit or command permissions in Permissions.config.xml and want to refresh them without stopping and restarting the sever, as admin simply type:
/p reload
uEssentials for Unturned Server
Configuration File Structure
The most important ones that are text edit friendly.
unturned/Config.json
contains:
- server icon, description, and owner text
- gamemode settings: Easy, Normal, and Hard with related parameters
- gameplay parameters and settings like friendly fire and ballistics
unturned/WorkshopDownloadConfig.json
contains:
- file id's of workshop items including mods and custom maps
- misc workshop and workshop update settings
unturned/Server/Commands.dat
- server map, gamemode, and owner steam64 id
- parameters case sensitive such as: name, Map, Mode, Perspective, Owner, PVP
Miscellaneous Support
Server is running an older version
When you attempt to connect to your server with the game client you might see the following error if there is a client server version mismatch:
Server is running an older version: 3.21.xx.x
With this example the game (on your computer) is running a later version than does the server. This may happen when the client has performed an automatic update when launched from Steam while the server has not yet been updated.