setting-up-a-server-vanilla
title: Setting up a Vanilla FXServer weight: 40 description: > A step-by-step guide on setting up a Vanilla FXServer.
title: Setting up a Vanilla FXServer weight: 40 description: > A step-by-step guide on setting up a Vanilla FXServer.
Vanilla Server Installation steps > Windows > Prerequisites
- Git if you want to follow the recommended way of cloning the base server data.
Vanilla Server Installation steps > Windows > Installation
-
Create a new directory (for example
C:\FXServer\server), this will be used for the server binaries. -
Download the current recommended
masterbranch build for Windows from the Windows server build listing. -
Extract the build into the directory previously created.
-
Clone cfx-server-data in a new folder outside of your server binaries folder, for example,
C:\FXServer\server-data.- 4b.
git clone https://github.com/citizenfx/cfx-server-data.git server-data(To type this command you need to open a command prompt, pressWin + R, once the run dialog shows typecmdand hit enter, remember to switch directories to the directory you plan to clone to by typingcd C:\FXServer.)
- 4b.
-
Make a server.cfg file in your
server-datafolder (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-datafolder. For example, in a plain Windows command prompt (cmd.exe) window:cd /d C:\FXServer\server-data C:\FXServer\server\FXServer.exe +exec server.cfg(the
/dflag is only needed when changing directory to somewhere on a different drive)
Vanilla Server Installation steps > Linux
{{% alert color="info" %}}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. {{% /alert %}}
Vanilla Server Installation steps > Linux > Prerequisites
- Git if you want to follow the recommended way of cloning the base server data.
xzorxz-utilspackage.
Vanilla Server Installation steps > Linux > Installation
- Create a new folder (for example
mkdir -p ~/FXServer/server), this will be used for the server binaries. - Download the current recommended
masterbranch build for Linux from the Linux server build listing (copy the URL for the recommended server version and usewget <url>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 havexzinstalled, on Debian/Ubuntu this is in thexz-utilspackage). - Clone cfx-server-data in a new folder outside of your server binaries folder.<br>
For example:
git clone https://github.com/citizenfx/cfx-server-data.git ~/FXServer/server-data - Make a server.cfg file in your
server-datafolder (copy the example server.cfg file below into that file). - Set the license key in your
server.cfgusingsv_licenseKey "licenseKeyGoesHere". - Run the server from the
server-datafolder.<br>cd ~/FXServer/server-data && bash ~/FXServer/server/run.sh +exec server.cfg
Vanilla Server Installation steps > server.cfg
An example server.cfg follows.
{{% code file="/static/examples/config/server.cfg" language="sh" %}}
Vanilla Server Installation steps > RedM / RDR2
To set the FXServer to host a RedM server, apply the following to the server.cfg.
set gamename rdr3
Vanilla Server Installation steps > Common issues
- If you don't get any 'resources found', and it says 'Failed to start resource', you didn't 'cd' to the right folder.
- If no resources get started, and you also can't connect (i.e. 'timed out'/'connection refused'), you didn't add +exec.
- If you get 'no license key was specified', one of the above two mistakes may apply.
- If you're facing slow server startups on Windows, refer to this.