๐Ÿš”FiveM

Linux

Note that the Linux version of FXServer is only provided as a courtesy port due to issues regarding Linux distribution compatibility and availability of diagnostic tools for native C++ code. If youโ€™re experiencing any issues, youโ€™re more likely to see them fixed if you use the Windows version.

Prerequisites

1-Git if you want to follow the recommended way of cloning the base server data. 2-xz or xz-utils package.

Installation

Create a new folder (for example mkdir -p ~/FXServer/server), this will be used for the server binaries. Download the current recommended master branch build for Linux from the Linux server build listing (copy the URL for the recommended server version and use wget to download it). Extract the build to the directory that was previously created, using cd ~/FXServer/server && tar xf fx.tar.xz (you need to have xz installed, on Debian/Ubuntu this is in the xz-utils package). Clone cfx-server-data in a new folder outside of your server binaries folder. For example: git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data Make a server.cfg file in your server-data folder (copy the example server.cfg file below into that file). Set the license key in your server.cfg using sv_licenseKey "licenseKeyGoesHere". Run the server from the server-data folder. cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg

Commands

apt update -y
apt install -y wget
apt install -y git

mkdir -p ~/FXServer/server
wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/5914-b600ff018d939f6a65e48994bf4a4192388435e7/fx.tar.xz
cd ~/FXServer/server && tar xf fx.tar.xz
git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data
server.cfg ~/FXServer/server-data

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

Dockerfile

FROM archlinux


########## [REQUIREMENTS] ##########
RUN apt update -y
RUN apt install -y wget
RUN apt install -y git


########## [INSTALLATION] ##########
RUN mkdir -p ~/FXServer/server
RUN wget https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/5914-b600ff018d939f6a65e48994bf4a4192388435e7/fx.tar.xz
RUN cd ~/FXServer/server && tar xf fx.tar.xz
RUN git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data
ADD server.cfg ~/FXServer/server-data


########## [START] ##########
#EXPOSE 30120
CMD cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg


########## [END] ##########

Last updated