Hey, FiveM Community!
Setting up a QBCore server for FiveM can offer a high level of customization and an exciting gaming experience for your players.
This tutorial will guide you through the steps needed to set up your own QBCore server.
Table of Contents
Step 1: Requirements
Ensure you have the following prerequisites before starting:
- A VPS (Virtual Private Server) or a dedicated server (from OVH)
- Admin access to the server.
- Basic knowledge of working with the Command Line Interface (CLI) – if you use Linux!
- Installed dependencies like Git, MySQL Server, and Node.js.
Step 2: Setting up the Server Environment
- Server Setup:
- Start up your VPS or dedicated server.
- Ensure the operating system is up to date:
apt-get update && apt-get upgrade -y
- Install Git:
- Install Git to clone repositories:
apt-get install git -y
- Install Git to clone repositories:
- Install MySQL Server:
- Set up MySQL to manage the database:
apt-get install mysql-server -y mysql_secure_installation
- Create a new database for your QBCore server:
1 2 3 4 5 mysql -u root -p CREATE DATABASE qbcore; CREATE USER 'qbcoreUser'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON qbcore.* TO 'qbcoreUser'@'localhost'; FLUSH PRIVILEGES;
- Set up MySQL to manage the database:
- Install Node.js:
- Install Node.js to run scripts:
curl -sL https://deb.nodesource.com/setup_14.x | bash - apt-get install -y nodejs
- Install Node.js to run scripts:
Step 3: Installing FXServer
- Download FXServer:
- Navigate to the FXServer latest release page and download it:
mkdir -p /home/fxserver cd /home/fxserver wget -O fx.tar.xz https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/your_download_link/fx.tar.xz tar xvfJ fx.tar.xz
- Navigate to the FXServer latest release page and download it:
- Setup FXServer:
- Move to the FXServer directory and run:
./run.sh
- Follow the on-screen instructions to set up your basic server configuration.
- Move to the FXServer directory and run:
Step 4: Install QBCore Framework
- Clone QBCore Repository:
- Clone the QBCore repository from the GitHub page:
cd /home/fxserver/server-data/resources git clone https://github.com/qbcore-framework/qb-core.git
- Clone the QBCore repository from the GitHub page:
- Install QBCore Dependencies:
- Navigate to the QBCore directory and install dependencies:
cd qb-core npm install
- Navigate to the QBCore directory and install dependencies:
Step 5: Configuring the Server
- Server.cfg File:
- Edit your
server.cfg
file to include QBCore resources:
# QBCore resources
ensure qb-core
ensure qb-vehicleshop
ensure qb-weapons # add more as required
- Edit your
- Database Connection Setup:
- Update the
server.cfg
file to include your database connection details:
set mysql_connection_string "server=localhost;database=qbcore;userid=qbcoreUser;password=password"
- Update the
Step 6: Starting the Server
- Start the FXServer:
- Navigate to your FXServer directory and start the server:
cd /home/fxserver ./run.sh +exec server.cfg
- Navigate to your FXServer directory and start the server:
- Accessing the Server:
- Open FiveM and connect to your server using the IP address of your VPS or dedicated server.
- Done!
Add more mods to your server
Here’s a simple guide on how to add more mods to your qbcore server:
- Look for mods that you want to add. For example on FiveM forums or fivemx.com
- Once you find a mod you like, download it to your computer.
- Go to the folder where your qbcore server files are stored.
- Put the downloaded mod files into the “resources” folder in your qbcore server files.
- Open the “server.cfg” file in your server folder. This file helps the server know what mods to use. Add the line with the name of the new mod (usually it’s the name of the folder you just added).
- After adding the mod and editing the config file, restart your qbcore server.
- Once it’s running again, make sure the mod is working properly. If there are any issues, check the messages in the server console for errors.
And that’s it! You’ve added a new mod to your qbcore server.
Next steps…?
- Add more scripts to your server
- Create a FiveM Server trailer
- Advertise your FiveM server – Tutorial
- How To Monetize your FiveM Server
This tutorial outlined the fundamental steps to set up a QBCore server. Ensure that you customize the server according to your preferences and continuously update your resources. For more resources and a community guide, you can frequently visit FiveM forums and QBCore official repositories.
Easier Rocketlaunch
Tips and Best Practices:
- Regularly update your server and resources to the latest versions to benefit from the latest features and security updates.
- Backup your database and server configurations regularly.
- Engage with the FiveM community through forums for support and updates.
By following these steps, you’ll set up an efficient and customizable QBCore server, ready to provide an immersive experience for your players. Happy server management!