Create / Setting up a FiveM server

The initial step: Create a key

Ensure you have enrolled a permit key on the Cfx.re Keymaster administration. You want to have the IP match the IP on which you will initially utilize the key. A while later, the key can be utilized on any IP, yet just on each server in turn.

You can likewise purchase a FiveM patreon key from us, in the event that its accessible!

Likewise make a Steam API key – here: http://steamcommunity.com/dev/apikey

Utilizing the Steam API key physically on the server

Go to http://steamcommunity.com/dev/apikey and in Domain name you put what you need then duplicate the key and afterward go to your server.cfg and put this:

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

# -> replace “” with the key

set steam_webApiKey “KEYS”

Installation of the FiveM server

Windows

You need:

  1. Visual C++ Redistributable 2019 or newer.
  2. Git to assure a correct installation.

 

1.Create a new directory folder (for example D:\FXServer\server), this will be used for the server binaries.

2.Download the current recommended master branch build for Windows from the artifacts server.

3.Extract the build into the directory previously created.
3b. Use any archiving tool (such as WinRAR or 7-Zip).

4.Clone cfx-server-data in a new folder outside of your server binaries folder, for example, D:\FXServer\server-data.
4b. git clone https://github.com/citizenfx/cfx-server-data.git server-data

5.Make a server.cfg file in your server-data folder (copy the example server.cfg file below into that file).

6.Set the license key in your server.cfg using sv_licenseKey "licenseKeyGoesHere".

7.Run the server from the server-data folder. For example, in a plain Windows command prompt (cmd.exe) window:cd /d D:\FXServer\server-data D:\FXServer\server\FXServer.exe +exec server.cfg (the /d flag is only needed when changing directory to somewhere on a different drive)

Linux

Note that the Linux version of FXServer is only provided as a courtesy port due to issues regarding Linux distribution compatibility and availability of diagnostic tools for native C++ code. If you’re experiencing any issues, you’re more likely to see them fixed if you use the Windows version.

1.Create a new folder (for example mkdir -p /home/username/FXServer/server), this will be used for the server binaries.

2.Download the current recommended master branch build for Linux from the artifacts server(copy the URL for the latest server version and use wget <url> to download it).

3.Extract the build to the directory that was previously created, using cd /home/username/FXServer/server && tar xf fx.tar.xz (you need to have xz installed, on Debian/Ubuntu this is in the xz-utils package).

4.Clone cfx-server-data in a new folder outside of your server binaries folder.
4b. For example git clone https://github.com/citizenfx/cfx-server-data.git /home/username/FXServer/server-data

5.Make a server.cfg file in your server-data folder (copy the example server.cfg file below into that file).

6.Set the license key in your server.cfg using sv_licenseKey "licenseKeyGoesHere".

7.Run the server from the server-data folder.
7b. bash /home/username/FXServer/server/run.sh +exec server.cfg

 

 

Download a plug&play server?

You can likewise purchase a pre-made server with pre-made scripts.
Check the Pre-made servers out