Hello !
I wish to add my small contribution for the administration of a server FiveM underneath linux. I do know there are already a number of subjects, however I discover some are incomplete or not sensible makes use of, that’s why I created my very own script.

Nothing sophisticated to make use of it.

You have to :

  • Server Linux
  • Server FiveM
  • A mouse
  • A keyboard
  • Putty (or different)

What does this script do?

It permits to begin, restart, cease, display, and verify the standing of its server FiveM. However not solely!
It additionally restart mysql, clear the server cache and restart sessionmanager.


I can’t present you how you can use putty, it’s manner too easy.

  1. Open putty and connect with your linux server.
  2. As soon as related, navigate to your FiveM listing through the command cd
  3. As soon as you might be on the root of your server, use the wget command
wget https://uncooked.githubusercontent.com/HalCroves/Fivem-Serveur-management/grasp/handle.sh

  1. Technically, you need to have a file named handle.sh on the root of your listing

  2. Now, edit this information. Two options, through the editor (vim/nano…), or through your ftp in case you are a slacker. I’ll use nano.

  3. Edit the handle.sh vith the command nano handle.sh. You go into edit mode

  4. Arrived at this stage, You solely have to change just a few strains.

8.As soon as modified, you simply need to do CTRL + X, sort O and press ENTER

Use script

/! On the first use, the fivem server should be utterly off, as a result of right here I exploit because the title of display fxserver

  1. To make use of this script, you should be on the root of your fivem server (ex: /house/FiveM).

    I counsel you to make use of the dos2unix command (apt-get set up dos2unix) to transform your file to the proper format.
    Like this :

    dos2unix handle.sh

    And it’s essential add permissions on this file :

    chmod -R 755 handle.sh
  2. Now, we merely use the command ./handle.sh begin
    It will begin the server.

Different makes use of

./handle.sh begin : begin server
./handle.sh stop : cease server
./handle.sh restart : restart server
./handle.sh display : connect with the display (console)
./handle.sh standing : lets you already know if the fivem server is began or not

Add a cron job

If you wish to use this script for an automated reboot at any time, it’s essential to create a cron job.

For this, i exploit crontab -e. It is advisable to defile the file editor together with your arrow keys.

Exemple :

Right here the server will reboot at 00:00, 12pm, 18pm.

00 00 * * * /house/FiveM/handle.sh restart
0 12 * * * /house/FiveM/handle.sh restart
0 18 * * * /house/FiveM/handle.sh restart

As soon as modified, you simply need to do CTRL + X, sort O and press ENTER

I have no idea if I’d replace this publish and the file. It was simply to share.



Looking for a FiveM Server host? Click here