How To Create a QBCore Server (FiveM)

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.


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

  1. Server Setup:
    • Start up your VPS or dedicated server.
    • Ensure the operating system is up to date:apt-get update && apt-get upgrade -y
  2. Install Git:
    • Install Git to clone repositories:apt-get install git -y
  3. 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;
  4. Install Node.js:
    • Install Node.js to run scripts:curl -sL https://deb.nodesource.com/setup_14.x | bash - apt-get install -y nodejs

Step 3: Installing FXServer

  1. 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
  2. Setup FXServer:
    • Move to the FXServer directory and run:./run.sh
    • Follow the on-screen instructions to set up your basic server configuration.

Step 4: Install QBCore Framework

  1. 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
  2. Install QBCore Dependencies:
    • Navigate to the QBCore directory and install dependencies:
      cd qb-core npm install

Step 5: Configuring the Server

  1. 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
  2. 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"

Step 6: Starting the Server

  1. Start the FXServer:
    • Navigate to your FXServer directory and start the server:cd /home/fxserver ./run.sh +exec server.cfg
  2. Accessing the Server:
    • Open FiveM and connect to your server using the IP address of your VPS or dedicated server.
  3. Done!

Add more mods to your server

Here’s a simple guide on how to add more mods to your qbcore server:

  1. Look for mods that you want to add. For example on FiveM forums or hifivem.com
  2. Once you find a mod you like, download it to your computer.
  3. Go to the folder where your qbcore server files are stored.
  4. Put the downloaded mod files into the “resources” folder in your qbcore server files.
  5. 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).
  6. After adding the mod and editing the config file, restart your qbcore server.
  7. 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…?


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

image
How To Create a QBCore Server (FiveM) 2

Use a Server template!

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!

Leave a Comment

Your email address will not be published. Required fields are marked *

Get 20% off any Full QBCore Servers
en_USEnglish