Please observe, you will want primary Linux expertise for this. I’ll attempt to make this as “newbie” pleasant as potential.

Guarantee you might be logged in as root

You will have to run all the following instructions earlier than we will begin.

setenforce 0
yum replace -y
yum set up wget display screen nano git -y

Run all the following instructions. We’re going put together the directories for the server.

cd /residence/
mkdir FiveM
cd FiveM

Go to the artifacts link and discover the artifact with the best quantity and replica the url for the file “fx.tar.xf”

Now, we are literally downloading and operating the server

Run the next instructions

wget <url> 
Exchange "<url>" with the hyperlink for the "fx.tar.xf" file

Now we have now the server downloaded, now we have to extract it

cd /residence/FiveM 
tar xf fx.tar.xz

Upon getting it downloaded it is possible for you to to see all the server information and such. DO NOT RUN THE “” FILE!

Now we have to setup our “server-data” folder, that is the place we may have the assets, and the server.cfg file for the server.

git clone /residence/FiveM/server-data
cd server-data

Now its time to make our server.cfg

nano server.cfg

Paste this into the your ssh shopper (In case you are utilizing Putty excellent click on)

# you most likely do not wish to change these!
# solely change them when you're utilizing a server with a number of community interfaces
endpoint_add_tcp ""
endpoint_add_udp ""

begin mapmanager
begin chat
begin spawnmanager
begin sessionmanager
begin fivem
begin hardcap
begin ■■■■■■■
begin scoreboard
begin playernames

sv_scriptHookAllowed 1

# change this
#rcon_password yay

sv_hostname "My new FXServer!"

# nested configs!
#exec server_internal.cfg

# loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png

# convars to be used from script
set temp_convar "hey world!"

# disable asserting? filter the grasp by uncommenting this
#sv_master1 ""

# wish to solely enable gamers authenticated with a third-party supplier like Steam?
#sv_authMaxVariance 1
#sv_authMinTrust 5

# add system admins
add_ace group.admin command enable # enable all instructions
add_ace group.admin command.stop deny # however do not enable stop
add_principal identifier.steam:110000112345678 group.admin # add the admin to the group

# take away the # to cover participant endpoints in exterior log output
#sv_endpointprivacy true

# server slots restrict (should be between 1 and 31)
sv_maxclients 30

# license key for server (https://keymaster.fivem.web)
sv_licenseKey changeme

Change the config the way you need then as soon as you might be accomplished press “CTRL + X” then “Y” then “Enter”.

Now we have to end up a pair little issues earlier than we will begin the server.

Centos 7 comes default with firewalld so use the next instructions to open the ports for the server

firewall-cmd --add-port 30120/tcp
firewall-cmd --add-port 30120/tcp --permanent
firewall-cmd --add-port 30120/udp 
firewall-cmd --add-port 30120/udp --permanent
firewall-cmd --reload

In the event you get command not discovered, run these instructions, adopted by those above.

yum set up firewalld -y
systemctl begin firewalld
systemctl allow firewalld

It will open up the port “30120” for TCP and UDP.

Now we will run our server. Go into your “server-data” folder (through the use of cd /residence/FiveM/server-data)
Then run this:

bash /residence/FiveM/ +exec server.cfg

The best way to use Display screen

To start out your server:

display screen -dmS FiveM bash /residence/FiveM/ +exec server.cfg

The command above will begin your server, however not connect you to the display screen (which means you received’t see the output).

To connect to the display screen:

display screen -x FiveM

To renew the display screen:

display screen -r FiveM

What is the distinction between connect and resume?

Attaching to the display screen with `-x` will enable a number of individuals to be within the display screen on the identical time (good if a number of individuals wish to be within the display screen on the identical time).

Resuming the display screen mainly makes you the first person within the display screen, another customers who wish to be a part of the display screen, should use -x.

Observe that is MariaDB, however will work the very same as MySql

MariaDB is a fork of MySql (which means all MySql purposes will work the identical on MariaDB).

yum set up mariadb-server -y

systemctl begin mariadb
systemctl allow mariadb


Beneficial settings (through the mysql_secure_installation):
disallow root login remotely
take away take a look at databases, and entry to them.
take away take a look at customers
reload privilege desk

I hope you understood most of this, you probably have any questions let me know.

Looking for a FiveM Server host? Click here