rFactor 2

rFactor 2

33 ratings
Setting up a Dedicated Server
By marrs
This guide explains everything you need to know to setup one or more dedicated servers for hosting races for rFactor 2 on Steam. The basic process involves first installing the dedicated server, then installing the tracks and cars you want and creating one or more “race events” with those that you can host. For every different server instance you can setup a profile, configure and open ports on your firewall and start hosting.
This guide explains everything you need to know to setup one or more dedicated servers for hosting races for rFactor 2 on Steam. The basic process involves first installing the dedicated server, then installing the tracks and cars you want and creating one or more “race events” with those that you can host. For every different server instance you can setup a profile, configure and open ports on your firewall and start hosting.

The whole process does take some time and some steps might not be immediately intuitive, but in the end this gives you a very flexible hosting setup. If you have any questions while following this guide, please provide feedback so we can improve it.
Downloading and Installing
For people that want to host a dedicated server, a special installation is now available. It does not require you to install and run a Steam client, or log into Steam, but it does provide you with a dedicated server that will register with Steam, so it's visible in the server list.

The installation goes as follows:
  • Download the SteamCMD archive from this link: http://media.steampowered.com/installer/steamcmd.zip
  • Create a new folder on your system for SteamCMD, for example C:\Racing\SteamCMD.
  • Put SteamCMD.exe from the archive you downloaded in that folder.
  • Open a shell (Windows+R to run a command, and then type “CMD”).
  • Go to the folder you just created: cd \Racing\SteamCMD
  • Run the following command:
    steamcmd +login anonymous +force_install_dir ../rFactor2-Dedicated +app_update 400300 +quit

Sit back and get a cup of coffee. Steam will download the full distribution for the dedicated server for you and install it in C:\Racing\rFactor2-Dedicated.

If you ever want to update your installation in the future, because a new version of rFactor 2 has been released, you can simply run the SteamCMD command again and your installation will automatically update to the latest version.
Setting up Shortcuts
Before you continue installing packages and creating events, it is worthwhile to setup a few shortcuts:
  • A shortcut to either the 32 or 64 bit version of the dedicated server to host a race. You can find those in the Bin32/Bin64 folder of the installation. Make sure to add:
    at the end of the line in "Target" to ensure that the dedicated server knows how to load all your content, otherwise the shortcut won't work! So the whole line in that "Target" field should be something like this:
    "C:\rFactor2-Dedicated\Bin64\rFactor2 Dedicated.exe" +path=".."

  • A shortcut to the module manager that can be used to install packages containing tracks, cars or race events. You can find it in the Bin32 folder of the installation and it's called ModMgr.exe
  • A shortcut to the package manager that can be used to create race events. It is located in the Support\Tools folder of the installation, a file called MAS2.exe.
Downloading Packages
The different tracks and cars that you can use to host races in rFactor 2 can be downloaded in different ways. Probably the most convenient way of doing so is through the same Steam Workshop that you are familiar with when playing rFactor 2. The biggest difference being that a server has no Steam account and therefore does not support the notion of being subscribed to content. However, that does not mean that you cannot download items from the workshop, but you have to do that differently.

Another way is to browse the internet and download from the various sites that provide content for rFactor 2. The content ISI provides can be found at http://rfactor.net/web/rf2/rf2dl/ but in general, how that works, depends on the site in question. That makes it hard to give a generic guide for that, which is why we will focus on using the Workshop here.

To download anything from the workshop, you do need a Steam account. You also need to know the Workshop ID of the item you want to download. If you browse the workshop, the URL will reveal this ID. For example: http://steamcommunity.com/sharedfiles/filedetails/?id=505225177

Open a command line and run SteamCMD to start the actual download of the item:

S:\Temp>steamcmd.exe +login USERNAME PASSWORD +workshop_download_item 365960 505225177 +quit

The command you are running will log into Steam, download an item from the workshop for a game with ID 365960 (which is rFactor 2) and the workshop item ID 505225177, and then quit. Now to find the item you just downloaded, go into the folder where you installed SteamCMD and then go to this path:


Again you see the ID of both the game and the workshop item in the path. That folder should give you the contents of the item. This is often a single package file, but could very well be a whole set of files. In the next section we will discuss how to install them.
Installing Packages
Once you have downloaded the packages you need, you can install them. The easiest way is to first copy the files you downloaded into the "Packages" folder of your installation. Then, using a shortcut you've setup earlier in the guide, run the module manager. The packages should now show up in the list and you can use the "Install" button to install them.

For hosting you need at least some kind of "Race Event" (which describes what cars and tracks you're hosting) and the corresponding cars and tracks. If you don't have a race event, you can also create your own. This is explained in great detail in a different guide.
Configuring your Firewall and Router
To make your dedicated server accessible for others, you probably need open up some ports in your firewall and potentially forward them from your router to the computer that is running the dedicated server.

The ports that the dedicated server uses can be configured in the Multiplayer.JSON file that can be located in the player folder in UserData. The following two settings configure the ports:

"HTTP Server Port":64297 "Simulation Port":54297

In addition to these two ports, Steam will use two extra ports (the ones directly after the HTTP server port) so for this example the following ports need to be opened:

UDP+TCP 54297 TCP 64297 UDP 64298 UDP 64299
Running the Server
In one of the previous sections you have already setup a shortcut to the dedicated server, so now all you need to do is launch it. A wizard will guide you through the final steps of selecting a race event, cars, tracks and configuring the many different options.

If you want to run more than one dedicated server on the same computer, you need to have a unique copy of the player folder for each. To set that up, start by going to your installation and then to the UserData folder. If you've already run the dedicated server before, you will see a "player" folder. If not, do that first. Then make a copy of the player folder, go in and change the ports (and possibly your router and firewall again). Then create a new shortcut to launch this dedicated server. In the "Target" field of this shortcut, add the following behind rFactor2 Dedicated.exe:


Assuming the copy of the player folder is called "player2". From now on, you can use this shortcut to launch this instance of the dedicated server. In theory you can add as many as you have ports, bandwidth, memory and CPU power for.
< >
karstenve015 Sep 5 @ 8:10am 
Ik ben bezig met een dedicated server op te zetten alleen ik blijf steken bij het downloaden van packages. Wat ik op dit moment probeer is om die command line die je in je gids heb staan in de steamcmd te zetten. Volgens mij zie ik iets over het hoofd maar ik heb geen idee wat. Heb jij misschien een idee wat ik fout doe?
RS_FC Aug 31 @ 4:16am 
I've been trying to get this to work for 12 hours today. I feel like an absolute fool but also think there should be a simpler method... Tried everything and read every comment... Still getting the message "dedicated server requires at least one mod... etc" ... tried everything stated below.
Gup Douglas Aug 23 @ 12:25pm 
A few notes:
1 - If you want to install to a different drive then c: here's my path with SteamCMD in the root of my E: drive - Cd /D E:\SteamCMD
2 - You don't have to create shortcuts, you can navigate to the folders that contain these apps and launch from those locations.
3 - When installing content make sure your working directory is the main rf2 dedicated folder. It starts pointing at bin32.
4 - You can point mod manager at your existing rf2 packages folder instead of trying to find/get the content again. That way you only need one copy of the content.

I hope this helps someone else, Enjoy!
Rodrrico Aug 10 @ 7:34pm 
No wonder there are few servers running. This is far to complicated, surely the devs and improve on this like 99% of other modern games.
Claudio Souza Jun 23 @ 1:52pm 
How to download a file that appears 0.000 MB in the workshop ???
doberk Jun 10 @ 12:00am 
I get an error when logging using steamCMD. when trying to download a track steamCMD says this: "Loggin in 'Doberk2000' to steam public...Logged in OK. Waiting for user info... FAILED. Timed out." It worked fine last week, what could be the problem now?
14_roy_wynn Jun 1 @ 4:32pm 
Mankiewicz try signin out of steam then launch game you will have to reenter user and PW but should work. when you are trying to get CMD to work it seems to freeze in a double login. Loging out of steam seems to correct this but it will continue every time you use steamCMD!
14_roy_wynn Jun 1 @ 4:28pm 
Depco instead of looking in content folder lok in downloads folder My download from steam works but I also get a error but after pullin my hair out I looked in the downloads folder and there the items were.
Depco May 20 @ 4:22pm 
Im trying to DL content from then workshop through the SteamCMD program... it is not working at all. The command that are listed here are not doing what the instructions say. I am gettign errors in the CMD window