How to Make A FiveM Server for Free (Linux and Windows)

how to make a fivem server for free

FiveM is a modification for Grand Theft Auto V (GTA V) created in 2015. It allows users to play multiplayer on customized dedicated servers. It is designed for cor creativity and offers a set of tools to personalize the gameplay experience of your server. It comes with unique features that help you to make roleplay, drifting, racing, deathmatch, or something completely original. In this guide, we will show you how to make a Fivem server on Linux and Windows VPS server.

Also Read

Best FiveM Server Hosting Providers

Quick Tip

You will need your own dedicated server, powerful hardware, fast internet, and very good technical knowledge to run your own FiveM server. You will also need to spend a lot of time to manage the FiveM server. However, there are many FiveM server hosting providers available that offer reliable game hosting services, where you can rent server space and manage your FiveM server through a web-based control panel. So, I would recommend investing a small amount to pay for a FiveM server hosting.

FiveM Server Minimum Requirements

Here are the minimum hardware requirements to host your own FiveM server.

MinimumRecommended
CPUIntel Core 2 Q6600 @ 2.40GHz / AMD Phenom 9850 @ 2.5GHzIntel Core i5 3470 @ 3.2GHz / AMD X8 FX-8350 @ 4GHz
GPUNVIDIA 9800 GT 1GB / AMD HD 4870 1GB / Intel HD GT2NVIDIA GTX 660 2GB / AMD HD7870 2GB
RAM8GB (4 may work)16GB
Hard Disk105GB + ~4GB105GB + 8GB

How to Make a FiveM Server for Free

In this section, you will learn how to install a FiveM Server on Linux and Windows VPS.

How to Install a FiveM Server on Linux

In this section, we will show you how to make a FiveM server in Linux. We will use Ubuntu as an operating system for this tutorial.

Prerequisites

Step 1 – Getting Started

First, you will need to install some required dependencies on your server. You can install all of them using the following command.

apt install screen wget git -y

After installing all the packages, you can proceed to install the FiveM server.

Step 2 – Download and Install FiveM Server

First, create a directory for the FiveM server using the following command.

mkdir ~/fivem-server

Next, visit the FiveM official download page as shown below:

fivem download page

Next, pick your desired FiveM version, copy the download link of the FiveM server version, and run the following command to download it on your server.

cd ~/fivem-server
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/6390-78d783f1cf263f85f3fb3158cf13e8bcecd21b7d/fx.tar.xz

Next, extract the downloaded file using the tar command.

tar -xvf fx.tar.xz

Next, you will also need to download the FiveM data to your server. You can download it with the git command.

git clone https://github.com/citizenfx/cfx-server-data ~/fivem-resources

Step 3 – Configure FiveM Server

Next, you will need to create a server.cfg configuration file to define all configurations and FiveM license information.

nano ~/fivem-resources/server.cfg

Add the following configurations:

endpoint_add_tcp "0.0.0.0:30120”
endpoint_add_udp "0.0.0.0:30120”

ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
ensure rconlog
ensure scoreboard

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 "”

sets tags "default”
sv_hostname "FXServer, but unconfigured”

# 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!”

# Uncomment this 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.steam:110000100000000 group.admin # add the admin to the group

# Hide player endpoints in external log output.
sv_endpointprivacy true

# Server player slot limit (must be between 1 and 32, unless using OneSync)
sv_maxclients 32

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

Save and close the file when you are finished.

Note: You will need to register and add your server at https://keymaster.fivem.net to get a license key.

Step 4 – Start FiveM Server

At this point, your FiveM server is installed and configured. Now, it’s time to start the FiveM server. You can start it with the following command.

cd ~/fivem-resources && bash ~/fivem-server/run.sh +exec server.cfg

When your FiveM server is started successfully, you will get the following output.

0/315Server license key authentication succeeded. Welcome!
Authenticating with Nucleus...
[#####-------------------------------------------------------------------------------------------------
-------------------------------] 11/315 fff
cccc ff xx xx rr rr eee
cc ffff xx rrr r ee e
cc ff xx ... rr eeeee
ccccc ff xx xx ... rr eeeee

Authenticated with cfx.re Nucleus: https://hitj-e8q3pd.users.cfx.re/
[###############################-----------------------------------------------------------------------------
-------------------------] 74/315-- [server notice: tebex_not_set]
================
Monetize your server using Tebex! Visit https://tebex.io/fivem for more info.
================

Press the CTRL+C key to stop the server. We will create a systemd file to start the FiveM server at system reboot.

Step 5 – Create a Service File to Start FiveM At System Boot

It is a good idea to create a systemd service file to manage the FiveM service via systemctl command. You can create a systemd service file using the following command.

nano /lib/systemd/system/fivem.service

Add the following configurations:

[Unit]
Description=FiveM server

[Service]
Type=forking
User=root
ExecStart=/usr/bin/fivem_start.sh

[Install]
WantedBy=multi-user.target

Save and close the file then create a FiveM start script:

nano /usr/bin/fivem_start.sh

Add the following configurations:

#!/bin/bash
screen -dm bash -c 'cd /root/fivem-resources && bash /root/fivem-server/run.sh +exec 
server.cfg'

Save the file then set the execution permission on startup file.

chmod +x /usr/bin/fivem-start.sh

Next, reload the systemd daemon to apply the changes.

systemctl daemon-reload

Next, start FiveM server and enable it to start at system reboot:

systemctl start fivem
systemctl enable fivem

To verify the FiveM service status, run the following command.

systemctl status fivem

At this point, FiveM server is started and listens on port 30120.

How to Install a FiveM Server on Windows

In this section, we will show you how to create a FiveM server on Windows.

Prerequisites

  • A system running a Windows server or Windows 10 operating system.
  • An administrative password is configured.

How to Make a FiveM Server on Windows

Follow the below steps to create a FiveM server on Windows.

Step 1. First, create a new folder at C:\FXServer\server.

Step 2. Next, download the latest FiveM server build for Windows from the artifacts server.

Step 3. Next, download cfx-server-data in a new folder outside of your server binaries folder, for example, C:\FXServer\server-data.

Step 4. Next, generate a license key for FiveM at https://keymaster.fivem.net.

Step 5. Next, create a server.cfg file in your server-data folder and add the following configuration including your license key.

endpoint_add_tcp "0.0.0.0:30120”
endpoint_add_udp "0.0.0.0:30120”

ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure fivem
ensure hardcap
ensure rconlog
ensure scoreboard

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 "”

sets tags "default”
sv_hostname "FXServer, but unconfigured”

# 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!”

# Uncomment this 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.steam:110000100000000 group.admin # add the admin to the group

# Hide player endpoints in external log output.
sv_endpointprivacy true

# Server player slot limit (must be between 1 and 32, unless using OneSync)
sv_maxclients 32

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

Step 6. Next, open your Windows command interface and run the following commands to start the FiveM server.

cd /d C:\FXServer\server-data
C:\FXServer\server\FXServer.exe +exec server.cfg

You can now download the FiveM client, install it on your machine, connect to your FiveM server, and start inviting your friends to play together.

Conclusion

In this post, we explained how to make a FiveM server on Windows and Linux machines. I hope you can now easily make your own Fivem server for free.

FAQs: How to Make a FiveM Server for Free

1. How to Update FiveM Server Artifacts

To update your FiveM server artifact, follow the below steps:

  1. Stop the FiveM Server.
  2. Delete existing files in FXServer.
  3. Download the latest artifact and extract it to your FXServer folder.
  4. Restart the FiveM Server.

2. How to Clear FiveM Server Cache

To clear the FiveM server cache:

  1. Open the server data folder.
  2. Then, open the Cache folder and delete the files folder.

3. Can’t Connect to FiveM Server

To resolve the FiveM server connection problem, follow the below steps.

  1. Make sure the FiveM server is running.
  2. Allow FiveM port via Firewall.
  3. Stop any antivirus program on your computer.
  4. Clear cache.
  5. Remove the crash dump folder from the FiveM folder.

4. FiveM Crashing When Joining Server

Here are the troubleshooting steps to fix the error.

  1. Incompatible audio device:- Some audio devices are likely incompatible with this game. So, you will need to disable all unused audio devices.
  2. Cache files:- Delete all the files inside the cache folder, except the game folder.
  3. Outdated BIOS:- Your system BIOS missing some updates that are crucial for the game to work. In order to fix this, you need to download and install the available updates for your specific motherboard.
  4. Reinstall GPU drivers:- Uninstall the GPI drivers that they are currently using, then install the latest updates available.
Also Read
  1. Best Minecraft Server Hosting for Everyone
  2. Best Rust Server Hosting Providers

About Hitesh Jethva

I am Hitesh Jethva Founder and Author at LinuxBuz.com. I felt in love with Linux when i was started to learn Linux. I am a fan of open source technology and have more than 15+ years of experience in Linux and Open Source technologies.

View all posts by Hitesh Jethva