How to create a FiveM Server
Before starting
Before following all the steps for creating the server, it is necessary to have a license key, which must be registered on the Cfx.re Keymaster service. The IP must match the IP on which the key will be used for the first time. Thereafter, the key can be used on any IP, but only on one server at a time.
Note: This procedure is also necessary if you buy a Game Server from RacKore!
Let's start creating our FiveM Server (local)
Windows
- Create a new directory (for example D: \ FXServer \ server), this will be used for the server binaries.
- Download the recommended server version on the following server artifacts page.
- Extract the contents of the downloaded server.zip archive into the directory created (point 1).
- Download cfx-server-data and place everything in a new folder outside the server binary folder (for example D: \ FXServer \ server-data).
- Create a server.cfg file in the server-data folder (see below for an example).
- Set the license key in your server.cfg using sv_licenseKey "licenseKeyGoesHere".
- Run the server from the server-data folder. For example, in a simple Windows Command Prompt window (cmd.exe):
cd /d D:\FXServer\server-data
D:\FXServer\server\FXServer.exe +exec server.cfg
(the / d flag is only needed when changing directories somewhere on a different drive)
Linux
- Create a new directory (e.g.
mkdir -p /home/username/FXServer/server
), this will be used for server binaries. - Download the recommended server version on the following server artifacts page.
- Extract the build to the directory that was created earlier, using
cd /home/username/FXServer/server && tar xf fx.tar.xz
(you need to have xz installed, on Debian / Ubuntu, it's in the xz-utils package). - Clone cfx-server-data and put everything in a new folder outside the server binaries folder (
git clone https://github.com/citizenfx/cfx-server-data.git /home/username/FXServer/server-data
) - Create a server.cfg file in the server-data folder (see below for an example).
- Set the license key in your server.cfg using sv_licenseKey "licenseKeyGoesHere".
- Run the server from the server-data folder (
bash /home/username/FXServer/server/run.sh +exec server.cfg
)
It's difficult, is there a easier solution?
Of course, RacKore is the alternative! By purchasing a FiveM Game Server from RacKore you will get a server ready to use and completely customizable and manageable from the control panel, you will not have to do any initial procedure as our automatic system will be able to configure your server quickly , you will also have the possibility to assign more resources or customized IPs, for more information please consult the page dedicated to this address: FiveM Game Hosting