How to Execute Server (Commands.dat) Commands in Unturned

This help article provides information on how to use the Commands.dat file to execute server-only commands in Unturned. These commands will return the "Failed to while running" error message.

Using the Commands.dat File

The Commands.dat file is essentially a list of commands the server will execute before it starts.

Each command should be placed on a new line. For example, if you wanted to whitelist the server, set the welcome message to "Hello World", and set the port of the server using the Commands.dat file, you would enter:

port 1234
welcome Hello World
An example commands.dat file, setting the port, enabling the whitelist and setting a welcome message

That's really all there is to it! Whenever you want to add a new command, add it to the list and restart your server for it to be applied. Almost all commands can be used in the Commands.dat file. Check out our Unturned commands list to view them all, with help and syntax information.

Locating the Commands.dat File

The Commands.dat file will be found in different locations, relative to how and where you are hosting your Unturned Server. Find the most common locations below.

Unturned Server Organiser (USO) commands.dat Location

The Commands.dat file in Unturned Server Organiser can be found by clicking the "Open Server Folder" button to the right of your server console, then entering the "Server" directory.

Locally (Windows/Mac) Hosted Unturned Server Commands.dat Location

If you are hosting your own Unturned Server via your desktop PC (and not using USO), the Commands.dat file can be found amongst Steam's Unturned "common" Unturned files.

By default, your Commands.dat file will be located around:

Console Commands in Other Games

If you play games other than Unturned, you might be interested in checking out these guides: