How to Create Your Own Unturned Server
Complete guide to create a dedicated Unturned server on a VPS or dedicated Linux server: SteamCMD, GSLT token, Commands.dat, administrators, Workshop mods and systemd service.
On this page
Your values
Enter them once and the commands in this guide update.
This guide explains how to install and configure a dedicated Unturned server (U3DS) on your VPS or dedicated Linux server: GSLT token, administrators, Workshop mods, systemd service and backups.
Order a Server
To host your Unturned server, HostMyServers offers several gaming-oriented options:
- Performance VPS - Dedicated resources and fast processors, ideal for Unturned
- NVMe VPS - For a small server or a test server
- Eco Dedicated Servers - To host several game servers
- Performance Dedicated Servers - Maximum performance
Prerequisites
- SSH access as root or user with sudo privileges
- 64-bit Linux system (Debian 12/13 or Ubuntu 22.04/24.04 recommended)
- Active firewall: nftables (recommended), iptables or ufw (use only one firewall tool at a time)
- A Steam account with Unturned in its library, to create the GSLT token
- Ports 27015 and 27016 UDP accessible
Required Configuration
Smartly Dressed Games does not publish an official configuration for the server. These values are estimates, to be adjusted according to the map, the number of players and the mods.
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 2 GB | 4 GB and more |
| CPU | 2 cores | 4 high-frequency cores |
| Storage | 10 GB | 20 GB NVMe SSD, more with the Workshop |
| Network | 100 Mbps | 1 Gbps |
System Update
sudo apt update && sudo apt upgrade -yInstalling Dependencies
sudo apt install -y wget tar screen lib32gcc-s1lib32gcc-s1 is required by SteamCMD. screen gives the server an accessible console, which is essential for sending the Save and Shutdown commands.
Creating a Dedicated User
The server must never run as root:
sudo adduser --disabled-password --gecos "" unturnedPorts Used
An Unturned server uses two consecutive ports: the one set by the Port command, and the next one.
| Port | Protocol | Usage |
|---|---|---|
| 27015 | UDP | Server list queries |
| 27016 | UDP | Game traffic |
For a second server on the same machine, use Port 27017 (ports 27017 and 27018), and so on.
Firewall Configuration
With UFW
sudo ufw allow 27015:27016/udp
sudo ufw reloadWith iptables
sudo iptables -A INPUT -p udp --dport 27015:27016 -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4Saving the rules across reboots requires the iptables-persistent package.
With nftables
These commands use the inet filter table and the input chain, present by default in /etc/nftables.conf on Debian.
sudo nft add rule inet filter input udp dport 27015-27016 accept
(echo "flush ruleset"; sudo nft list ruleset) | sudo tee /etc/nftables.confInstalling SteamCMD
Log in as the unturned user:
sudo -iu unturnedCreate the directories and download SteamCMD:
mkdir -p ~/steamcmd ~/U3DS
cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzf steamcmd_linux.tar.gzDownloading the Server
Start the server installation (application ID 1110390):
./steamcmd.sh +force_install_dir /home/unturned/U3DS +login anonymous +app_update 1110390 validate +quitWhen it finishes, the message Success! App '1110390' fully installed. is displayed.
First Launch
The first startup creates the configuration files. MyServer is the server's identifier: it gives its name to the data folder.
cd ~/U3DS
./ServerHelper.sh +InternetServer/MyServerWait for the Loading level: 100% message, then type the following command to save and close the server cleanly:
ShutdownThe ~/U3DS/Servers/MyServer/ folder now contains your data, notably:
| Path | Description |
|---|---|
Server/Commands.dat |
Basic settings: name, map, players, port, token |
Config.txt |
Difficulty and advanced options |
WorkshopDownloadConfig.json |
Mods to download from the Workshop |
Server/Adminlist.dat |
List of administrators |
Creating the GSLT Token
The GSLT (Game Server Login Token) token is required for an Internet server. Without it, the server is considered anonymous and does not appear in the Internet list. It also keeps the same Server Code between restarts.
- Open the Steam Game Server Account Management page
- In App ID of the base game, enter 304930
- Add a memo to identify the server, then click Create
- Copy the token you get
The Steam account must not be limited, community banned or locked. It must have an eligible phone number and own the game.
Server Configuration
Commands.dat File
nano ~/U3DS/Servers/MyServer/Server/Commands.datName My Unturned Server
Map PEI
MaxPlayers 24
Port 27015
Perspective Both
Owner YOUR_STEAMID64
GSLT YOUR_GSLT_TOKENReplace YOUR_STEAMID64 with your 17-digit Steam ID and YOUR_GSLT_TOKEN with your token, then protect the file:
chmod 600 ~/U3DS/Servers/MyServer/Server/Commands.dat| Command | Description |
|---|---|
Name |
Server name (5 to 50 characters) |
Map |
Map, with the exact capitalization: PEI, Washington, Yukon, Russia, Germany or a Workshop map |
MaxPlayers |
Maximum number of players |
Port |
First port used (the next one is used for the game) |
Perspective |
Allowed view: First, Third, Both or Vehicle |
Owner |
Owner's SteamID64, with administration rights |
GSLT |
Steam login token |
Password |
Password to join (optional) |
PvE |
Disables combat between players (optional, no value) |
Cheats |
Allows cheat commands for administrators (optional, no value) |
Lines that start with // are comments.
Config.txt File
nano ~/U3DS/Servers/MyServer/Config.txtThis file gathers the game rules and advanced options. Each option is described by a comment, and a value left empty keeps the default setting. Servers created before version 3.25.8.0 still use Config.json, which is converted automatically at startup.
Then exit the unturned user's session:
exitConfiguration as systemd Service
The server runs in a screen session driven by systemd. This way you keep access to its console, and the service can request a clean shutdown with the Shutdown command.
Create the Stop Script
sudo nano /home/unturned/stop.sh#!/bin/bash
screen -S unturned -p 0 -X stuff "Shutdown^M"
# Wait for the save to finish and the server to stop
while kill -0 "$MAINPID" 2>/dev/null; do
sleep 1
donesudo chown unturned:unturned /home/unturned/stop.sh
sudo chmod 700 /home/unturned/stop.shCreate Service File
sudo nano /etc/systemd/system/unturned.service[Unit]
Description=Unturned Dedicated Server
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=unturned
Group=unturned
WorkingDirectory=/home/unturned/U3DS
Environment=TERM=xterm
ExecStartPre=/usr/bin/truncate -s 0 /home/unturned/unturned.log
ExecStart=/usr/bin/screen -DmS unturned -L -Logfile /home/unturned/unturned.log /home/unturned/U3DS/ServerHelper.sh +InternetServer/MyServer
ExecStop=/home/unturned/stop.sh
TimeoutStopSec=120
LimitNOFILE=100000
Restart=always
RestartSec=20
[Install]
WantedBy=multi-user.targetRestart=always restarts the server after a crash or a Shutdown command. Only systemctl stop stops it for good.
Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable unturned.service
sudo systemctl start unturned.serviceManagement Commands
# Check status
sudo systemctl status unturned.service
# Stop server cleanly
sudo systemctl stop unturned.service
# Restart server
sudo systemctl restart unturned.service
# Follow the server log
sudo tail -f /home/unturned/unturned.logAccessing the Console
sudo -u unturned script -qc "screen -r unturned" /dev/nullTo leave the console without stopping the server: Ctrl+A then D.
To send a command without opening the console:
sudo -u unturned screen -S unturned -p 0 -X stuff "Save^M"Checking That It Works
sudo systemctl is-active unturned.service
sudo grep "Loading level: 100%" /home/unturned/unturned.log
sudo ss -ulnp | grep -E ':(27015|27016)\b'The service must be active, the log must contain Loading level: 100% and both ports must be listening. Then connect from the game to confirm access.
Connecting to the Server
Players have three options:
- Internet list: search for the server name in the multiplayer menu
- IP address: in the direct connect menu (Connect), enter
SERVER_IPand port27015 - Server Code: enter the 17-digit code displayed in the log at startup
Administration
Adding Administrators
The owner set by Owner is an administrator. To add others, use the Admin command in the console. They are saved in Adminlist.dat.
Using Commands
Commands are typed in the server console, or in the in-game chat by an administrator, preceded by @ or /. Parameters are separated by /.
| Command | Description |
|---|---|
Help |
Lists the commands or describes the one given |
Players |
Shows connected players |
Say <message> |
Sends a message to all players |
Admin <player or SteamID> |
Grants administration rights |
Unadmin <player or SteamID> |
Removes administration rights |
Kick <player or SteamID>/<reason> |
Kicks a player |
Ban <player or SteamID>/<reason>/<duration> |
Bans a player |
Unban <SteamID> |
Removes a ban |
Save |
Saves the game |
Shutdown |
Saves and stops the server |
The full list of commands is available on the Unturned wiki.
Installing Workshop Mods
Adding a Mod
- Open the mod's page on the Unturned Workshop
- Note the ID at the end of its address (
?id=...) - Add it to the server's configuration file
sudo -u unturned nano /home/unturned/U3DS/Servers/MyServer/WorkshopDownloadConfig.jsonIn the File_IDs list, separate the IDs with commas, with no comma after the last one:
"File_IDs":
[
1753134636,
1702240229
],Keep the other lines of the file, then restart the server:
sudo systemctl restart unturned.serviceAt startup, the server installs or updates these mods and their dependencies. Players download them automatically when they connect.
Using a Workshop Map
Add the map's ID to File_IDs, then set its name in Commands.dat. For example, for the Hawaii map (ID 1753134636):
Map HawaiiAdding Plugins with Rocket
The server includes Rocket (Legally Distinct Missile), maintained by Smartly Dressed Games. To enable it, copy its module:
sudo systemctl stop unturned.service
sudo -u unturned cp -r /home/unturned/U3DS/Extras/Rocket.Unturned /home/unturned/U3DS/Modules/
sudo systemctl start unturned.serviceServer Update
Manual Update
sudo systemctl stop unturned.service
sudo -iu unturned
cd ~/steamcmd
./steamcmd.sh +force_install_dir /home/unturned/U3DS +login anonymous +app_update 1110390 +quit
exit
sudo systemctl start unturned.serviceIf you use Rocket, copy its module again as described above, to keep the version provided with the server.
Update at Every Startup (optional)
To check for updates at every startup, add these lines to the [Service] section of the service file, before ExecStart:
ExecStartPre=-/home/unturned/steamcmd/steamcmd.sh +force_install_dir /home/unturned/U3DS +login anonymous +app_update 1110390 +quit
TimeoutStartSec=900The dash lets the server start even if Steam is unavailable. Then reload systemd:
sudo systemctl daemon-reloadIn Config.txt, the Enable_Update_Shutdown option stops the server when an update is detected, and Enable_Scheduled_Shutdown schedules a daily shutdown. Thanks to Restart=always, the server then comes back up on its own. Smartly Dressed Games recommends restarting every 24 hours.
Automatic Backup
Backup Script
sudo nano /home/unturned/backup.sh#!/bin/bash
umask 077
BACKUP_DIR="/home/unturned/backups"
SERVERS_DIR="/home/unturned/U3DS/Servers"
DATE=$(date +%Y-%m-%d_%H-%M-%S)
mkdir -p "$BACKUP_DIR"
# Save the game if the server is running
screen -S unturned -p 0 -X stuff "Save^M" 2>/dev/null && sleep 15
# Back up the data, without the downloaded mods
tar -czf "$BACKUP_DIR/unturned_$DATE.tar.gz" --exclude='MyServer/Workshop' -C "$SERVERS_DIR" MyServer
# Delete backups older than 7 days
find "$BACKUP_DIR" -name "unturned_*.tar.gz" -mtime +7 -delete
echo "Backup completed: unturned_$DATE.tar.gz"sudo chown unturned:unturned /home/unturned/backup.sh
sudo chmod 700 /home/unturned/backup.shSchedule Tasks
sudo crontab -u unturned -e# Save the game every 10 minutes
*/10 * * * * screen -S unturned -p 0 -X stuff "Save^M" >/dev/null 2>&1
# Backup every 6 hours
0 */6 * * * /home/unturned/backup.shTroubleshooting
The server won't start or restarts in a loop
- Check the server log:
sudo tail -n 100 /home/unturned/unturned.log - Check the service logs:
sudo journalctl -u unturned.service -n 100 - Check the installation by running the
app_updatecommand again withvalidate - Check the disk space and memory:
df -handfree -h
steamclient.so Error
Create the link to SteamCMD's 64-bit file:
sudo -u unturned mkdir -p /home/unturned/.steam/sdk64
sudo -u unturned ln -sf /home/unturned/steamcmd/linux64/steamclient.so /home/unturned/.steam/sdk64/steamclient.so
sudo systemctl restart unturned.serviceThe server doesn't appear in the list
- Check that the service does use
+InternetServer/MyServer - Check that
GSLTis inCommands.datand that the token was created with App ID 304930 - Check that the token has not been deleted or expired on the Steam page
- Wait a few minutes after startup
Players can't connect
-
Check that ports 27015 and 27016 are open over UDP:
Terminalsudo ufw status sudo iptables -L INPUT -n --line-numbers | grep 2701 sudo nft list ruleset | grep 2701 -
Check that the server is listening:
sudo ss -ulnp | grep 2701 -
Wait for
Loading level: 100%in the log -
Try the Server Code to tell a firewall problem from a server problem
The map doesn't load
The name passed to Map is case-sensitive. For a Workshop map, check that its ID is in File_IDs and that the download finished in the log.
Mods don't download
- Check the JSON syntax of
WorkshopDownloadConfig.json, especially the commas - Check that the mod is public on the Workshop
- Check the available disk space
No screen session found or Cannot open your terminal
Check that the service is active and use exactly the commands in this guide, with sudo -u unturned. To open the console, script is required: it provides screen with a terminal owned by the unturned user.
Recent progress is lost after a crash
Check that the scheduled Save task is active with sudo crontab -u unturned -l.
FAQ
Do I need to open ports for Steam?
If your firewall blocks incoming traffic by default, these rules allow the server to receive replies from the Steam servers:
UFW:
sudo ufw allow proto udp from any port 27000:27030 to any port 1025:65535
sudo ufw allow proto udp from any port 4380 to any port 1025:65535
sudo ufw reloadiptables:
sudo iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65535 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65535 -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4nftables:
sudo nft add rule inet filter input udp sport 27000-27030 udp dport 1025-65535 accept
sudo nft add rule inet filter input udp sport 4380 udp dport 1025-65535 accept
(echo "flush ruleset"; sudo nft list ruleset) | sudo tee /etc/nftables.confDoes my server have to follow any rules?
Yes. Internet servers must follow the Smartly Dressed Games hosting rules.
Can I host several servers on the same machine?
Yes. Use a separate identifier (+InternetServer/AnotherServer), ports (Port 27017), systemd service, screen session and GSLT token for each server.