FiveM is a modification for Grand Theft Auto V (GTA V) that allows you 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.
You will need very good technical knowledge to create your own Fivem Server on a VPS or Cloud instance. In this guide, we will show you how to install a Fivem server on Linux and Windows VPS server.
Also Read
Best FiveM Server Hosting Providers
Quick TipYou 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 lot of time to manage FiveM server. However, there are many FiveM server hosting providers available that offer reliable 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. |
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
- A system running a Ubuntu Linux operating system(Get a Free Server from Kamatera Cloud. They offer a 30-day free trial).
- A root password or a user with sudo privileges.
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:
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.
Also Read
Best Windows Dedicated Server Hosting Provider
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.
The post How to Make A FiveM Server for Free (Linux and Windows) appeared first on LinuxBuz.