Getting your Server Ready

There are a couple of things that you need to do in order to get your server ready to host a FiveM server. Without following the procedures below you will experience issues when configuring your FiveM server.

  1. Download and install the Visual C++ Redistributable 2019
  2. Ensure that your Windows VPS is up to date and restarted after all updates have been completed

Downloading your FiveM Server

Now that your server has the prerequisites installed you are ready to start downloading your FiveM server! The steps below outline one way to download a FiveM server and install it to your Windows VPS server, however, there may be other variations to install a FiveM server. All actions below are to be conducted on your Windows VPS.

  1. On your Desktop, create a new folder named FXServer
  2. Navigate to the FiveM Artifacts server and download the Latest Recommended Build
  3. Once downloaded, drag and drop the entire contents of the ZIP download to your FXServer folder
  4. Next, you need to download the CFX-Server-Data from FiveM’s Github
  5. Once downloaded, drag the whole cfx-server-data into your FXServer folder and rename it to server-data

  1. Continuing with the installation, we need to now create our server.cfg file which contains all configuration options for your server. There is an example server.cfg that you can get from FiveM directly
  2. We will create a new file in the path FXServer\server-data and call it server.cfg (NOTE: You may need to enable file extensions to create the server.cfg properly. Go to View | File Name Extensions)
  3. Paste the entirety of the example server.cfg into your newly created file using a notepad editor. For the purpose of this tutorial we are using Notepad ++

  1. After your server.cfg is setup, you need to get a FiveM license key for your server. This can be created through the FiveM Keymaster (NOTE: You will require a FiveM forum account to create a license key)
  2. You need to create a license key for your VPS IP. When creating your license key, the system will ask you to provide your server type (VPS), and your hosting company
  3. Once you have your license key created, scroll to the very bottom line in your server.cfg and paste it into the option sv_licenseKey


 

Creating the Batch File to Start your Server

Now that your server is downloaded and configured, it’s time to create the batch file that will actually execute and run your FiveM server.

  1. Create a new file on your Desktop with the name and extension StartServer.bat
  2. Right-click on the newly created file and choose “Open With” and select your notepad editor
  3. Providing that you followed all instructions mentioned above, enter the following into your StartServer.bat file and save

cd /d C:\Users\Administrator\Desktop\FXServer\server-data

C:\Users\Administrator\Desktop\FXServer\FXServer.exe +exec server.cfg

  1. When you double-click on your StartServer.bat you should see the following result in the console if your server starts correctly

There is only one thing left to do, port forward!


 

Port Forwarding for your FiveM Server

Port forwarding for your FiveM server will allow you to connect through the FiveM client from over the internet. Port forwarding is required for others to be able to connect to your server.

  1. Open the “Windows Firewall with Advanced Security” application that is installed on all Windows servers by default
  2. Click on Inbound Rules | New Rule…
  3. Select Port | TCP | Specific Ports
  4. Enter 30110, 30120 and select Next
  5. Allow the Connection, select Next, and name the rule anything you’d like
  6. Repeat this same process for both TCP and UDP in Inbound and Outbound rules

 

Conclusion

If you’ve completed all of the steps listed above, then you should have a working FiveM server.

Was this answer helpful? 104 Users Found This Useful (400 Votes)