Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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” “series” (in an .rfmod file) 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.

...

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 it in the Bin32/ Bin64 folder of the installation. Make sure to add:
    +path=".."
    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 Bin64 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_x64.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 not need a Steam account, you can anonymously download them. You also do 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 https://steamcommunity.com/sharedfiles/filedetails/?id=5052251771515644900

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

Code Block
S:\Temp>steamcmd.exe +login USERNAME PASSWORDanonymous +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 5052251771515644900, 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:

Code Block
steamapps\workshop\content\365960\5052251771515644900

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.

...

For hosting you need at least some kind of "Race Eventseries" (which describes what cars and tracks you're hosting) and the corresponding cars and tracks. If you don't have a race eventseries, you can also create your own. This is explained in great detail in a different guide, such as the one you'll find here: https://steamcommunity.com/sharedfiles/filedetails/?id=554544322 and if you're considering hosting paid content, we definitely advise you to read up on that as well in our forum: https://forum.studio-397.com/index.php?threads/how-to-creating-a-raceevent-with-paid-content.57207/

Configuring your Firewall and Router

...

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.

Server and Client on the same Machine

If you want to run a server and client on the same machine, you need to make sure that the port that is used for the new UI is different for server and client. Since that is a port that gets configured in the player.json you need to make sure to at least run the server using its own profile as described above. The alternative would be to have a completely separate install for both. The line to look for in the player.json and change is:

Code Block
    "WebUI port":5397

Just make sure that port is different for both and you'll be fine, so for example you could reconfigure the server to use 5398 instead.