Installing a FiveM Server on CentOS
This tutorial will guide you through the process of installing a FiveM server on a CentOS operating system.
Installing a FiveM Server on CentOS
Prerequisites
- A server running CentOS.
- Root or sudo access on the server.
- Basic knowledge of the Linux command-line interface.
Step 1: Installing Dependencies
Update your system:
sudo yum update
Install the EPEL repository:
sudo yum install epel-release
Install required packages:
sudo yum install git curl screen xz wget -y
Step 2: Adding a New User for FiveM
It’s recommended to run the FiveM server as a separate user for security purposes.
Create a new user:
sudo adduser fivem
Switch to the new user:
su - fivem
Step 3: Downloading and Extracting FiveM Server Files
Download the latest server artifact:
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/latest.tar.xz
Extract the server files:
tar xf latest.tar.xz
Step 4: Configuring the Server
Create a server configuration file (
server.cfg
):nano server.cfg
Add basic configuration settings to
server.cfg
. Refer to the FiveM documentation for sample configurations.Save and exit the nano editor.
Step 5: Running the Server
- Start the server using the
screen
utility:screen -S fivem-server ./run.sh +exec server.cfg
Step 6: Server Management
- To detach from the
screen
session, pressCtrl+A
followed byCtrl+D
. - To return to the session, use
screen -r fivem-server
.
Conclusion
Your FiveM server should now be operational on CentOS. Always manage your server responsibly and in compliance with FiveM’s terms of service.
For detailed configuration options and more advanced settings, consult the FiveM Documentation.