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
xzorxz-utilspackage. On most Linux systems it is pre-installed.
Installation
-
Create the server folder
Create a new folder for the server binaries:
mkdir -p ~/FXServer/server -
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 asfx.tar.xz. -
Extract the archive
cd ~/FXServer/server && tar xf fx.tar.xzYou need
xzinstalled. On Debian/Ubuntu it is in thexz-utilspackage. -
Clone the server data
Clone
cfx-server-datainto a new folder outside the server binaries folder:git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data -
Create server.cfg
Create a
server.cfgfile in theserver-datafolder and fill it with the example configuration from the Cfx.re documentation. -
Set the license key
Set your license key in
server.cfg:sv_licenseKey "licenseKeyGoesHere"You can create a key at portal.cfx.re.
-
Run the server
Run the server from the
server-datafolder:cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg