Skip to content

Instantly share code, notes, and snippets.

@Amzi-01
Last active May 16, 2026 00:36
Show Gist options
  • Select an option

  • Save Amzi-01/e8e7624050c779b31bd649b46bf67bec to your computer and use it in GitHub Desktop.

Select an option

Save Amzi-01/e8e7624050c779b31bd649b46bf67bec to your computer and use it in GitHub Desktop.
FiveM development workflow tutorial for Linux

FiveM development workflow tutorial for Linux

Please note you will still need a VM/Windows Pc to compile the custom FiveM Client but only once

IMPORTANT NOTE: THE CUSTOM FIVEM CLIENT ONLY WORKS ON LOCAL SERVERS AND CAN NOT BE USED TO CONNECT TO NORMAL FIVEM SERVERS! THIS CLIENT IS PURELY FOR TESTING ASSETS INGAME NOT FOR PLAYING FIVEM

Special thanks to Gogsi for helping me with his custom version of the fiveM client, all credit for the client goes to him enter image description here

Quick note to CFX:

The demand for Linux is only going to grow and grow in the coming years with Linux gaining almost 1% market share in less than one month Linux should be taken more seriously, 1% might not sound alot but that’s in the tens of millions of users tired of using windows and swapping for good to Linux, hopefully one day we will have a better experience of using fiveM and hopefully we will soon have fiveM fully working on Linux without having to do questionable work arounds just to get it running, all it takes is for you CFX to make a Linux compatible version of Adhesive, you already support Linux server hosting so why not Linux fiveM client?

Environment used:

OS │ Bazzite
Kernel │ Linux 6.19.14-ogc1.1.fc44.x86_64
Image │ bazzite-nvidia-open:stable (bazzite 44)

CPU │ AMD Ryzen 9 5900X (24) @ 4.95 GHz
GPU 1 │ NVIDIA GeForce RTX 3060 Lite Hash Rate [Discrete]
GPU 2 │ NVIDIA GeForce RTX 5050 [Discrete]
RAM │ 16.56 GiB / 31.20 GiB (53%) DE│ KDE Plasma 6.6.4 WM │ KWin (Wayland) Shell │ bash 5.3.9 Term │ konsole 26.4.0 Pkgs │ 2921 (rpm), 79 (flatpak)

This tutorial also works for most .NET apps however codewalker is known to not work using this method

Programs/Hardware Used

  • Epic Games launcher
  • Blender 5.1.1 (Portable) / Sollumz
  • CodeX
  • Bottles
  • External Laptop (used for compiling the custom FiveM client)

Explanation: My setup is all contained in one bottles instance to help keep interaction between each bit of software as close to windows as possible while still not needing to use a virtual machine, while it is not fully native on Linux as we are using wine it is as close as we can get to a fully native Linux fiveM moding experience

Why is blender also in your Bottles instance, its available on Linux natively? YES this is true however due to our workflow we will need pyMateria in order to import assets into blender correctly without issues something Rockstar has specifically blocked on Linux as pyMateria will simply not work on Linux native versions of Blender, this is why we use blender in our bottles instance to keep the full functionality of Sollumz

Why use the Epic Games Launcher, why not steam? I don’t own a copy of GTA5 on steam so i will be using the Epic Games Launcher for this workflow, Do note: You can use steam installs of GTA5 you just need to move the game files into your Bottles C:/ Drive

Why are we using bottles? Bottles simplifies installing the correct .NET dependency CodeX requires it also helps sync the fiveM client to the game easier

Why cant i play normal fiveM servers with this custom linux client? due to the client only being functional in "Insecure Mode" the FiveM anticheat Adhesive is disabled, adhesive is responsible for system identifiers, ban checks and game Licence Key validation checks due to this only servers modified in a specific way can be joined enter image description here

Can i use frameworks like ESX and QBcore? NOPE. as adhesive is disabled anyone who joins the server will not have any identifiers, something that is a major requirement for these types of frameworks, the only frameworks that work are basic blank fiveM servers with no additional packages outside the required ones to run the server

Setting up Bottles

Step one Installing bottles via Flatpack:

flatpak install flathub com.usebottles.bottles

Once you have installed bottles via flatpack open up the software and navigate to the plus icon in the top left select the following settings: Type: Application Runner: Sys-wine-11.0 (if a newer version is available use that instead) Directory: i recommend putting this in a folder on the desktop

once you have created your first bottle you will see the following screen below, make sure your environment is as follows:

KEY STEP!!! Installing .NET dependency's

Open the dependency menu and make sure download the following: Dotnetcoredesktop10 vcredist2022

Next go back to the main bottles menu and open the settings menu and make sure the perimeters are as follows: Runner: sys-wine-11.0 (if a newer version is available use that instead) DXVK: dvxk-2.7.1 (if a newer version is available use that instead) VKD3D: vkd3d-proton-3.0.1 (if a newer version is available use that instead) DXVK NVAPI: dxvk-nvapi-v0.9.1 Deep Learning Super Sampling: OFF Desecrate Graphics: ON Every other slider: OFF Windows Version: Windows 11

enter image description here

now that our Bottles instance is setup we will move on to downloading GTA5 via the Epic Games Launcher

Setting up the Epic Games Launcher

on the main page for your bottles instant pictured above, you will see "install Programs...", under this menu click and install the Epic Games Launcher, once installed bottles will automatically open the Epic Games launcher, next we use the ui as usual as we would on Windows to download GTA5, once installed into the bottles instance we can move on to setting up Blender

Setting up Blender

For blender go to https://www.blender.org/download/ and download Windows Standalone .zip once downloaded extract the zip into your bottles, c_drive folder,

Next we need to boot Blender for this in the main bottles menu click Run Executable and then open the blender.exe file in folder you just unziped

(PLEASE NOTE: if you want to boot blender up again the above method is recommended instead of clicking the play button under the programs tab on bottles)

once in blender we need to change the viewports graphical renderer from OpenGL to Vulkan if we dont do this blender will run at 5fps

To change the graphical renderer go to Edit > Preferences System > display graphics and change backed from OpenGL to Vulkan

enter image description here

Installing sollumz is the same as usual here just make sure to accept the popup to install pyMateria now that blender is set up in our bottles instance we can now use sollumz's full features including drag and dropping files into the viewport, next thing to setup is CodeX

Using CodeX

if you have followed all the steps above we should be able to boot directly into CodeX

enter image description here

Now that we have CodeX, Blender and our bottles working its time to set up the client

THIS NEXT STEP NEEDS TO BE DONE ON A WINDOWS PC

i recommend dual booting if you dont have a VM, but for this instance i used an external laptop, Most of the following install guide is taken from the official build guide from CFX themselfs i have swaped out the git link so you will clone the custom client instead of the standard fiveM client

You can find out more about the custom version of the client here

Special note: despite being open source it is against CFX TOS to redistribute compiled versions of the FiveM client, this is why you will need to compile it yourself

Generate solution

To build FiveM, RedM or FXServer on Windows you need the following dependencies:

  • Visual Studio 2022 (Community edition or higher) including the following:

    • Workloads
      • .NET desktop development
      • Desktop development with C++
      • Windows application development
    • Individual components
      • .NET Framework 4.6 targeting pack
      • Windows 11 SDK (10.0.22000.0)

    You can install these workloads by going to "Tools" -> "Get Tools and Features..." -> Check the checkboxes -> Click "Modify" in the bottom right corner.

  • PowerShell 7 or higher.

  • Python 3.8 or higher with the py launcher installed.

  • MSYS2 at C:\msys64\ which is where the installer places it.

  • Node.js and Yarn in your PATH as node and yarn.

Then, execute the following commands in a cmd.exe shell to set up the build environment:

git clone https://github.com/Gogsi/fivem.git -c core.symlinks=true
cd fivem
git submodule update --jobs=16 --init

:: if you're using Python 3.12 or higher make sure you install the setuptools package
pip install setuptools

:: downloads the right Chrome version for 64-bit projects
fxd get-chrome

:: build bindings of game natives.
prebuild

:: or -game server/-game rdr3
fxd gen -game five
fxd vs -game five

Set up data files for five

After building the FiveM client, you should be having files such as /code/bin/five/debug/v8.dll exist automatically. Manual copying is no longer required.

Symlink game-storage directory (optional)

The code\bin\five\debug\data\game-storage directory can get quite large and is equivalent to the %LocalAppData%\FiveM\FiveM.app\data\game-storage directory, so you should use a symlink to save disk space.

If you don't know how to do that, here's how:

  1. Navigate to code\bin\five\debug in your fivem source repository.

  2. Make a new data directory if it doesn't already exist.

  3. Delete the game-storage folder in data if it already exists.

  4. Hold Shift, right click empty space while in code\bin\five\debug\data, and select "Open PowerShell window here".

  5. Type in the following commands:

    cmd
    mklink /d game-storage "%localappdata%\FiveM\FiveM.app\data\game-storage"
    
    
  6. You should now see a game-storage folder inside code\bin\five\debug\data.

Known issues

  • Game starts but all I see is the main menu background, my cursor and (when I press F8) a console!

    This directory is probably missing: /code/bin/five/debug/citizen/ui.

    UI building might have failed, but you can copy this directory %LocalAppData%/FiveM/FiveM.app/citizen/ui from your main installation of FiveM.

  • Windows error code 126, or some issues with other DLLs.

    It's possible that you accidentally missed a step or skipped a file that should have been copied. Start this section over from scratch; do not pass go, do not collect £200.

  • Windows error code 127.

    Add an antivirus exclusion for the repository, try rebuilding, and see if it works this time.

  • error CS0234: The type or namespace name 'API' does not exist in the namespace 'CitizenFX.Core.Native' (are you missing an assembly reference?)

  • error CS0246: The type or namespace name 'Hash' could not be found (are you missing a using directive or an assembly reference?)

    fxd gen ran before prebuild. Close the solution, re-run fxd gen and then reopen & build the solution again.

Configuring FiveM Server to alow connections from those in Insecure mode

Now that you have the compiled custom version of the FiveM client you can now swap back to your Linux pc

this next part is very easy as cfx supports linux for server hosting, all you will need to do is download the latest build of Fxserver form here and once setup find components.json in your server files and remove the line svadhesive also make sure to add sv_lan 1 to the server config file and disable ban checking on the FXserver ui under, Settings, Bans, Ban Checking

with these changes you can now load into your server

@Qu3rt
Copy link
Copy Markdown

Qu3rt commented May 14, 2026

I've been able to build successfully without errors but the client still wont start, giving me errors. What I did was compiling myself a version of libuv, but my client still crashes. I think it's something regarding git LFS since if I want to use the projects file by doing git lfs pull it gives me the github error saying that the user doesn't have enough budget:
batch response: This repository exceeded its LFS budget. The account responsible for the budget should increase it to restore access. Failed to fetch some objects from 'https://github.com/Gogsi/fivem.git/info/lfs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment