Reign Of Kings

Reign Of Kings

89 ratings
Starting Community Servers - Official Guide
By TacticalDan and 1 collaborators
Setup your own server to play with friends or make new friends.
Quick Start
Heres a quick way to get a server running on your computer.
  1. Navigate to to your game files which are usually under
    C:/Program Files (x86)/Steam/SteamApps/common/Reign Of Kings
  2. Copy all of the files from that folder into a new folder. This new folder can be anywhere. The easiest place is on your desktop.
  3. Once all of the files have been copied, run Server.exe inside of the new folder.
    This will start then close a short while after. This is normal. It creates the configuration files the first time it is run.
  4. Open Configuration/ServerSettings.cfg and change any settings you like. Make sure to save.
  5. Now you can run Server.exe again and it will load completely.
  6. Visit the Playing with Friends section below to learn how to enable your server to play with friends.
  7. You can then connect to this server by running the game and direct connecting to the ip of localhost and the port of 7350 (default).
Configuring Your Server
All of the files located in the Configuration folder inside of your server files are used to configure your server.

ServerSettings.cfgThis file is used to configure the overall settings of your server. Here you can change your server name in the lobby, whether or not it has a password, what port the server listens on, what level to load, and more.
ConsoleSettings.cfgThis file will only be generated if you run the server by running Server.exe. This file can be used to enable auto-updating, remote consoles, auto-restarting, crash protection, and you can even perform some batch scripts when the server restarts such as backing up the saves folder.
Whitelist.cfgThis file contains all players who are white-listed on the server. A white-list is a list of players who are allowed to connect to the server. If the white-list is enabled, players who are not added the white-list will not be able to connect. This file is modified using a command, you can edit this file but it is recommended to use the command instead. For help with the command type /help whitelist into the game when playing as an administrator or into the server console.
Permissions.cfgThis file is used to keep track of user permissions on the server. It keeps track of who are administrators and is very flexible. This file can be used to create your own groups of users such as moderators who you want to limit what commands they can use. For instance you may not want moderators to be able to shutdown or restart a server or to ban users. See the Permisisons section below for more information on permissions.
Users.cfgThis file is used to keep track of who has played on your server. It is recommended that you do not modify this file unless you know what you are doing. For help with the command type /help registry.
DeathMessages.cfgThis file is currently not used but has not been turned off yet.
BannedPlayers.cfgHolds the list of players who are banned. Type /help ban for help with the ban command.
ChatMutes.cfgHolds the list of players who have their chat muted on the server. Type /help mutechat for help with the command.
VoiceMutes.cfgHolds the list of players who have their voice chat muted on the server. Type /help mutevoice for help with the command.
Playing With Friends
Allowing the Sever through your Firewall
The first layer of security between your friends and your server is your firewall. We need to allow the server to see through the firewall so your friends can join.
  1. Press the start button and type Allow an App through Windows Firewall. And choose that option.
    Note: Windows 8 will not show a search field until you start typing.
  2. Click the Change settings button near the top right of the window. Accept any popup that shows.
  3. Click the Allow another app... button near the bottom right of the window.
  4. Navigate to your server files, locate and select ROK.exe, then press open.
  5. Windows should allow any ports used by ROK.exe through the firewall now.

Allowing the Server through your Router (Port Forwarding)
The second layer of security between your friends and your server is your router. Your router has it's own firewall as well which we need to allow the server through. This is called port-forwarding. There is no universal, simple way to do this. Unfortunately every router has a different methods to port-forward and different interfaces to navigate through. There are plenty of websites to help you find out how to port forward using your router.

You will need to port forward these ports:
Game Port: Udp/Tcp 7350 (Can be changed in ServerSettings.cfg)
Steam Port: Udp/Tcp 27015 (Can be changed in ServerSettings.cfg)

Use this site to help you.
Setting Up A Dedicated Server
If you have your own dedicated server computer, here is how to download the server files and get a server running.

  1. First we need to get the server files onto your dedicated server computer. You can either:
    1. Install steam and install the game.
    2. Use SteamCMD.
    3. Download this file[] and run it.
      When it asks for a user name enter anonymous.
      If it asks for an app id, enter 381690. ( It shouldn't though )
  2. Now that you have the server files you can follow the quick start section above.
  3. If you are running multiple game servers on the same dedicated computer, you will need to change the portNumber and the pingPort in ServerSettings.cfg. If you have RCon enabled you will also need to change the rConPort in ConsoleSettings.cfg.

Dedicated Server App ID: 381690
Turning on Automatic Updates
Now that you have a server running, you may want to enable automatic updates so your players can get back into the game as soon as steam updates.

  1. Run your server at least once to generate the necessary config files.
  2. Open Configuration/ConsoleSettings.cfg in a text editor.
  3. Under the Auto Update section, change:
    autoUpdate = 'False' updateCheckInterval = '0' steamAppId = '344760'
    autoUpdate = 'True' updateCheckInterval = '300' # 5 minutes steamAppId = '381690'
    then save your changes.
  4. Start the server again and it should start downloading SteamCMD and create an Update folder.

This will check every 5 minutes to see if steam has an update. If it finds an update, it will download the update, then shutdown and restart the server.

It is normal for a black window to open and close while your server is running. This is SteamCMD checking for an update.
We want to create a guide for permissions on Steam. For now however, you can visit this page which explains our permissions fairly well.
Server-Side Modding
Want to change how your server plays? Server-side modding allows you to change how the game plays by changing a config value in the Mods/ folder. When you change a value on the server, the player will then see the changes when they play the game.

For example, when you change the player's max inventory size on the server, new players will get that size of inventory when they play the game. However keep in mind that if you use an old save, some mods may be overidden by that save.
Q: I cannot connect to my server!?
  1. Make sure you have actually started the server by looking in the process list of the task manager (Ctrl + Alt + Delete)
  2. Next make sure that you have allowed the app through the firewall. Press the windows key and type allow then choose the Allow a program through Windows Firewall. In the window that appeared, browse for the ROK.exe and add it to the exception list.

Q: I get error code 14 when connecting to my server!?
A: This is likely because you have not port forwarded your server or have not allowed your server through the firewall. Visit the Playing With Friends section for help with Port Forwarding and Firewall setup.
< >
Treat2Death Mar 11 @ 4:09am 
Refuses to authenticate with Steam. Refuses to allow whitelisted players. Basically, Dedicated Server does not work. Making a copy of the main game files in another location does.
Sidex Jan 19 @ 7:40am 
whether there is a graphical shell for easy administration?
serenityishope Oct 26, 2016 @ 9:09am 
My server seems to wipe every time i turn it off. Any ideas?
The Stranger Oct 21, 2016 @ 2:22am 
I agree with StankyD. Same problem, same things done.
StankyD Oct 20, 2016 @ 7:44pm 
This just doesn't work. I have port-forwarded, allowed the server folder and the main game folder through my firewall, and I can't connect using my IP. I can use localhost, but nothing else. I can even search for my server, but it won't connect. And in the console, there are no errors. The ports that are forwards is 7350 and 27015. You know, it would be quite nice to actually have some support with this. I have seen that many people aren't getting any fucking replies and it is quite frustrating.
Tagette  [author] Oct 12, 2016 @ 4:02pm 
Added the Server-Side Modding section.

@Legend Feel free to add me, I will respond when I have the time. Unfortunately, this does not happen often because I just don't have enough spare time during work. Keep in mind that you are not the only person who would like to speak to me. Also, I don't answer questions during my personal time.
Interactive Gaming Studios Aug 8, 2016 @ 1:46am 
Hey Tagette,

I sent a friend request to you because I'd like to ask you something. Please don't ignore this. Thanks.
BABOON OF DOOM Aug 7, 2016 @ 3:25am 
I followed the guide and even went through all that port forwarding shit, i port forwarded 7350 and 27015 but i still get the error code 14....
Zenzai_b Jul 6, 2016 @ 7:10am 
I used this guide and I still can not connect to anything. sorry but I have been trying to get help for this now going on a week and nobody and I mean NOBODY has posted or replied to my post about a fix.
lanyue8368256 Jun 22, 2016 @ 9:29pm 
m_guicamera == null