Workload · Hosting an Unturned world

Your own Unturned dedicated server, listed and online when your group is

To host Unturned for a group that plays when you are offline, you install the free Unturned Dedicated Server tool (U3DS) with SteamCMD, add a Steam login token (a GSLT) so the Internet list shows it, and let players in on two UDP ports, 27015 and 27016 unless you change them. It runs on Linux or Windows; Smartly Dressed Games does not support macOS hosts. This guide walks through each part in plain steps, and says where people usually get stuck.

The short version
  1. Free U3DS tool, installed with SteamCMD
  2. Players connect over UDP 27015-27016
  3. A login token puts you in the server list
  4. Saves only happen when you tell it to
  5. Restart it daily, the developers advise

What you are setting up

U3DS is the separate server program that ships alongside the game. Out of the box it runs as a LAN server: friends can join through a Steam invite or a 17-digit Server Code, but strangers never see it. Turning it into an Internet server takes two things, according to Smartly Dressed Games (SDG):

  1. A Game Server Login Token (GSLT), a key from Steam that tells it the server belongs to your account. Skip it and Steam treats your server as anonymous, so nobody browsing the list will see it.
  2. A way for players to reach it: either Steam's Fake IP relay or open ports. You need one or the other, not both.

Fake IP is easy on a home connection, but its address and port change after every restart, so a domain name will not stick to it. A rented server with its own public address skips that problem: open the two ports once and the address stays put.

Does it need a big machine?

There is no official answer, and we would rather say so than guess. SDG's guides cover ports, files and maintenance, but give no processor, memory or disk figure. What makes the load grow is easy to name: the map you pick, how many players you allow, the Workshop mods you add and any plugin framework on top.

The practical approach: start with one world, watch it on a busy night, then decide. If you later want a second world, say a PvE map beside your PvP one, SDG notes you need the SteamCMD install for that: the Steam Library version cannot run two at once on one computer. Each extra world takes the next pair of ports: 27017, then 27019. Open each pair in the firewall too; for the second world that is sudo ufw allow proto udp to any port 27017:27018.

The server that fits

A Primcast server is a whole physical machine with nobody else on it, so all of its processor and memory work for your worlds alone. You get root access, one IPv4 address for players to connect to, and an unmetered port, 500 Mbps or 1 Gbps depending on the line, with no traffic allowance to run out of. The rack servers and blades also come with a remote console that works even if the operating system will not boot.

Pick the city nearest most of your players, from Bucharest and Amsterdam on the European side to Miami, New York or San Francisco in America; our data center locations list them. A server already on the shelf goes live about 30 minutes after we approve your order, and the ready-to-go servers page shows what is racked now. Everything else, from builds to support, is on the Primcast game server page. There is no contract: one month is the default term.

Up and running in an evening

These steps assume Ubuntu, one of the one-click systems on our Linux servers. Valve, which makes SteamCMD, calls running it under root a security risk, so we create a separate user just for it. The firewall goes on before the game server first starts. Pick an Intel or AMD machine. SteamCMD's Linux instructions are for x86 and SDG publishes no ARM server, so we would not expect U3DS to run on our ARM lines (that is our reading, not an SDG statement).

sudo add-apt-repository multiverse; sudo dpkg --add-architecture i386; sudo apt update
sudo apt install steamcmd screen
sudo useradd -m -s /bin/bash steam
sudo ufw allow OpenSSH
sudo ufw allow 27015:27016/udp
sudo ufw enable
sudo -iu steam
/usr/games/steamcmd +force_install_dir /home/steam/U3DS +login anonymous +app_update 1110390 validate +quit
cd ~/U3DS && screen -S unturned
./ServerHelper.sh +InternetServer/OurWorld
  1. During the package install, agree to the Steam licence when asked.
  2. The last line starts your world, named OurWorld. Its files go in Servers/OurWorld.
  3. When the console says Loading level: 100%, type Shutdown. That saves and closes it so you can edit the settings.
  4. Start it again the same way. To leave it running, press Ctrl+A then D; screen -r unturned brings the console back.

Making it yours: name, map and rules

Your basic settings live in Servers/OurWorld/Server/Commands.dat, one command per line. Edit it only while the server is stopped, since most settings cannot change while it runs.

// lines starting with // are ignored
Name Friday Night Survivors
Map Washington
MaxPlayers 16
Port 27015
Perspective First
PvE
Owner YourSteamID64
Password pick-a-long-random-one
GSLT TokenFromSteamGoesHere
  • Owner takes your steamID64 and makes you the admin. Admins can type commands in game chat starting with @ or /; Help explains any command.
  • Leave out PvE if you want player-versus-player combat. Perspective can be First, Third, Both or Vehicle.
  • Loot, difficulty and listing options are in Servers/OurWorld/Config.txt. Each one is explained in a comment, and an empty value means the default.
  • For a Workshop map or mod, copy the number after id= in its Steam Workshop address into the File_IDs list in WorkshopDownloadConfig.json. Players download it automatically when they connect.

Keep the token and password to yourself

Make the token while signed in to Steam at steamcommunity.com/dev/managegameservers. Use Unturned's app ID, 304930, and a short memo so you remember which world it belongs to. SDG accepts it either in the GSLT line above or as Login_Token in the Browser section of Config.txt.

Guard the GSLT and your join password as you would any password. Keep them in those files instead of typing them into a launch command, where any user on the server can see them with ps and they stay in your shell history. Once the files exist, lock them down as the steam user with chmod 600 Servers/OurWorld/Server/Commands.dat Servers/OurWorld/Config.txt. Never paste them into a screenshot or a Discord message when asking for help.

Nights off: saves, updates and a daily restart

The part that catches most new hosts: U3DS never saves by itself. Progress reaches the disk only when someone runs Save or the server shuts down cleanly. SDG also advises a restart every 24 hours, since plenty of Unturned's older code counts time using single-precision numbers.

Config.txt can stop the world for you each day: switch on Enable_Scheduled_Shutdown and pick a local Scheduled_Shutdown_Time; players get chat warnings first. It can also stop for game updates (Enable_Update_Shutdown). The script below brings the world back each time, updates it first, and keeps a copy of the saves each time the world stops. Copies older than two weeks are removed.

#!/usr/bin/env bash
# /home/steam/keep-world-up.sh, run inside screen as the steam user
mkdir -p /home/steam/backups && chmod 700 /home/steam/backups
while true; do
  /usr/games/steamcmd +force_install_dir /home/steam/U3DS +login anonymous +app_update 1110390 validate +quit
  tar -czf /home/steam/backups/servers-$(date +%F-%H%M).tar.gz -C /home/steam/U3DS Servers
  find /home/steam/backups -name 'servers-*.tar.gz' -mtime +14 -delete
  cd /home/steam/U3DS && ./ServerHelper.sh +InternetServer/OurWorld
  sleep 60
done

Those backups contain your token and password too, which is why the folder is closed to other users. Copy them somewhere off the server now and then. One catch: the loop treats a crash like any other stop, so a world that keeps crashing will update, back up and relaunch over and over. If you see that, stop the script with Ctrl+C and fix the cause before starting it again.

When you do not need a server like this

If it is just you and a couple of friends playing together, the simple route is fine: start U3DS on your own computer through Steam and hand out the Server Code. Renting a machine makes sense once the world has to stay up while your PC is off, when you want a public listing, or when you plan more than one world. If you would rather use Windows, U3DS supports it, but Windows Server is a paid licence here and Linux is not.

Questions people ask

Will an Unturned server run on Linux?
It will. The developers support hosting on Windows and Linux, and give a Linux start command, ./ServerHelper.sh +InternetServer/ followed by your server's name. Only macOS is unsupported.
What ports do my players need?
Two UDP ports in a row: the lower one for server list queries and the next one for gameplay. Unless you change it with the Port line, that is 27015 and 27016. Open both in the server's firewall.
Why can't anyone find my server in the list?
Usually the login token is missing. Servers lacking it are anonymous, and anonymous servers never appear there. Create one on Steam with app ID 304930 and add it with the GSLT line or Login_Token.
Can one server host two Unturned worlds?
Yes, if U3DS was installed with SteamCMD, which is the only way SDG supports several servers at once. Give each world its own name in the launch command and its own port pair, starting the second at 27017, and open 27017-27018/udp in the firewall.
My friends lost an hour of building after a crash. Why?
Unturned servers have no autosave, so anything since the last Save or clean Shutdown is gone. A scheduled daily shutdown plus a relaunch script keeps that window short.
How long until my server is ready?
If the machine is already racked, expect it about 30 minutes after your order is approved. From there, the install and settings are the steps on this page, done by you as root.

Give your Unturned world a home

Your own physical server, its own address, traffic nobody counts, and no contract to sign.

Start your Unturned server

Read next