FX-Server is finally here! Stability updates, increased playercaps, more natives, features, and so much more stuff that still needs to be documented haha! The future is now!
Hello, this is an in-depth and “Noob Friendly” guide on how to install FiveM’s latest FX-Server on a completely fresh Linux installation.
I’m going to assume you know how to SSH / FTP into your server for the entirety of this tutorial.
Please read each step carefully before asking for troubleshooting help <3
Requirements:
-
Obtain Root access on your server
-
Update / Upgrade to ensure you are all up-to-date
apt-get update && apt-get upgrade
Step 1) Setting Up Your FiveM Server!
Alright, follow along exactly. We’re going to try to stay in the same directory so that there is no confusion. Lets start with:
cd ~
That’ll take you to your root directory. Next, lets navigate to the place where we’re going to install the server.
The home directory where the server will be stored.
cd /home/
Navigate here and copy the URL to the latest version of FiveM Linux Server.
Next you’ll want to download the latest version of FiveM Server from that link using wget -url- command:
wget https://example.com/file.zip
Obviously change the URL to the one you found in the repo above.
We’re gonna want to make this all neat and stuff, so lets create a directory to store the server:
mkdir fx-server
then
mkdir fx-server-data
Alright, so next we’re gonna unpack this file. Do so by typing the following:
tar -xvf fx.tar.xz -C /home/fx-server/
And that’ll unpack the FX-Server binaries for you, next we need to grab the resources and whatnot. Lets navigate back to our main folder.
cd /home/
You can grab the resources by typing the following:
git clone https://github.com/citizenfx/cfx-server-data.git fx-server-data
You’re nearly finished. Lets get into that cfx-server-data folder by typing:
cd fx-server-data
and now we need to create our very own server.cfg. Do so by typing:
nano
Next, you’ll want to copy this big chunk of text and paste it into the SSH client. (You can do so by right clicking anywhere inside the screen)
# you probably don't want to change these!
# only change them if you're using a server with multiple network interfaces
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
start mapmanager
start chat
start spawnmanager
start fivem
start hardcap
start rconlog
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 for use from script
set temp_convar "hey world!"
# disable announcing? clear out the master by uncommenting this
#sv_master1 ""
# want to only allow players authenticated with a third-party provider like Steam?
#sv_authMaxVariance 1
#sv_authMinTrust 5
# 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:110000112345678 group.admin # add the admin to the group
# player endpoint protection
sv_endpointprivacy true
After you grab that large chunk of text you’ll want to press the keys
CTRL + O
Which will write-out of the file, and will prompt you to enter a name. You NEED to name this file:
server.cfg
Follow up by pressing Enter and using the command:
CTRL + X
To exit the file.
Congratulations FX-Server is technically setup. I wont be going over how all the server.cfg variables work, that information should, at some point, be available here: LINK
Step 2) Adding Resources / Mods
Alright, so you want to add mods to your server, right? You have two options. You can manually develop them on Linux, which is a pain in the arse, or you can develop them on a local fx-server, which is definitely the ideal approach. I’m going to show you how I update resources after I’ve finished testing them on my local machine.
Lets open up Filezilla and connect to our server. I am not going to be teaching how to FTP into servers, but you should navigate to your local resource you want to copy over, and the /home/fx-server-data/resources/ folder like such:
Just drag and drop them in, and be sure to add them to your server.cfg by adding
start resourcename
Here’s a test resource for you to try yourself. It’s a simple ragdoll script for when you Press X.
ragdoll.7z (536 Bytes)
Be sure to add
start ragdoll
to your server.cfg
Step 3) Updating your certs!
Luckily this last step is super simple, but very important. If you get a TrustFailure issue when you try to join your server, it’s because you did not follow this step!
You’ll want to type:
sudo cert-sync /etc/ssl/certs/ca-certificates.crt
Followed by,
apt-get update && apt-get upgrade
Step 4) Running Your Server!
You can now start your server by navigating to your cfx-server folder:
cd /home/fx-server-data/
and typing:
bash /home/fx-server/run.sh +exec server.cfg
You can also close the server by pressing the command:
CTRL + C
You’ll notice at this point you need to leave your SSH session open to keep the server active. You can fix that by following Step 4.5 which is optional but in my opinion extremely important.
Step 4.5 (Optional)
Alternatively, you can run your server in a… virtual SSH session, which will allow you to drop out of the main session without the server automatically closing. You can do so by typing:
screen
This will prompt you to press your SPACE key a few times, but in general when you get into the new “Screen”, everything will look relatively familiar. The difference is this is a virtual screen.
You can again, in this session, navigate to your server folder and run the server from here. The difference being when you leave it will remain running. To exit this session, you can simply press the command:
CTRL + A + D
And to rejoin the session when you’re back at the main terminal you can press the command:
screen -r
Conclusion
That should be it! You are now the proud owner of a fresh and functioning FiveM server running the latest and greatest FX-Server! If you have any questions, concerns, or issues, let me know in the comments and I will eventually get back to you! I hope you enjoy FX-Server and enjoy all the new features that come with it!
Credits and reference goes to:
- Eric (A Skype Buddy)
- Blizzn (Discord)
- @Beef (Discord)
- @BuSheeZy
- @Scyar_Gameur
- @KNG
- @nickel
- @SupaCURE
And anyone / anything else I may have missed!
Thank you for getting this far. Have a great day!