How to Make a FiveM Server?
A Step-by-Step Guide

If you’ve been playing GTA V for the longest time, chances are you’ve heard how a FiveM server could modify your favorite game. With its maximum modding capabilities, any player will get to enjoy newer cars, game modes, and maps. In this post, let our gaming experts assist you in setting up FiveM servers to elevate your gaming experience.

Prepare These First

First and foremost, you should know that specific program prerequisites are needed to execute this procedure. For traditional and Windows VPS installations, your system has to be installed with Visual C++ Redistributable 2019 or other newer versions.

Our team also recommends integrating Git software into your system to ensure the correct installation of your FiveM server. Besides that, you may need to note your public server IP address for easier verification and get your FiveM license key at the KeyMaster website (https://keymaster.fivem.net) to save time.

Requirements

While a FiveM license will bear no charges, its free features only cater up to 32 players. For this player capacity, your system will only need around 4GB to 8GB of Random Access Memory (RAM). The fewer the players, the lower RAM it’ll need to run.

device specification

On Windows

Step #1: Install Visual C++

Before we proceed to the next step on how to make a FiveM server, you’ll need to install Visual C++ Redistributable 2019 into your system. If you don’t have one available for your unit, feel free to install a newer version as an alternative.

Step #2: Go to the Artifacts Server

Next, go to the artifact server website. In there, you’ll be able to find files from the oldest to the latest server version of FiveM. 

Step #3: Download FiveM Files

From the artifacts server website, there are two buttons on top of the list. Make sure to click on the Latest Recommended link over the Latest Optional, as these will give you the files you’ll need for the installation.

fivem fxserver

Create a new folder where you’ll be extracting the downloaded FiveM zipped files. Our gaming experts suggest properly labeling the folders to avoid confusion when running the server.

Step #4: Start the Server

Among the files extracted in the new folder you created, you’ll find an executable file named FXServer.exe. Click it twice to get the server running. After the server starts, an admin site will prompt in your browser. Input the PIN from your terminal and select the link account button.

Step #5: Log In on Cfx.re

After that, you’ll be required to log in to your Cfx.re account [1]. In that tab, click the Yes, Allow button to set the connection. 

Cfx.re account creation

Step #6: Set Passwords

With your Cfx.re account already connected, the next thing you’ll need to do is set up a new password for your server admin page. Click the Save button, and then you’ll be prompted to another window where you’ll have to input the name of your server. 

Step #7: Select Deployment Type

On the same set of steps, you’ll have to select which deployment type you want for your server. You have many options to choose from, but our experts advise you to select the Popular Template to save you time setting up.

Make sure to select the CFX Default template in the next step, as other templates need database servers.

Step #8: Review Recipe

To check if the configuration is correct, continue to Recipe Deployer. There, you’ll be able to see the codes. When you’re sure of the Recipe, click on the next button to proceed to the succeeding steps. 

Step #9: Input Keymaster and Run Recipe

Like we previously stated, make sure you already generated your FiveM license key from the Keymaster webpage because you’ll be needing to input these parameters to run the Recipe. 

Step #10: Run the Server

A dialogue box will appear informing you that the Recipe is being executed. Click the Save & Run option to wrap up the process. 

Traditional Installation

Step #1: Install Visual C++

Similar to the Windows setup, you’ll need to install Visual C++ Redistributable 2019 or any of its latest versions. 

Step #2: Make a Directory

To accommodate your server binaries, you’ll need to create a directory. You can follow this file command format: D:\FXServer\server.

Step #3: Go to the Artifacts Server

Next, visit the artifacts server to get the latest recommended master branch build for your operating system. 

artifact server

Step #4: Install Master Branch

From the downloaded files, proceed to install the master branch in your system. 

Step #5: Extract Build

With the use of an archiving tool like WinRAR or 7-Zip, extract the build in the directory previously created. 

Step #6: Clone cfx-server-data

After all that is done, it’s time to clone the cfx-server-data in a newly created folder outside the server binaries folder.

Here’s an example: git clone https://github.com/citizenfx/cfx-server-data.git server-data

Step #7: Create server.cfg file

In the server-data folder, create a server.cfg configuration file. Here’s a sample code for your reference when creating it. You can also copy these codes into the designated document: 

# Only change the IP if you’re using a server with multiple network interfaces, otherwise change the port only.

endpoint_add_tcp “0.0.0.0:30120”

endpoint_add_udp “0.0.0.0:30120”

# These resources will start by default.

ensure mapmanager

ensure chat

ensure spawnmanager

ensure sessionmanager

ensure basic-gamemode

ensure hardcap

ensure rconlog

# This allows players to use scripthook-based plugins such as the legacy Lambda Menu.

# Set this to 1 to allow scripthook. Do note that this does _not_ guarantee players won’t be able to use external plugins.

sv_scriptHookAllowed 0

# Uncomment this and set a password to enable RCON. Make sure to change the password – it should look like rcon_password “YOURPASSWORD”

#rcon_password “”

# A comma-separated list of tags for your server.

# For example:

# – sets tags “drifting, cars, racing”

# Or:

# – sets tags “roleplay, military, tanks”

sets tags “default”

# A valid locale identifier for your server’s primary language.

# For example “en-US”, “fr-CA”, “nl-NL”, “de-DE”, “en-GB”, “pt-BR”

sets locale “root-AQ” 

# please DO replace root-AQ on the line ABOVE with a real language! 🙂

# Set an optional server info and connecting banner image url.

# Size doesn’t matter, any banner sized image will be fine.

#sets banner_detail “https://url.to/image.png”

#sets banner_connecting “https://url.to/image.png”

# Set your server’s hostname

sv_hostname “FXServer, but unconfigured”

# Set your server’s Project Name

sets sv_projectName “My FXServer Project”

# Set your server’s Project Description

sets sv_projectDesc “Default FXServer requiring configuration”

# Nested configs!

#exec server_internal.cfg

# Loading a server icon (96×96 PNG file)

#load_server_icon myLogo.png

# convars which can be used in scripts

set temp_convar “hey world!”

# Remove the `#` from the below line if you do not want your server to be listed in the server browser.

# Do not edit it if you *do* want your server listed.

#sv_master1 “”

# Add system admins

add_ace group. admin command allow # allow all commands

add_ace group.admin command.quit deny # but don’t allow quit

add_principal identifier.fivem:1 group.admin # add the admin to the group

# Hide player endpoints in external log output.

sv_endpointprivacy true

# enable OneSync with default configuration (required for server-side state awareness)

set onesync on

# Server player slot limit (see https://fivem.net/server-hosting for limits)

sv_maxclients 48

# Steam Web API key, if you want to use Steam authentication (https://steamcommunity.com/dev/apikey)

# -> replace “” with the key

set steam_webApiKey “”

# License key for your server (https://keymaster.fivem.net)

sv_licenseKey changeme

Step #8: Input License Key on .cfg File

Assuming that you already had the FiveM license key we mentioned in the prerequisites, proceed to input the code into the server.cfg file. Refer to the code that looks like this sv_licenseKey changeme or sv_licenseKey “licenseKeyGoesHere”

Step #9: Run the Server

You can trigger the server to run in the server-data folder through a plain Windows command prompt often referred to as the cmd.exe window. Just type the following command code to execute the function: dos cd /d D:\FXServer\server-data D:\FXServer\server\FXServer.exe +exec server.cfg

On Linux

Step #1: Install Master Branch for Linux

First, visit the artifacts server website and select the recommended master branch build for the Linux version. You’ll have to copy the wget <url> to be able to download the FiveM files.

Step #2: Extract Build

Using a file extractor application like 7zip, you may extract the downloaded build files to a directory solely designated for FiveM. Use the cd /home/username/FXServer/server && tar xf fx.tar.xz, you may be required to install xz beforehand.

extracting FiveM server files

Step #3: Clone cfx-server-data

In the outer folder of your server binaries, clone the cfx-server-data file inside a newly created folder. Refer to traditional installation step number six for the sample command code.

Step #4: Create server.cfg file

Follow similar steps indicated in traditional installation step #7. Make sure to input the same code into the server.cfg file.

Step #5: Input License Key on .cfg File

Get your FiveM license key from https://keymaster.fivem.net and set it into your server.cfg configuration file. Find codes that look like these sv_licenseKey “licenseKeyGoesHere” and replace the code placed in between two quotation marks with your license key.

Step #6: Run the Server

Last but not least, you may now run the server from the directory you made earlier with the system command code bash /home/username/FXServer/server/run.sh +exec server.cfg. 

Conclusion

Although figuring out how to make a FiveM server will only take you around 10 to 15 minutes, always keep in mind that being thorough with each step will help you avoid technical issues in the long run. Get yourself familiar with its technicalities, and we assure you that you’ll get the hang of configuring it soon enough.

Back to Top