Note: You need to open the .dat files in a text editor like nano.
Log in as the user that running Unturned. (User created here.)
Cd unturned/Servers/"Your Server folder you want to edit"/Server
There should be 4 .dat documents, labeled Adminlist, Blacklist, Commands, and Whitelist.
Use the Commands file if you want to run list of commands that will run each time the server starts. Use a separate line for each command.
Bind – Binds your internal IP to the socket. (Internal IP is the network adapter IP of the adapter you use)
Chatrate – Assigns the minimum amount of time in seconds between chat messages in order to prevent spam.
Cycle – Assigns the day/night cycle in seconds.
Decay – Assigns the amount of time a player, or their group members, can be offline before their structures can be removed by anyone. Default is 604800. (7 days)
Filter – Enables the old name filter.
Loadout – Assigns what all players spawn with. The first number value in the loadout is the Skillset ID. (Example: Loadout 255/15/15/81/81/18/20/20/121 – Gives all skillsets, 2 Medkits, 2 MREs, a Timberwolf, 2 Timberwolf Magazines, and a Military Knife.)
Log – Enables/Disables [chat]/[join&leave]/[death]/[anticheat] messages. (Y = Yes, N = No) (i.e. Log Y/Y/Y/Y)
Map – Sets the map that will be used for the server. If you want to use a workshop map, the workshop map folder must be placed in the Workshop folder of the server, otherwise it will fail to load the map.
MaxPlayers – Sets the max amount of players the server will allow.
Mode – Sets the difficulty mode. (Easy, Normal, Hard)
Name – Sets the server’s name. (i.e. Gusse500’s Unturned Server)
Owner – Sets the server’s owner, which gives them administrator commands and fully sets up the server. (Requires your Steam 64 ID.)
Password – Sets a password to the server to keep out unwanted guests, making the server more private.
Perspective – Assigns the perspective views. (First, Third, Vehicle, Both.) First allows only first-person, third allows only third-person, Vehicle allows third-person only when the player is in a vehicle, and both allows changing between first and third-person views freely.
Port – Sets the server’s port. The default server port is 27015.
PvE – Sets the server to only allow Players VS Environment combat.
Sync – Syncs player data between servers using the same key.
Timeout – Sets the max Ping for players before they time out. (400~600 is recommended)
Welcome – Sets the welcome message.
Command Line Options
These parameters are used in launching the server from a command line interface. The order of inputted commands do not matter.
-nographics (This command is needed to not see the welcome screen. Instead you see a black screen with no GUI.)
-sv (needs to be at the end of the parameters)
-batchmode (prevents the game from launching a GUI, and makes it run as a background process. Greatly reduces CPU usage)
You should now be able to connect to your own server by running the game through Steam. To do this, click “Play”, and then “Connect”, and in the IP field, type “Adress to your server”, then click “Connect” to join your own server.
iptables -A INPUT -p tcp --dport 27015:27017 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT iptables -A INPUT -p udp --dport 27015:27017 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
For both, if you selected a different port via the start command or Commands.dat, change the first number to the port you selected, and the second port two ports ahead (ex. 27040-27042).