Game hosting

FXServer on Linux

Install a FiveM FXServer on Linux step by step.

This guide installs a FiveM server (FXServer) on a Linux VPS or dedicated server.

Requirements

  • Git, to clone the base server data (the recommended way).
  • The xz or xz-utils package. On most Linux systems it is pre-installed.

Installation

  1. Create the server folder

    Create a new folder for the server binaries:

    bash
    mkdir -p ~/FXServer/server
  2. Download the server build

    In the Cfx.re Linux build list, copy the link of the recommended build (master branch) and download it with wget, saved as fx.tar.xz.

  3. Extract the archive

    bash
    cd ~/FXServer/server && tar xf fx.tar.xz

    You need xz installed. On Debian/Ubuntu it is in the xz-utils package.

  4. Clone the server data

    Clone cfx-server-data into a new folder outside the server binaries folder:

    bash
    git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data
  5. Create server.cfg

    Create a server.cfg file in the server-data folder and fill it with the example configuration from the Cfx.re documentation.

  6. Set the license key

    Set your license key in server.cfg:

    sv_licenseKey "licenseKeyGoesHere"

    You can create a key at portal.cfx.re.

  7. Run the server

    Run the server from the server-data folder:

    bash
    cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg