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.
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:
whitelist port 1234 welcome Hello World
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.
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.
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.
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:
If you play games other than Unturned, you might be interested in checking out these guides: